added system info admin page/module, improved UI for framework, module, and theme install/upgrade, added version to ModuleDefinitions, fixed bug in logging logic introduced during code standardization

This commit is contained in:
Shaun Walker
2020-04-20 18:05:37 -04:00
parent 62987ca72f
commit 72995cd8fa
14 changed files with 303 additions and 122 deletions

View File

@ -1,29 +1,38 @@
@namespace Oqtane.Modules.Admin.SystemInfo
@inherits ModuleBase
@inject ISystemService SystemService
<table class="table table-borderless">
<tr>
<td>
<Label For="version" HelpText="qtane Version">Oqtane Version: </Label>
<Label For="version" HelpText="Framework Version">Framework Version: </Label>
</td>
<td>
@_version
<input id="version" class="form-control" @bind="@_version" disabled />
</td>
</tr>
<tr>
<td>
<Label For="runtime" HelpText="Blazor Runtime">Blazor Runtime: </Label>
<Label For="runtime" HelpText="Blazor Runtime (Server or WebAssembly)">Blazor Runtime: </Label>
</td>
<td>
@_runtime
<input id="runtime" class="form-control" @bind="@_runtime" disabled />
</td>
</tr>
<tr>
<td>
<Label For="netcore" HelpText=".NET Core">.NET Core: </Label>
<Label For="clrversion" HelpText="Common Language Runtime Version">CLR Version: </Label>
</td>
<td>
@_netcore
<input id="clrversion" class="form-control" @bind="@_clrversion" disabled />
</td>
</tr>
<tr>
<td>
<Label For="osversion" HelpText="Operating System Version">OS Version: </Label>
</td>
<td>
<input id="osversion" class="form-control" @bind="@_osversion" disabled />
</td>
</tr>
<tr>
@ -31,7 +40,7 @@
<Label For="serverpath" HelpText="Server Path">Server Path: </Label>
</td>
<td>
@_serverpath
<input id="serverpath" class="form-control" @bind="@_serverpath" disabled />
</td>
</tr>
<tr>
@ -39,7 +48,7 @@
<Label For="servertime" HelpText="Server Time">Server Time: </Label>
</td>
<td>
@_servertime
<input id="servertime" class="form-control" @bind="@_servertime" disabled />
</td>
</tr>
</table>
@ -49,16 +58,23 @@
private string _version = string.Empty;
private string _runtime = string.Empty;
private string _netcore = string.Empty;
private string _clrversion = string.Empty;
private string _osversion = string.Empty;
private string _serverpath = string.Empty;
private string _servertime = string.Empty;
protected override void OnInitialized()
protected override async Task OnInitializedAsync()
{
_version = Constants.Version;
_runtime = PageState.Runtime.ToString();
_netcore = string.Empty;
_serverpath = string.Empty;
_servertime = string.Empty;
Dictionary<string, string> systeminfo = await SystemService.GetSystemInfoAsync();
if (systeminfo != null)
{
_clrversion = systeminfo["clrversion"];
_osversion = systeminfo["osversion"];
_serverpath = systeminfo["serverpath"];
_servertime = systeminfo["servertime"];
}
}
}