From a87134f5cad67650b3e61c7c22ff67fdd0f8514e Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 4 May 2024 13:39:19 +0100 Subject: [PATCH] Move chart rendering to SSR. --- Aaru.Server.New/Components/Pages/Stats.razor.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Aaru.Server.New/Components/Pages/Stats.razor.cs b/Aaru.Server.New/Components/Pages/Stats.razor.cs index 2b044741..61828327 100644 --- a/Aaru.Server.New/Components/Pages/Stats.razor.cs +++ b/Aaru.Server.New/Components/Pages/Stats.razor.cs @@ -38,7 +38,6 @@ public partial class Stats PieChart? _formatsChart; List _formatsCounts = []; string[] _formatsLabels = []; - bool _isAlreadyInitialised; PieChart? _linuxChart; List _linuxCounts = []; string[] _linuxLabels = []; @@ -495,13 +494,8 @@ public partial class Stats _devicesByManufacturerLabels[9] = "Other"; _devicesByManufacturerCounts[9] = data.Sum(static o => o.Count) - _devicesByManufacturerCounts.Take(9).Sum(); - } #pragma warning disable CS8604 // Possible null reference argument. - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if(_isAlreadyInitialised) return; - _isAlreadyInitialised = true; await Task.WhenAll(HandleRedraw(_operatingSystemsChart, _operatingSystemLabels, GetOperatingSystemsChartDataset),