-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Computer Page performance improvements
Fix Search Results page clicking
- Loading branch information
Chris Jacobsen Work
committed
Nov 20, 2023
1 parent
4a481c4
commit b0997f7
Showing
10 changed files
with
258 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
@if (Computer.IsOnline == true) | ||
{ | ||
@if (Drives != null && Drives.Count > 0) | ||
{ | ||
<MudDataGrid Elevation=0 Items="Drives.Where(d=>d.DriveType==DriveType.Fixed)"> | ||
<Columns> | ||
<PropertyColumn Property="x=>x.DriveType" /> | ||
<PropertyColumn Property="x=>x.Letter" /> | ||
<TemplateColumn Title="Used"> | ||
<CellTemplate> | ||
<MudProgressLinear Style="height:25px;" Value="@context.Item.PercentUsed.Round(0)" | ||
Color="@(context.Item.PercentUsed<70?Color.Success:context.Item.PercentUsed<80?Color.Warning:Color.Error)"> | ||
@( | ||
context.Item.PercentUsed.Round(0).ToString() + "%" | ||
) | ||
</MudProgressLinear> | ||
</CellTemplate> | ||
</TemplateColumn> | ||
<TemplateColumn Title="Capacity"> | ||
<CellTemplate> | ||
@( | ||
context.Item.Capacity.Round(0).ToString() + "GB" | ||
) | ||
</CellTemplate> | ||
</TemplateColumn> | ||
<PropertyColumn Property="x=>x.FileSystem" /> | ||
<PropertyColumn Property="x=>x.Serial" /> | ||
</Columns> | ||
</MudDataGrid> | ||
|
||
} | ||
|
||
} | ||
else | ||
{ | ||
<MudText>Computer is not reachable.</MudText> | ||
} | ||
@code { | ||
[Parameter] | ||
public IADComputer Computer { get; set; } | ||
|
||
List<IADComputerDrive> Drives = new(); | ||
|
||
|
||
protected override void OnInitialized() | ||
{ | ||
|
||
Task.Run(async () => | ||
{ | ||
Drives = await Computer.GetDrivesAsync(); | ||
await InvokeAsync(StateHasChanged); | ||
|
||
}); | ||
|
||
|
||
base.OnInitialized(); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
@if (Computer.IsOnline == true) | ||
{ | ||
<LiveChart Enabled=@(Computer.IsOnline==true) SeriesName="CPU Usage" Title="Live CPU Usage" History="30" PollFunc="@(()=>{return Computer.Processor;})" /> | ||
<LiveChart Enabled=@(Computer.IsOnline==true) SeriesName="Memory Usage" Title="Live RAM Usage" History="30" PollFunc="@(()=>{return Computer.MemoryUsedPercent;})" /> | ||
|
||
} | ||
else | ||
{ | ||
<MudText>Computer is not reachable.</MudText> | ||
} | ||
|
||
|
||
@code { | ||
[Parameter] | ||
public IADComputer Computer { get; set; } | ||
} |
Oops, something went wrong.