112 lines
4.5 KiB
Plaintext
112 lines
4.5 KiB
Plaintext
@using LucideBlazor
|
|
@using Moonlight.Shared.Http.Responses.Admin
|
|
@using ShadcnBlazor.Cards
|
|
@using ShadcnBlazor.Emptys
|
|
@using ShadcnBlazor.Buttons
|
|
@using ShadcnBlazor.Extras.Common
|
|
@using ShadcnBlazor.Fields
|
|
@using ShadcnBlazor.Selects
|
|
|
|
@inject HttpClient HttpClient
|
|
|
|
<div class="mt-5">
|
|
<LazyLoader Load="LoadAsync">
|
|
@if (StatusDto.IsEnabled)
|
|
{
|
|
if (StatusDto.IsReachable)
|
|
{
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-5">
|
|
<Card ClassName="col-span-1">
|
|
<CardHeader>
|
|
<CardTitle>Version</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<FieldGroup>
|
|
<FieldSet>
|
|
<FieldLegend>Update instance</FieldLegend>
|
|
<FieldDescription>
|
|
Select the version you want to update to
|
|
</FieldDescription>
|
|
<Field>
|
|
<FieldLabel>
|
|
Version
|
|
</FieldLabel>
|
|
<Select DefaultValue="Testy">
|
|
<SelectTrigger>
|
|
<SelectValue/>
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectItem Value="Testy">Testy</SelectItem>
|
|
</SelectContent>
|
|
</Select>
|
|
</Field>
|
|
</FieldSet>
|
|
<Field Orientation="FieldOrientation.Horizontal">
|
|
<Button>Apply</Button>
|
|
</Field>
|
|
</FieldGroup>
|
|
</CardContent>
|
|
</Card>
|
|
<Card ClassName="col-span-1">
|
|
<CardHeader>
|
|
<CardTitle>Plugins</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<Empty>
|
|
<EmptyHeader>
|
|
<EmptyMedia Variant="EmptyMediaVariant.Icon">
|
|
<SearchIcon />
|
|
</EmptyMedia>
|
|
<EmptyTitle>No Plugins found</EmptyTitle>
|
|
<EmptyDescription>
|
|
No plugins found in instance configuration
|
|
</EmptyDescription>
|
|
</EmptyHeader>
|
|
</Empty>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<Empty>
|
|
<EmptyHeader>
|
|
<EmptyMedia Variant="EmptyMediaVariant.Icon">
|
|
<CircleAlertIcon ClassName="text-red-500"/>
|
|
</EmptyMedia>
|
|
<EmptyTitle>Container Helper unreachable</EmptyTitle>
|
|
<EmptyDescription>
|
|
The container helper is unreachable. No management actions are available
|
|
</EmptyDescription>
|
|
</EmptyHeader>
|
|
</Empty>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<Empty>
|
|
<EmptyHeader>
|
|
<EmptyMedia Variant="EmptyMediaVariant.Icon">
|
|
<ToggleLeftIcon/>
|
|
</EmptyMedia>
|
|
<EmptyTitle>Container Helper is disabled</EmptyTitle>
|
|
<EmptyDescription>
|
|
The container helper is disabled on this instance.
|
|
This might be due to running a multiple container moonlight setup
|
|
</EmptyDescription>
|
|
</EmptyHeader>
|
|
</Empty>
|
|
}
|
|
</LazyLoader>
|
|
</div>
|
|
|
|
@code
|
|
{
|
|
private ContainerHelperStatusDto StatusDto;
|
|
|
|
private async Task LoadAsync(LazyLoader _)
|
|
{
|
|
StatusDto = (await HttpClient.GetFromJsonAsync<ContainerHelperStatusDto>("api/admin/ch/status"))!;
|
|
}
|
|
}
|