Added some node ui

This commit is contained in:
Masu-Baumgartner
2024-09-03 16:54:33 +02:00
parent 278c8acf16
commit b86e867cff
4 changed files with 41 additions and 13 deletions

View File

@@ -5,8 +5,7 @@
@inject HttpApiClient HttpApiClient
<div class="rounded-lg border border-slate-700 bg-slate-700">
<SmartCrud TItem="DetailAllocationResponse"
<SmartCrud TItem="DetailAllocationResponse"
TCreateForm="CreateAllocationRequest"
TUpdateForm="UpdateAllocationRequest"
OnConfigure="OnConfigure">
@@ -15,8 +14,7 @@
<SmartColumn TItem="DetailAllocationResponse" Field="@(x => x.IpAddress)" Title="IP Address" />
<SmartColumn TItem="DetailAllocationResponse" Field="@(x => x.Port)" Title="Port" />
</View>
</SmartCrud>
</div>
</SmartCrud>
@code
{

View File

@@ -0,0 +1,14 @@
<div class="mt-5">
<div class="p-6 rounded-lg shadow bg-slate-800">
</div>
<div class="p-6 rounded-lg shadow bg-slate-800 font">
</div>
</div>
@code
{
[Parameter] public int NodeId { get; set; }
}

View File

@@ -0,0 +1,15 @@
<div class="mt-5 gap-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">
<StatCard Title="CPU Model" Text="AMD Ryzen 7 1700X Eight-Core Processor" Icon="bi bi-cpu"/>
<StatCard Title="CPU Usage" Text="24,19%" Icon="bi bi-speedometer2"/>
<StatCard Title="Memory Usage" Text="21.31 GB / 62.75 GB" Icon="bi bi-memory"/>
<StatCard Title="Host OS" Text="Arch Linux" Icon="bi bi-motherboard"/>
<StatCard Title="Uptime" Text="57d 2h 51m 50s" Icon="bi bi-clock-history"/>
<StatCard Title="Containers" Text="11" Icon="bi bi-box-seam"/>
<StatCard Title="Disk Usage" Text="318.84 GB / 904.12 GB" Icon="bi bi-hdd"/>
<StatCard Title="Version" Text="v2.1 - Galaxy (Release #1)" Icon="bi bi-tag"/>
</div>
@code
{
[Parameter] public int NodeId { get; set; }
}

View File

@@ -5,6 +5,7 @@
@using MoonlightServers.Client.UI.Components.Forms
@using MoonlightServers.Shared.Http.Requests.Admin.Nodes
@using MoonlightServers.Shared.Http.Responses.Admin.Nodes
@using MoonlightServers.Client.UI.Components.Partials
@inject HttpApiClient HttpApiClient
@@ -29,7 +30,7 @@
<DetailView>
<SmartTabs>
<SmartTab Name="Overview">
<h3 class="text-2xl text-blue-500">Overview owo</h3>
<NodeOverview NodeId="@context.Id" />
</SmartTab>
<SmartTab Name="Allocations">
<AllocationEditor NodeId="@context.Id" />