@@ -108,17 +108,16 @@ const GatewayStatusPanel = () => {
108108 const error = useSelector ( selectGatewayStatisticsError )
109109 const fetching = useSelector ( selectGatewayStatisticsIsFetching )
110110 const isDisconnected = Boolean ( gatewayStats ?. disconnected_at )
111- const isConnected = Boolean ( gatewayStats ?. connected_at ) && ! isDisconnected
112111 const isFetching = ! Boolean ( gatewayStats ) && fetching
113- const hasStatistics = Boolean ( gatewayStats )
114112 const noConnectionYet = useMemo (
115113 ( ) => isBackend ( error ) && getBackendErrorName ( error ) . includes ( 'not_connected' ) ,
116114 [ error ] ,
117115 )
116+ const hasStatistics = Boolean ( gatewayStats )
117+ const isConnected = Boolean ( gatewayStats ?. connected_at ) && ! isDisconnected && ! noConnectionYet
118118
119119 const hasError = Boolean ( error ) && Boolean ( error . message )
120- const isUnavailable = hasError && error . message === 'Unavailable' && ! fetching && ! gatewayStats
121- const isLoadingWithError = hasError && error . message === 'Unavailable' && ! gatewayStats
120+ const isUnavailable = hasError && error . message === 'Unavailable'
122121
123122 const maxRoundTripTime = useMemo (
124123 ( ) =>
@@ -156,7 +155,7 @@ const GatewayStatusPanel = () => {
156155 status = {
157156 isDisconnected
158157 ? 'bad'
159- : isFetching || noConnectionYet || isLoadingWithError
158+ : isFetching || noConnectionYet
160159 ? 'mediocre'
161160 : isConnected
162161 ? 'green'
@@ -191,15 +190,7 @@ const GatewayStatusPanel = () => {
191190 </ div >
192191 </ div >
193192 ) }
194- { isUnavailable && (
195- < div className = "d-flex j-center al-center flex-grow" >
196- < div className = "d-flex direction-column j-center al-center text-center w-60 gap-cs-m mb-ls-m" >
197- < Message content = { m . isUnavailable } className = "fw-bold fs-l lh-xs3" component = "div" />
198- < Message content = { m . isUnavailableDesc } className = "c-text-neutral-light lh-xxs" />
199- </ div >
200- </ div >
201- ) }
202- { hasStatistics && ! isFetching && ! noConnectionYet && ! isUnavailable && (
193+ { hasStatistics && ! isFetching && ! isUnavailable && (
203194 < >
204195 < div className = { style . gtwStatusPanelUpperContainer } >
205196 < div className = "d-flex direction-column j-between w-full sm-md:j-start" >
@@ -249,7 +240,7 @@ const GatewayStatusPanel = () => {
249240 </ div >
250241 </ >
251242 ) }
252- { ! hasStatistics && ! isFetching && ! noConnectionYet && ! isUnavailable && (
243+ { ( isUnavailable || ( ! hasStatistics && ! isFetching && ! noConnectionYet ) ) && (
253244 < EmptyState title = { m . isUnavailable } message = { m . isUnavailableDesc } />
254245 ) }
255246 </ Panel >
0 commit comments