diff --git a/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor b/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor index 58f2da0d..51d20313 100644 --- a/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor +++ b/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor @@ -23,7 +23,7 @@ + Size="Size.Small" Style="width: 80px;" OnClick="RefreshData" Disabled="@IsLoading"/> diff --git a/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor.cs b/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor.cs index f05352a2..2f33b5a0 100644 --- a/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor.cs +++ b/src/AzureOpenAIProxy.Management/Components/Pages/EventMetrics.razor.cs @@ -40,20 +40,15 @@ public partial class EventMetrics private async Task GetData() { - if (IsLoading) - { - return; - } - IsLoading = true; - (AttendeeCount, RequestCount) = MetricService.GetAttendeeMetricsAsync(EventId); List MetricsData = await MetricService.GetEventMetricsAsync(EventId); Event = await EventService.GetEventAsync(EventId); if (MetricsData is null) { + IsLoading = false; return; }