@namespace Oqtane.Modules.Admin.SystemInfo @inherits ModuleBase @inject ISystemService SystemService @inject IInstallationService InstallationService @inject IStringLocalizer Localizer
@Localizer["Access Framework API"]  @code { public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host; private string _version = string.Empty; private string _runtime = string.Empty; private string _clrversion = string.Empty; private string _osversion = string.Empty; private string _serverpath = string.Empty; private string _servertime = string.Empty; protected override async Task OnInitializedAsync() { _version = Constants.Version; _runtime = PageState.Runtime.ToString(); Dictionary systeminfo = await SystemService.GetSystemInfoAsync(); if (systeminfo != null) { _clrversion = systeminfo["clrversion"]; _osversion = systeminfo["osversion"]; _serverpath = systeminfo["serverpath"]; _servertime = systeminfo["servertime"]; } } private async Task RestartApplication() { try { ShowProgressIndicator(); var interop = new Interop(JSRuntime); await interop.RedirectBrowser(NavigateUrl(""), 10); await InstallationService.RestartAsync(); } catch (Exception ex) { await logger.LogError(ex, "Error Restarting Application"); } } }