|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
using Hangfire;
|
|
|
|
|
using Application.Domain.Entities;
|
|
|
|
|
using Hangfire;
|
|
|
|
|
using Hangfire.LiteDB;
|
|
|
|
|
using Infrastructure.Data;
|
|
|
|
|
using Infrastructure.Email;
|
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
|
using Infrastructure.Web;
|
|
|
|
|
using IoT.Shared.Services;
|
|
|
|
|
using IoTNode.DeviceServices.FBee;
|
|
|
|
@ -10,9 +12,11 @@ using IoTNode.DeviceServices.SerialPortManager;
|
|
|
|
|
using IoTNode.Services;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace IoTNode
|
|
|
|
|
{
|
|
|
|
@ -47,6 +51,12 @@ namespace IoTNode
|
|
|
|
|
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
|
|
|
|
{
|
|
|
|
|
base.Configure(app, env, loggerFactory);
|
|
|
|
|
using var scope = app.ApplicationServices.CreateScope();
|
|
|
|
|
var services = scope.ServiceProvider;
|
|
|
|
|
var context = services.GetService<DbContext>();
|
|
|
|
|
var node = context.Set<Node>().FirstOrDefault();
|
|
|
|
|
node.Version = Helper.Instance.GetVersion();
|
|
|
|
|
context.SaveChanges();
|
|
|
|
|
|
|
|
|
|
var options = new DashboardOptions
|
|
|
|
|
{
|
|
|
|
|