74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Components;
|
|
using System.Net.Http;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
using Microsoft.AspNetCore.Components.Forms;
|
|
using Microsoft.AspNetCore.Components.Routing;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
|
using Microsoft.JSInterop;
|
|
using MP.Land;
|
|
using MP.Land.Shared;
|
|
using MP.AppAuth;
|
|
using MP.Land.Data;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace MP.Land.Pages
|
|
{
|
|
public partial class SysInfo : IDisposable
|
|
{
|
|
public void Dispose()
|
|
{
|
|
GC.Collect();
|
|
}
|
|
|
|
// imposto i vari dati da mostrare a video senza indicare come bypassare...
|
|
protected string Titolo = "MAPO System Info";
|
|
protected string Messaggio = "HW & SW details";
|
|
protected HwSwInfo currHwSwInfo = HwSwInfo.man(System.Reflection.Assembly.GetExecutingAssembly());
|
|
protected string masterLic = "";
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
AppMService.PageName = "System Info";
|
|
AppMService.PageIcon = "fas fa-wrench pe-2";
|
|
await ReloadData();
|
|
}
|
|
|
|
protected async Task ReloadData()
|
|
{
|
|
var akvList = await DataService.AnagKeyValList();
|
|
var licRecord = akvList.Where(x => x.NomeVar == "MAPO").FirstOrDefault();
|
|
if (licRecord != null)
|
|
{
|
|
masterLic = licRecord.ValString;
|
|
}
|
|
}
|
|
|
|
protected string DbNameExample
|
|
{
|
|
get
|
|
{
|
|
string answ = Configuration["ConnectionStrings:DefaultConnection"];
|
|
if (answ.IndexOf(";User ID=") > 0)
|
|
{
|
|
answ = answ.Substring(0, answ.IndexOf(";User ID="));
|
|
}
|
|
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
protected string Environment
|
|
{
|
|
get
|
|
{
|
|
string answ = Configuration["Environment"];
|
|
return answ;
|
|
}
|
|
}
|
|
}
|
|
} |