initial commit

This commit is contained in:
2026-07-21 14:08:10 +07:00
commit f7cf118326
533 changed files with 41762 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
@page "/serilogs"
@using Microsoft.AspNetCore.Authorization
@using Indotalent.Infrastructure.Authorization.Identity
@attribute [Authorize(Roles = ApplicationRoles.Admin)]
@using Indotalent.Features.Serilogs.Database
@using Indotalent.Features.Serilogs.Database.Components
@using Indotalent.Features.Serilogs.File
@using Indotalent.Features.Serilogs.File.Components
@using MudBlazor
@inject NavigationManager NavigationManager
<style>
.clean-white-tabs .mud-tabs-toolbar {
background-color: white !important;
border-bottom: 2px solid #DCEBFA;
border-radius: 0px !important;
}
.clean-white-tabs .mud-tab {
color: #94a3b8 !important;
text-transform: none;
font-weight: 500;
min-width: 160px;
border-radius: 0px !important;
}
.clean-white-tabs .mud-tab-active {
color: var(--mud-palette-primary) !important;
font-weight: 800;
}
.clean-white-tabs .mud-tabs-slider {
background-color: var(--mud-palette-primary) !important;
height: 3px !important;
bottom: 0;
}
</style>
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-2 mb-8">
<div class="clean-white-tabs">
<MudTabs Elevation="0"
ActivePanelIndex="@_activeTabIndex"
ActivePanelIndexChanged="OnTabChanged"
ApplyEffectsToContainer="true"
TabPanelsClass="pt-4">
<MudTabPanel Text="Database Logs" Icon="@Icons.Material.Outlined.Storage">
<DatabasePage />
</MudTabPanel>
<MudTabPanel Text="File Logs" Icon="@Icons.Material.Outlined.FolderZip">
<FilePage />
</MudTabPanel>
</MudTabs>
</div>
</MudContainer>
@code {
private int _activeTabIndex = 0;
protected override void OnInitialized()
{
var uri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri);
if (Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(uri.Query).TryGetValue("tab", out var tabValue))
{
_activeTabIndex = tabValue.ToString().ToLower() switch
{
"database" => 0,
"file" => 1,
_ => 0
};
}
}
private void OnTabChanged(int index)
{
_activeTabIndex = index;
string tabName = index switch
{
0 => "database",
1 => "file",
_ => "database"
};
NavigationManager.NavigateTo($"/serilogs?tab={tabName}", replace: false);
}
}