|
|
|
@ -33,15 +33,17 @@ namespace Platform
|
|
|
|
|
|
|
|
|
|
public override void ConfigureServices(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddMiniProfiler(o => {
|
|
|
|
|
services.AddMiniProfiler(o =>
|
|
|
|
|
{
|
|
|
|
|
o.RouteBasePath = "/profiler";// /profiler/results-index /profiler/results
|
|
|
|
|
o.ResultsAuthorize = o => {
|
|
|
|
|
o.ResultsAuthorize = o =>
|
|
|
|
|
{
|
|
|
|
|
return Configuration.GetAppSetting("Profiler", false) == true;
|
|
|
|
|
};
|
|
|
|
|
}).AddEntityFramework();
|
|
|
|
|
services.AddTransient<SceneTiggerService>();
|
|
|
|
|
services.AddTransient<ISceneTiggerService, CachedSceneTiggerService>();
|
|
|
|
|
services.AddTransient<IExecApiService,ExecApiService>();
|
|
|
|
|
services.AddTransient<IExecApiService, ExecApiService>();
|
|
|
|
|
services.AddTransient<IUserService, UserService>();
|
|
|
|
|
if (Env.IsDevelopment())
|
|
|
|
|
{
|
|
|
|
@ -88,7 +90,7 @@ namespace Platform
|
|
|
|
|
{
|
|
|
|
|
Authorization = new[] { new MyDashboardAuthorizationFilter() },
|
|
|
|
|
IsReadOnlyFunc = o => o.GetHttpContext().User.Identity.Name != "super",
|
|
|
|
|
DashboardTitle="定时任务看板"
|
|
|
|
|
DashboardTitle = "定时任务看板"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
app.UseHangfireDashboard("/job", options);
|
|
|
|
@ -106,7 +108,7 @@ namespace Platform
|
|
|
|
|
|
|
|
|
|
public override void ConfigureOptions(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
//services.ConfigureOptions(new FileConfigureOptions(Env, new List<string> { "IoT.Shared" }));
|
|
|
|
|
services.ConfigureOptions(new FileConfigureOptions(Env, new List<string> { }));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void UseSignalR(IEndpointRouteBuilder endpoints)
|
|
|
|
@ -119,4 +121,4 @@ namespace Platform
|
|
|
|
|
this.AddDbContext<PlatformDbContext>(services);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|