Only show available consoles under monitor if any exist

dhcp-server
Pat Hartl 2023-08-22 23:33:22 -05:00
parent 63a6296850
commit fcb4991364
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@
@if (Server != null && Server.Id != Guid.Empty) @if (Server != null && Server.Id != Guid.Empty)
{ {
<SubMenu Key="sub1" Title="Consoles"> <MenuItem RouterLink="@($"/Servers/{Server.Id}/Consoles")">Consoles</MenuItem>
<MenuItem Key="Edit" RouterLink="@($"/Servers/{Server.Id}/Consoles")">Edit</MenuItem> <SubMenu Key="Monitor" Title="Monitor" Disabled="@(Server.ServerConsoles == null || Server.ServerConsoles.Count == 0)">
@foreach (var log in Server.ServerConsoles) @foreach (var log in Server.ServerConsoles)
{ {
<MenuItem Key="@log.Id.ToString()" RouterLink="@($"/Servers/{Server.Id}/Consoles/{log.Id}")">@log.Name</MenuItem> <MenuItem Key="@log.Id.ToString()" RouterLink="@($"/Servers/{Server.Id}/Consoles/{log.Id}")">@log.Name</MenuItem>