2023-09-21 18:58:32 +02:00
|
|
|
@using MongoDB.Bson;
|
|
|
|
|
|
|
|
|
|
<MudDrawer @bind-Open="_visible" Anchor="Anchor.End" Elevation="0" Variant="@DrawerVariant.Temporary" ClipMode="DrawerClipMode.Always" Width="400px" Style="max-width:auto;">
|
|
|
|
|
<MudDrawerHeader>
|
|
|
|
|
<MudText Typo="Typo.h6">
|
|
|
|
|
Host
|
|
|
|
|
</MudText>
|
|
|
|
|
</MudDrawerHeader>
|
|
|
|
|
<MudStack Class="px-6">
|
2023-11-17 17:12:41 +01:00
|
|
|
@if (_model is not null)
|
2023-09-21 18:58:32 +02:00
|
|
|
{
|
2023-11-17 17:12:41 +01:00
|
|
|
@if (_model.Hosts is not null && _model.Hosts.Any())
|
2023-09-21 18:58:32 +02:00
|
|
|
{
|
|
|
|
|
<MudStack Justify="Justify.Center">
|
2023-11-17 17:12:41 +01:00
|
|
|
<MudButton Href="@Navigation.Management.Hosts.DetailsHref(_model?.Hosts?.FirstOrDefault()?.Id)" Variant="Variant.Filled" Size="Size.Large" Color="Color.Info" DisableElevation="true">
|
2023-09-21 18:58:32 +02:00
|
|
|
Select
|
|
|
|
|
</MudButton>
|
|
|
|
|
<MudButton OnClick="UnassignAsync" Variant="Variant.Filled" DisableElevation Size="Size.Large" Color="Color.Error">
|
|
|
|
|
Unassign
|
|
|
|
|
</MudButton>
|
|
|
|
|
<MudButton OnClick="()=>_visible = false" Variant="Variant.Outlined" DisableElevation Size="Size.Large" Color="Color.Surface">
|
|
|
|
|
Cancel
|
|
|
|
|
</MudButton>
|
|
|
|
|
</MudStack>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudStack Justify="Justify.Center">
|
2023-11-17 17:12:41 +01:00
|
|
|
<MudButton Href="@Navigation.Management.Agents.HostAssingHref(_model.Id)" Variant="Variant.Filled" DisableElevation Size="Size.Large" Color="Color.Error">
|
2023-09-21 18:58:32 +02:00
|
|
|
Assign
|
|
|
|
|
</MudButton>
|
|
|
|
|
<MudButton OnClick="()=>_visible = false" Variant="Variant.Outlined" DisableElevation Size="Size.Large" Color="Color.Surface">
|
|
|
|
|
Cancel
|
|
|
|
|
</MudButton>
|
|
|
|
|
</MudStack>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</MudStack>
|
|
|
|
|
</MudDrawer>
|
|
|
|
|
|
|
|
|
|
@code {
|
|
|
|
|
private bool _visible;
|
|
|
|
|
}
|