Browse Source

Added markdown to Vault descriptions for better formatting.

master
Teknikode 2 years ago
parent
commit
f01bbc6b18

+ 10
- 0
Teknik.sln View File

@@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Piwik", "Utilities\Piwik\Pi
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Configuration", "Utilities\Configuration\Configuration.csproj", "{F0DA1B67-AF92-4B4A-8669-7E81645FF996}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeknikStreaming", "TeknikStreaming\TeknikStreaming.csproj", "{7695CE9A-A0DB-4D73-BC9B-2206481F0254}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,6 +83,14 @@ Global
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|Any CPU.Build.0 = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.ActiveCfg = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.Build.0 = Release|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Debug|x64.ActiveCfg = Debug|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Debug|x64.Build.0 = Debug|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Release|Any CPU.Build.0 = Release|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Release|x64.ActiveCfg = Release|Any CPU
{7695CE9A-A0DB-4D73-BC9B-2206481F0254}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

+ 6
- 0
Teknik/Areas/Vault/Scripts/Vault.js View File

@@ -1,4 +1,10 @@
$(document).ready(function () {
$("textarea.mdd_editor").MarkdownDeep({
help_location: helpURL,
disableTabHandling: false,
resizebar: false
});

$('.hideContent').each(function () {
if ($(this).find('pre').height() > 400) {
var id = $(this).attr('id');

+ 2
- 0
Teknik/Areas/Vault/VaultAreaRegistration.cs View File

@@ -84,12 +84,14 @@ namespace Teknik.Areas.Vault

// Register style bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/vault", config.CdnHost).Include(
"~/Content/mdd_styles.css",
"~/Areas/Vault/Content/Vault.css"));

// Register Script Bundle
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/vault", config.CdnHost).Include(
"~/Scripts/jquery.blockUI.js",
"~/Scripts/bootbox/bootbox.min.js",
"~/Scripts/MarkdownDeepLib.min.js",
"~/Areas/Vault/Scripts/Vault.js"));
}
}

+ 2
- 0
Teknik/Areas/Vault/ViewModels/ModifyVaultViewModel.cs View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Teknik.Areas.Vault.Models;
using Teknik.ViewModels;

@@ -13,6 +14,7 @@ namespace Teknik.Areas.Vault.ViewModels
public int vaultId { get; set; }
public string CurrentSub { get; set; }
public string title { get; set; }
[AllowHtml]
public string description { get; set; }
public List<ModifyVaultItemViewModel> items { get; set; }


+ 13
- 1
Teknik/Areas/Vault/Views/Vault/ModifyVault.cshtml View File

@@ -12,6 +12,7 @@

<script type="text/javascript">

var helpURL = '@Url.SubRouteUrl("help", "Help.Markdown")';
var validateItemURL = '@Url.SubRouteUrl(Model.CurrentSub, "Vault.Action", new { action = "ValidateItem" })';
var modifyVaultURL = '@Url.SubRouteUrl(Model.CurrentSub, "Vault.Action", new { action = action })';

@@ -135,7 +136,18 @@
<div class="row">
<div class="form-group col-sm-10 col-sm-offset-1">
<label for="article"><h4>Description</h4></label>
<textarea class="form-control" name="description" id="description" placeholder="This is a cool collection of uploads and pastes" title="enter the description for this vault" rows="5">@Model.description</textarea>
<div class="mdd_toolbar"></div>
<textarea class="form-control mdd_editor" name="description" id="description" placeholder="This is a cool collection of uploads and pastes" title="enter the description for this vault" data-provide="markdown" rows="5">@Model.description</textarea>
</div>
</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Preview</div>
<div class="panel-body">
<div class="mdd_preview"></div>
</div>
</div>
</div>
</div>
</div>

+ 1
- 1
Teknik/Areas/Vault/Views/Vault/ViewVault.cshtml View File

@@ -32,7 +32,7 @@
<hr />
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<p>@Model.Description</p>
<p>@Html.Markdown(@Model.Description)</p>
</div>
</div>
}

+ 44
- 0
TeknikStreaming/App.config View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

+ 25
- 0
TeknikStreaming/Program.cs View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;

namespace TeknikStreaming
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Server()
};
ServiceBase.Run(ServicesToRun);
}
}
}

+ 36
- 0
TeknikStreaming/Properties/AssemblyInfo.cs View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TeknikStreaming")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TeknikStreaming")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7695ce9a-a0db-4d73-bc9b-2206481f0254")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 37
- 0
TeknikStreaming/Server.Designer.cs View File

@@ -0,0 +1,37 @@
namespace TeknikStreaming
{
partial class Server
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Component Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ServiceName = "Service1";
}

#endregion
}
}

+ 55
- 0
TeknikStreaming/Server.cs View File

@@ -0,0 +1,55 @@
using Media.Rtsp;
using Media.Rtsp.Server.MediaTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using Teknik.Areas.Users.Models;
using Teknik.Models;

namespace TeknikStreaming
{
public partial class Server : ServiceBase
{
private RtspServer _RTSPServer;

public Server()
{
InitializeComponent();
}

protected override void OnStart(string[] args)
{
_RTSPServer = new RtspServer(System.Net.Sockets.AddressFamily.NetBios, 555);

LoadStreams();

_RTSPServer.Start();
}

protected override void OnStop()
{
_RTSPServer.Stop();
}

private void LoadStreams()
{
TeknikEntities db = new TeknikEntities();

List<User> users = db.Users.ToList();
if (users != null)
{
foreach (User user in users)
{
RtspSource source = new RtspSource(string.Format("TeknikLiveStream_{0}", user.Username), string.Format("rtsp://localhost/live/{0}/stream.amp", user.Username));

}
}
}
}
}

+ 143
- 0
TeknikStreaming/TeknikStreaming.csproj View File

@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7695CE9A-A0DB-4D73-BC9B-2206481F0254}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TeknikStreaming</RootNamespace>
<AssemblyName>TeknikStreaming</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Codec, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codec.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Codecs.Image, Version=1.0.7.41646, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codecs.Image.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Codecs.Video.H264, Version=1.0.7.41646, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Codecs.Video.H264.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Common, Version=1.0.7.41642, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Compression, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Compression.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Container, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Container.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Containers.Mpeg, Version=1.0.7.41645, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Containers.Mpeg.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Ntp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Ntp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Rtmp, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtmp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Rtp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.RtpTools, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.RtpTools.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Rtsp, Version=1.0.7.41644, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Rtsp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.RtspServer, Version=1.0.7.41647, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.RtspServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Media.Sdp, Version=1.0.7.41643, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\net7mma.0.111192.1\lib\net452\Media.Sdp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Server.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Server.Designer.cs">
<DependentUpon>Server.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Teknik\Teknik.csproj">
<Project>{B20317CD-76C6-4A7B-BCE1-E4BEF8E4F964}</Project>
<Name>Teknik</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 5
- 0
TeknikStreaming/packages.config View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net462" />
<package id="net7mma" version="0.111192.1" targetFramework="net462" />
</packages>

Loading…
Cancel
Save