Пример #1
0
 private void ToggleLogView()
 {
     if (_adminInfo is not null)
     {
         ShowWarning = !ShowWarning;
         Logs        = (ShowWarning ? _adminInfo.Logs : _adminInfo.Logs.Where(l => l.Level == "Error")).OrderByDescending(l => l.Timestamp).ToList();
         LogsTable.SetItems(Logs);
     }
 }
Пример #2
0
    private async Task ClearLogsAsync()
    {
        await AdminApi.ClearLogsAsync();

        await OnInitializedAsync();

        ToastService.DisplayToast("Logs vidés.", TimeSpan.FromSeconds(3), ToastType.Success, "clear-logs-admin", true);
        LogsTable.SetItems(Logs);
        ShowWarning = false;
    }