56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
@using MP.MONO.Core
|
|
|
|
@page "/Info"
|
|
|
|
<PageTitle>Machine Info</PageTitle>
|
|
|
|
|
|
<h3>Machine Info <button class="btn btn-success" @onclick="() => ShowAll()"><i class="bi bi-arrow-down-circle-fill"></i></button></h3>
|
|
|
|
<div class="row">
|
|
<div class="col-4">
|
|
<DisplayInfo ParamName="CPU Info" currInfo="@cpuInfo" btnType="btn-primary" showSection="@showCpu"></DisplayInfo>
|
|
</div>
|
|
<div class="col-4">
|
|
<DisplayInfo ParamName="RAM Info" currInfo="@ramInfo" btnType="btn-primary" showSection="@showRam"></DisplayInfo>
|
|
<DisplayInfo ParamName="NET Info" currInfo="@netInfo" btnType="btn-dark" showSection="@showNet"></DisplayInfo>
|
|
</div>
|
|
<div class="col-4">
|
|
<DisplayInfo ParamName="OS Info" currInfo="@osInfo" btnType="btn-primary" showSection="@showOs"></DisplayInfo>
|
|
<DisplayInfo ParamName="BIOS Info" currInfo="@biosInfo" btnType="btn-dark" showSection="@showBios"></DisplayInfo>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
|
|
protected Dictionary<string, string> biosInfo = new Dictionary<string, string>();
|
|
protected Dictionary<string, string> cpuInfo = new Dictionary<string, string>();
|
|
protected Dictionary<string, string> netInfo = new Dictionary<string, string>();
|
|
protected Dictionary<string, string> osInfo = new Dictionary<string, string>();
|
|
protected Dictionary<string, string> ramInfo = new Dictionary<string, string>();
|
|
|
|
protected bool showBios = false;
|
|
protected bool showCpu = false;
|
|
protected bool showNet = false;
|
|
protected bool showOs = false;
|
|
protected bool showRam = false;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
biosInfo = await MachineInfo.GetBiosInfo();
|
|
cpuInfo = await MachineInfo.GetCpuInfo();
|
|
netInfo = await MachineInfo.GetNetInfo();
|
|
osInfo = await MachineInfo.GetOsInfo();
|
|
ramInfo = await MachineInfo.GetRamInfo();
|
|
}
|
|
|
|
protected void ShowAll()
|
|
{
|
|
showBios = true;
|
|
showCpu = true;
|
|
showNet = true;
|
|
showOs = true;
|
|
showRam = true;
|
|
}
|
|
}
|