Merge rest pf files
This commit is contained in:
parent
86b22c6d86
commit
875e846470
@ -1,10 +1,8 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Squirrowse.Client.Service;
|
namespace squirrowse.client
|
||||||
|
|
||||||
namespace Squirrowse.Client
|
|
||||||
{
|
{
|
||||||
public class Program
|
class Program
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
@ -17,11 +15,13 @@ namespace Squirrowse.Client
|
|||||||
.ConfigureServices((hostContext, services) =>
|
.ConfigureServices((hostContext, services) =>
|
||||||
{
|
{
|
||||||
services.AddHostedService<Worker>();
|
services.AddHostedService<Worker>();
|
||||||
services.AddSingleton<IConnectionManager>(x=> new ConnectionManager("http://localhost", 44366)); //keep as transient for now
|
services.AddSingleton<IConnectionManager>(x =>
|
||||||
services.AddSingleton< ICameraService, CameraService >(x=>new CameraService(new Camera()));
|
new ConnectionManager("http://squirrowse.azurewebsites.net", 80)); //keep as transient for now
|
||||||
services.AddTransient<IStreamService, StreamService>();
|
|
||||||
|
// new ConnectionManager("http://192.168.0.13", 5000)); //keep as transient for now
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,24 +1,17 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<OutputType>Exe</OutputType>
|
||||||
<UserSecretsId>dotnet-Squirrowse.Client-D6805387-040A-46DF-9DAE-926B46C981A6</UserSecretsId>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.1.1.20191021" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.2" />
|
||||||
|
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||||
|
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.2.0.20200208" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Squirrowse.Core\Squirrowse.Core.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Update="appsettings.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
@ -1,42 +1,36 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.SignalR.Client;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Squirrowse.Client.Service;
|
|
||||||
using Squirrowse.Core.Models;
|
|
||||||
using Squirrowse.Core.Services;
|
|
||||||
|
|
||||||
namespace Squirrowse.Client
|
namespace squirrowse.client
|
||||||
{
|
{
|
||||||
public class Worker : IHostedService
|
public class Worker : IHostedService
|
||||||
{
|
{
|
||||||
private readonly IConnectionManager _connectionManager;
|
|
||||||
private readonly ILogger<Worker> logger;
|
private readonly ILogger<Worker> logger;
|
||||||
private readonly IActionDispatcher _actionDispatcher;
|
private readonly IConnectionManager _connectionManager;
|
||||||
public Worker(ILogger<Worker> logger, IConnectionManager connectionManager,IActionDispatcher act)
|
private Connection con =new Connection();
|
||||||
|
public Worker(ILogger<Worker> logger, IConnectionManager connectionManager)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
_connectionManager = connectionManager;
|
_connectionManager = connectionManager;
|
||||||
_actionDispatcher = act;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task StartAsync(CancellationToken cancellationToken)
|
public async Task StartAsync(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
while (true)
|
await _connectionManager.InitConnection();
|
||||||
|
|
||||||
|
//var d = _connectionManager.GetConnection();
|
||||||
|
if (_connectionManager.IsConnected())
|
||||||
{
|
{
|
||||||
try
|
var d =await _connectionManager.GetConnection();
|
||||||
{
|
await d.SendAsync("UploadStream", con.clientStreamData());
|
||||||
await _connectionManager.InitConnection(ConnectionType.Client);
|
|
||||||
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
await Task.Delay(1111);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// await Task.Delay(10000);//for debug
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task StopAsync(CancellationToken cancellationToken)
|
public async Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.0.0" />
|
<PackageReference Include="LiteDB" Version="5.0.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.1.1.20191021" />
|
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="6.0.0-dev.20190919.3" />
|
||||||
|
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||||
|
<PackageReference Include="OpenCvSharp4.runtime.ubuntu.18.04-x64" Version="4.2.0.20200208" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
<Router AppAssembly="@typeof(Program).Assembly">
|
<Router AppAssembly="@typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||||
</Found>
|
</Found>
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
<h1>Hello, world!</h1>
|
<h1>Hello, world!</h1>
|
||||||
|
|
||||||
Welcome to your new app.
|
Welcome to aws.
|
@ -1,22 +1,179 @@
|
|||||||
@page "/"
|
@page "/"
|
||||||
@namespace Squirrowse.Web.Pages
|
@namespace squirrowse.web.Pages
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<script src="jquery/jquery.js"></script>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<title>Squirrowse.Web</title>
|
<title>squirrowse.web</title>
|
||||||
<base href="~/"/>
|
<base href="~/"/>
|
||||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"/>
|
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"/>
|
||||||
|
<link rel="stylesheet" href="lib/lightgallery/css/lightgallery.css"/>
|
||||||
<link href="css/site.css" rel="stylesheet"/>
|
<link href="css/site.css" rel="stylesheet"/>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
|
||||||
|
.demo-gallery > ul { margin-bottom: 0; }
|
||||||
|
|
||||||
|
.demo-gallery > ul > li {
|
||||||
|
float: left;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a {
|
||||||
|
border: 3px solid #FFF;
|
||||||
|
border-radius: 3px;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mostly-customized-scrollbar::-webkit-scrollbar {
|
||||||
|
background-color: #aaa; /* or add it to the track */
|
||||||
|
height: 8px;
|
||||||
|
overflow: auto;
|
||||||
|
width: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a > img {
|
||||||
|
-moz-transition: -moz-transform 0.15s ease 0s;
|
||||||
|
-o-transition: -o-transform 0.15s ease 0s;
|
||||||
|
-webkit-transform: scale3d(1, 1, 1);
|
||||||
|
-webkit-transition: -webkit-transform 0.15s ease 0s;
|
||||||
|
height: 100%;
|
||||||
|
transform: scale3d(1, 1, 1);
|
||||||
|
transition: transform 0.15s ease 0s;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a:hover > img {
|
||||||
|
-webkit-transform: scale3d(1.1, 1.1, 1.1);
|
||||||
|
transform: scale3d(1.1, 1.1, 1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a:hover .demo-gallery-poster > img { opacity: 1; }
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a .demo-gallery-poster {
|
||||||
|
-o-transition: background-color 0.15s ease 0s;
|
||||||
|
-webkit-transition: background-color 0.15s ease 0s;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
transition: background-color 0.15s ease 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a .demo-gallery-poster > img {
|
||||||
|
-o-transition: opacity 0.3s ease 0s;
|
||||||
|
-webkit-transition: opacity 0.3s ease 0s;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -10px;
|
||||||
|
margin-top: -10px;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transition: opacity 0.3s ease 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery > ul > li a:hover .demo-gallery-poster { background-color: rgba(0, 0, 0, 0.5); }
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a > img {
|
||||||
|
-moz-transition: -moz-transform 0.15s ease 0s;
|
||||||
|
-o-transition: -o-transform 0.15s ease 0s;
|
||||||
|
-webkit-transform: scale3d(1, 1, 1);
|
||||||
|
-webkit-transition: -webkit-transform 0.15s ease 0s;
|
||||||
|
height: 100%;
|
||||||
|
transform: scale3d(1, 1, 1);
|
||||||
|
transition: transform 0.15s ease 0s;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a:hover > img {
|
||||||
|
-webkit-transform: scale3d(1.1, 1.1, 1.1);
|
||||||
|
transform: scale3d(1.1, 1.1, 1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a:hover .demo-gallery-poster > img { opacity: 1; }
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a .demo-gallery-poster {
|
||||||
|
-o-transition: background-color 0.15s ease 0s;
|
||||||
|
-webkit-transition: background-color 0.15s ease 0s;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
transition: background-color 0.15s ease 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a .demo-gallery-poster > img {
|
||||||
|
-o-transition: opacity 0.3s ease 0s;
|
||||||
|
-webkit-transition: opacity 0.3s ease 0s;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -10px;
|
||||||
|
margin-top: -10px;
|
||||||
|
opacity: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transition: opacity 0.3s ease 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery .justified-gallery > a:hover .demo-gallery-poster { background-color: rgba(0, 0, 0, 0.5); }
|
||||||
|
|
||||||
|
.demo-gallery .video .demo-gallery-poster img {
|
||||||
|
height: 48px;
|
||||||
|
margin-left: -24px;
|
||||||
|
margin-top: -24px;
|
||||||
|
opacity: 0.8;
|
||||||
|
width: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-gallery.dark > ul > li a { border: 3px solid #04070a; }
|
||||||
|
|
||||||
|
.home .demo-gallery { padding-bottom: 80px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app>
|
<app>
|
||||||
@(await Html.RenderComponentAsync<App>(RenderMode.ServerPrerendered))
|
<component type="typeof(App)" render-mode="ServerPrerendered"/>
|
||||||
</app>
|
</app>
|
||||||
|
|
||||||
|
<div id="blazor-error-ui">
|
||||||
|
<environment include="Staging,Production">
|
||||||
|
An error has occurred. This application may no longer respond until reloaded.
|
||||||
|
</environment>
|
||||||
|
<environment include="Development">
|
||||||
|
An unhandled exception has occurred. See browser dev tools for details.
|
||||||
|
</environment>
|
||||||
|
<a href="" class="reload">Reload</a>
|
||||||
|
<a class="dismiss">🗙</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="lib/lightgallery/js/lightgallery-all.js"></script>
|
||||||
<script src="_framework/blazor.server.js"></script>
|
<script src="_framework/blazor.server.js"></script>
|
||||||
|
<script>
|
||||||
|
function galeryJs() {
|
||||||
|
|
||||||
|
$('.lgalery').lightGallery();
|
||||||
|
};
|
||||||
|
|
||||||
|
function colapseD() {
|
||||||
|
$('.collapse').collapse();
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
namespace Squirrowse.Web
|
namespace squirrowse.web
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
@ -13,7 +13,7 @@ namespace Squirrowse.Web
|
|||||||
public static IHostBuilder CreateHostBuilder(string[] args)
|
public static IHostBuilder CreateHostBuilder(string[] args)
|
||||||
{
|
{
|
||||||
return Host.CreateDefaultBuilder(args)
|
return Host.CreateDefaultBuilder(args)
|
||||||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
|
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>().UseUrls("http://0.0.0.0:5000"); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,8 +3,8 @@
|
|||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:56422",
|
"applicationUrl": "http://192.168.0.13:8000",
|
||||||
"sslPort": 44381
|
"sslPort": 443
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profiles": {
|
"profiles": {
|
||||||
@ -15,13 +15,21 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Squirrowse.Web": {
|
"squirrowse.web": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "https://localhost:5003;http://localhost:5002",
|
"useSSL": true,
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
},
|
||||||
|
"applicationUrl": "http://192.168.0.13:8000"
|
||||||
|
},
|
||||||
|
"Docker": {
|
||||||
|
"commandName": "Docker",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||||
|
"publishAllPorts": true,
|
||||||
|
"useSSL": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
<a href="https://docs.microsoft.com/en-us/aspnet/" target="_blank">About</a>
|
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content px-4">
|
<div class="content px-4">
|
||||||
|
@ -1,33 +1,38 @@
|
|||||||
<div class="top-row pl-4 navbar navbar-dark">
|
<div class="top-row pl-4 navbar navbar-dark">
|
||||||
<a class="navbar-brand" href="">Squirrowse.Web</a>
|
<a class="navbar-brand" href="">squirrowse.web</a>
|
||||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<li class="nav-item px-3">
|
<li class="nav-item px-3">
|
||||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||||
<span class="oi oi-home" aria-hidden="true"></span> Home
|
<span class="oi oi-home" aria-hidden="true"></span> Home
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item px-3">
|
<li class="nav-item px-3">
|
||||||
<NavLink class="nav-link" href="Hub">
|
<NavLink class="nav-link" href="client">
|
||||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Stream
|
<span class="oi oi-list-rich" aria-hidden="true"></span> Client
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<li class="nav-item px-3">
|
||||||
</div>
|
<NavLink class="nav-link" href="galery">
|
||||||
|
<span class="oi oi-list-rich" aria-hidden="true"></span> Galery
|
||||||
|
</NavLink>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
bool collapseNavMenu = true;
|
private bool collapseNavMenu = true;
|
||||||
|
|
||||||
string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||||
|
|
||||||
void ToggleNavMenu()
|
private void ToggleNavMenu()
|
||||||
{
|
{
|
||||||
collapseNavMenu = !collapseNavMenu;
|
collapseNavMenu = !collapseNavMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,22 +1,44 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<StartupObject>Squirrowse.Web.Program</StartupObject>
|
<UserSecretsId>e06d99cb-4df6-41f0-8639-cd34df940830</UserSecretsId>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Squirrowse.Core\Squirrowse.Core.csproj" />
|
<PackageReference Include="CNTK.Deps.OpenCV.Zip" Version="2.8.0-rc0.dev20200201" />
|
||||||
|
<PackageReference Include="DevExpress.Blazor" Version="19.2.4-preview" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||||
|
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="6.0.0-dev.20190919.3" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
|
||||||
|
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||||
|
<PackageReference Include="OpenCvSharp4.runtime.ubuntu.18.04-x64" Version="4.2.0.20200208" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Update="appsettings.json">
|
<ProjectReference Include="..\squirrowse.core\squirrowse.core.csproj" />
|
||||||
|
<ProjectReference Include="..\squirrowse.db\squirrowse.db.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="StaticFiles\haarcascade_frontalface_alt.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</None>
|
||||||
|
<None Update="StaticFiles\haarcascade_lowerbody.xml">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Update="StaticFiles\haarcascade_upperbody.xml">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ProjectExtensions>
|
||||||
<Folder Include="Data\" />
|
<VisualStudio>
|
||||||
</ItemGroup>
|
<UserProperties appsettings_1development_1json__JsonSchema="http://json.schemastore.org/asmdef" />
|
||||||
|
</VisualStudio>
|
||||||
|
</ProjectExtensions>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -1,11 +1,15 @@
|
|||||||
|
using System;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Squirrowse.Core;
|
using squirrowse.db;
|
||||||
|
using squirrowse.web.Cognitive;
|
||||||
|
using squirrowse.web.Data;
|
||||||
|
|
||||||
namespace Squirrowse.Web
|
namespace squirrowse.web
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
@ -21,10 +25,20 @@ namespace Squirrowse.Web
|
|||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddRazorPages();
|
services.AddRazorPages();
|
||||||
|
services.AddServerSideBlazor().AddHubOptions(x =>
|
||||||
|
{
|
||||||
|
x.EnableDetailedErrors = true;
|
||||||
|
x.MaximumReceiveMessageSize = short.MaxValue;
|
||||||
|
});
|
||||||
|
|
||||||
services.AddServerSideBlazor().AddHubOptions(x => x.MaximumReceiveMessageSize = 102400000);
|
services.AddSingleton<SaveVideo>();
|
||||||
services.AddCoreModule();
|
services.AddSingleton<Detection>();
|
||||||
services.AddSignalR().AddMessagePackProtocol();
|
services.AddSingleton<IAzureCV, AzureCV>();
|
||||||
|
services.AddSingleton<DbContext>();
|
||||||
|
services.AddSingleton<GaleryService>();
|
||||||
|
services.AddSingleton<Bloob>();
|
||||||
|
services.AddSingleton<VideoQ>();
|
||||||
|
services.AddSignalR(x => x.MaximumReceiveMessageSize = ((int)(int.MaxValue / 2))).AddMessagePackProtocol();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
@ -41,15 +55,16 @@ namespace Squirrowse.Web
|
|||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UsePathBase(new PathString("/extra"));
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapBlazorHub();
|
endpoints.MapBlazorHub();
|
||||||
endpoints.MapFallbackToPage("/_Host");
|
endpoints.MapFallbackToPage("/_Host");
|
||||||
|
endpoints.MapHub<ClientHub>("hub");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
@using Microsoft.AspNetCore.Components.Routing
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
@using Squirrowse.Web
|
@using squirrowse.web
|
||||||
@using Squirrowse.Web.Shared
|
@using squirrowse.web.Shared
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"DetailedErrors": true,
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Debug",
|
"Default": "Information",
|
||||||
"System": "Information",
|
"Microsoft": "Warning",
|
||||||
"Microsoft": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,7 +30,15 @@ app {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main .top-row > a { margin-left: 1.5rem; }
|
.main .top-row > a, .main .top-row .btn-link {
|
||||||
|
margin-left: 1.5rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .top-row a:first-child {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar { background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); }
|
.sidebar { background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); }
|
||||||
|
|
||||||
@ -45,16 +53,16 @@ app {
|
|||||||
width: 2rem;
|
width: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item {
|
.sidebar .nav-item {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item:first-of-type { padding-top: 1rem; }
|
.sidebar .nav-item:first-of-type { padding-top: 1rem; }
|
||||||
|
|
||||||
.nav-item:last-of-type { padding-bottom: 1rem; }
|
.sidebar .nav-item:last-of-type { padding-bottom: 1rem; }
|
||||||
|
|
||||||
.nav-item a {
|
.sidebar .nav-item a {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: #d7d7d7;
|
color: #d7d7d7;
|
||||||
@ -63,12 +71,12 @@ app {
|
|||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item a.active {
|
.sidebar .nav-item a.active {
|
||||||
background-color: rgba(255, 255, 255, 0.25);
|
background-color: rgba(255, 255, 255, 0.25);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item a:hover {
|
.sidebar .nav-item a:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.1);
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@ -83,8 +91,31 @@ app {
|
|||||||
|
|
||||||
.validation-message { color: red; }
|
.validation-message { color: red; }
|
||||||
|
|
||||||
|
#blazor-error-ui {
|
||||||
|
background: lightyellow;
|
||||||
|
bottom: 0;
|
||||||
|
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
display: none;
|
||||||
|
left: 0;
|
||||||
|
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#blazor-error-ui .dismiss {
|
||||||
|
cursor: pointer;
|
||||||
|
position: absolute;
|
||||||
|
right: 0.75rem;
|
||||||
|
top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
.main .top-row { display: none; }
|
.main .top-row:not(.auth) { display: none; }
|
||||||
|
|
||||||
|
.main .top-row.auth { justify-content: space-between; }
|
||||||
|
|
||||||
|
.main .top-row a, .main .top-row .btn-link { margin-left: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
|
@ -1,22 +1,15 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.29411.108
|
VisualStudioVersion = 16.0.29806.167
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Service", "Squirrowse.Service\Squirrowse.Service.csproj", "{8C085621-BAAA-4E96-B027-561BC18751EE}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.web", "squirrowse.web\squirrowse.web.csproj", "{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Client", "Squirrowse.Client\Squirrowse.Client.csproj", "{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.db", "squirrowse.db\squirrowse.db.csproj", "{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Core", "Squirrowse.Core\Squirrowse.Core.csproj", "{D0989FCC-484E-4ADB-BA5E-1020894F9C09}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.core", "squirrowse.core\squirrowse.core.csproj", "{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BB569A06-F4D1-4927-87AB-86C4BD2AFBC5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "squirrowse.client", "squirrowse.client\squirrowse.client.csproj", "{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}"
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Core.Tests", "Squirrowse.Core.Tests\Squirrowse.Core.Tests.csproj", "{CFA96677-EAA7-4871-AAD8-E6336973366F}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squirrowse.Web", "Squirrowse.Web\Squirrowse.Web.csproj", "{5FEF6EDF-3327-48B1-9298-26A24D023924}"
|
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09} = {D0989FCC-484E-4ADB-BA5E-1020894F9C09}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -24,34 +17,27 @@ Global
|
|||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Release|Any CPU.Build.0 = Release|Any CPU
|
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{CFA96677-EAA7-4871-AAD8-E6336973366F} = {BB569A06-F4D1-4927-87AB-86C4BD2AFBC5}
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {1CC5C3B8-3825-4EB5-ACFF-73B4CAC8945D}
|
SolutionGuid = {8CE6F2C5-E801-4DB6-8A77-7CA7DB88E070}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
Loading…
Reference in New Issue
Block a user