From 325d10384fb0b794fa88352bb4fc3639101b7e49 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Wed, 8 Mar 2023 22:20:44 +0530 Subject: [PATCH] fix: TestCase expansion to see the results not intuitive #10186 (#10475) * fixed TestCase expansion to see the results not intuitive #10186 * missing translation key --- .../ProfilerDashboard/component/TestSummary.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx index 1420a6de87b..89ed603aa09 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/TestSummary.tsx @@ -66,6 +66,7 @@ const TestSummary: React.FC = ({ data }) => { const [selectedTimeRange, setSelectedTimeRange] = useState('last3days'); const [isLoading, setIsLoading] = useState(true); + const [isGraphLoading, setIsGraphLoading] = useState(true); const timeRangeOption = useMemo(() => { return Object.entries(PROFILER_FILTER_RANGE).map(([key, value]) => ({ @@ -135,7 +136,7 @@ const TestSummary: React.FC = ({ data }) => { if (isEmpty(data)) { return; } - + setIsGraphLoading(true); try { const startTs = getPastDatesTimeStampFromCurrentDate( PROFILER_FILTER_RANGE[selectedTimeRange].days @@ -156,6 +157,7 @@ const TestSummary: React.FC = ({ data }) => { showErrorToast(error as AxiosError); } finally { setIsLoading(false); + setIsGraphLoading(false); } }; @@ -223,7 +225,9 @@ const TestSummary: React.FC = ({ data }) => { /> - {results.length ? ( + {isGraphLoading ? ( + + ) : results.length ? (