add Environment to System Info
This commit is contained in:
parent
25155b1b38
commit
d05fba06ec
|
@ -37,6 +37,12 @@
|
|||
<div class="col-sm-9">
|
||||
<input id="ipaddress" class="form-control" @bind="@_ipaddress" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="environment" HelpText="Environment name" ResourceKey="Environment">Environment: </Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="environment" class="form-control" @bind="@_environment" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="contentrootpath" HelpText="Root Path" ResourceKey="ContentRootPath">Root Path: </Label>
|
||||
|
@ -152,6 +158,7 @@
|
|||
private string _osversion = string.Empty;
|
||||
private string _machinename = string.Empty;
|
||||
private string _ipaddress = string.Empty;
|
||||
private string _environment = string.Empty;
|
||||
private string _contentrootpath = string.Empty;
|
||||
private string _webrootpath = string.Empty;
|
||||
private string _servertime = string.Empty;
|
||||
|
@ -176,6 +183,7 @@
|
|||
_osversion = systeminfo["OSVersion"].ToString();
|
||||
_machinename = systeminfo["MachineName"].ToString();
|
||||
_ipaddress = systeminfo["IPAddress"].ToString();
|
||||
_environment = systeminfo["Environment"].ToString();
|
||||
_contentrootpath = systeminfo["ContentRootPath"].ToString();
|
||||
_webrootpath = systeminfo["WebRootPath"].ToString();
|
||||
_servertime = systeminfo["ServerTime"].ToString() + " UTC";
|
||||
|
|
|
@ -270,4 +270,10 @@
|
|||
<data name="WorkingSet.Text" xml:space="preserve">
|
||||
<value>Memory Allocation:</value>
|
||||
</data>
|
||||
<data name="Environment.HelpText" xml:space="preserve">
|
||||
<value>Environment Name</value>
|
||||
</data>
|
||||
<data name="Environment.Text" xml:space="preserve">
|
||||
<value>Environment:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -38,6 +38,7 @@ namespace Oqtane.Controllers
|
|||
systeminfo.Add("TickCount", Environment.TickCount64.ToString());
|
||||
systeminfo.Add("ContentRootPath", _environment.ContentRootPath);
|
||||
systeminfo.Add("WebRootPath", _environment.WebRootPath);
|
||||
systeminfo.Add("Environment", _environment.EnvironmentName);
|
||||
systeminfo.Add("ServerTime", DateTime.UtcNow.ToString());
|
||||
var feature = HttpContext.Features.Get<IHttpConnectionFeature>();
|
||||
systeminfo.Add("IPAddress", feature?.LocalIpAddress?.ToString());
|
||||
|
|
Loading…
Reference in New Issue
Block a user