File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
thingconnect.pulse.client/src Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,25 @@ export function AvailabilityChart({
2424 height = 300 ,
2525 isLoading,
2626} : AvailabilityChartProps ) {
27+ if ( isLoading ) {
28+ return (
29+ < Box
30+ height = '100%'
31+ display = 'flex'
32+ alignItems = 'center'
33+ justifyContent = 'center'
34+ borderRadius = 'md'
35+ borderWidth = '1px'
36+ bg = 'gray.50'
37+ _dark = { { bg : 'gray.800' } }
38+ >
39+ < VStack w = 'full' px = { 6 } gap = { 4 } >
40+ < Skeleton height = '100%' width = '100%' />
41+ </ VStack >
42+ </ Box >
43+ ) ;
44+ }
45+
2746 const chartData = useMemo ( ( ) => {
2847 if ( ! data ) return null ;
2948 switch ( bucket ) {
@@ -105,7 +124,6 @@ export function AvailabilityChart({
105124 const chartHeight = Math . max ( dimensions . height - margin . top - margin . bottom , 0 ) ;
106125
107126 return (
108- // <Skeleton loading={isLoading} w='full' h='full' position='relative'>
109127 < Box ref = { containerRef } flex = { 1 } minH = { 0 } w = 'full' h = 'full' position = 'relative' >
110128 < svg
111129 width = '100%'
@@ -175,6 +193,5 @@ export function AvailabilityChart({
175193 </ g >
176194 </ svg >
177195 </ Box >
178- // </Skeleton>
179196 ) ;
180197}
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ export default function History() {
262262 { /* History Data */ }
263263 { selectedEndpoint ? (
264264 < >
265- < PageSection title = 'Performance Summary' collapsible = { true } testId = 'availability-stats' >
265+ < PageSection title = 'Performance Summary' testId = 'availability-stats' >
266266 < AvailabilityStats
267267 data = { historyData }
268268 bucket = { bucket }
You can’t perform that action at this time.
0 commit comments