From 5e16cc070fe6bc624beecaabfcd89396e1b67266 Mon Sep 17 00:00:00 2001 From: prestoncraw Date: Wed, 9 Sep 2026 10:23:07 -0400 Subject: [PATCH] Fix loading icon condition and add error alert when reqs fail --- .../DynamicMagDurChart/DynamicMagDurChart.tsx | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/TSX/CollectionWidget/DynamicMagDurChart/DynamicMagDurChart.tsx b/TSX/CollectionWidget/DynamicMagDurChart/DynamicMagDurChart.tsx index 7fcde6c..7dea86b 100644 --- a/TSX/CollectionWidget/DynamicMagDurChart/DynamicMagDurChart.tsx +++ b/TSX/CollectionWidget/DynamicMagDurChart/DynamicMagDurChart.tsx @@ -25,7 +25,7 @@ import { Application, Gemstone, OpenXDA } from '@gpa-gemstone/application-typing import { useGetContainerPosition } from '@gpa-gemstone/helper-functions'; import { Line, Plot, Circle, AggregatingCircles } from '@gpa-gemstone/react-graph'; import { CheckBox, Input } from '@gpa-gemstone/react-forms'; -import { GenericController, LoadingIcon } from '@gpa-gemstone/react-interactive'; +import { Alert, GenericController, LoadingIcon } from '@gpa-gemstone/react-interactive'; import * as React from 'react'; import { EventWidget } from '../../global'; import { DynamicEventSearchRow, FetchFallbackDynamicEventSearchData, IDynamicEventSearchQuery } from '../DynamicEventTable/DynamicEventSearchData'; @@ -220,9 +220,18 @@ const DynamicMagDurChart: EventWidget.ICollectionWidget + + {status === 'error' && magDurStatus === 'error' ? 'Error retrieving event data and magnitude duration curves.' : + status === 'error' ? 'Error retrieving event data.' : 'Error retrieving magnitude duration curves.'} + + + ) : null; + const content = ( - <> - +
+ - +
); if (!props.Settings.ShowCard) return ( -
+
+ {errorAlert} {content}
); @@ -278,7 +288,8 @@ const DynamicMagDurChart: EventWidget.ICollectionWidget {props.Title == null ? "Magnitude Duration Chart" : props.Title}
-
+
+ {errorAlert} {content}