Added new live statistics to navigation

This commit is contained in:
Marcel Baumgartner 2023-08-29 16:07:43 +02:00
parent 10c017932a
commit 5793bd9747
3 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,22 @@
<div class="card mb-5 mb-xl-10">
<div class="card-body pt-0 pb-0">
<ul class="nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bold">
<li class="nav-item mt-2">
<a class="nav-link text-active-primary ms-0 me-10 py-5 @(Index == 0 ? "active" : "")" href="/admin/statistics">
<TL>Overview</TL>
</a>
</li>
<li class="nav-item mt-2">
<a class="nav-link text-active-primary ms-0 me-10 py-5 @(Index == 1 ? "active" : "")" href="/admin/statistics/live">
<TL>Live data</TL>
</a>
</li>
</ul>
</div>
</div>
@code
{
[Parameter]
public int Index { get; set; } = 0;
}

View file

@ -6,13 +6,16 @@
@using ApexCharts
@using Moonlight.App.Helpers
@using Moonlight.App.Services
@using Moonlight.Shared.Components.Navigations
@inject StatisticsViewService StatisticsViewService
@inject SmartTranslateService SmartTranslateService
@attribute [PermissionRequired(nameof(Permissions.AdminStatistics))]
<div class="row mt-4 mb-2">
<AdminStatisticsNavigation />
<div class="row mb-2">
<div class="col-12 col-lg-6 col-xl">
<div class="card card-body">
<select class="form-select" @bind="TimeSpanBind">

View file

@ -5,6 +5,7 @@
@using Moonlight.App.Database.Entities
@using Moonlight.App.Helpers
@using Moonlight.App.Services.Sessions
@using Moonlight.Shared.Components.Navigations
@inject NodeService NodeService
@inject Repository<Node> NodeRepository
@ -12,6 +13,8 @@
@attribute [PermissionRequired(nameof(Permissions.AdminStatisticsLive))]
<AdminStatisticsNavigation />
<div class="row">
<div class="col-12 col-md-3 mb-3">
<div class="card">