@@ -19,18 +19,17 @@ import { formatLongName, Nullable, setTitle } from 'uiSrc/utils'
1919import { setLastPageContext } from 'uiSrc/slices/app/context'
2020import { PageNames } from 'uiSrc/constants'
2121import { Loader } from 'uiSrc/components/base/display'
22- import { IRdiStatistics , RdiPipelineStatus } from 'uiSrc/slices/interfaces'
22+ import { type IRdiStatistics , RdiPipelineStatus } from 'uiSrc/slices/interfaces'
2323
24+ import { FlexItem , Row } from 'uiSrc/components/base/layout/flex'
25+ import { AutoRefresh } from 'uiSrc/components'
2426import Clients from './clients'
2527import DataStreams from './data-streams'
2628import Empty from './empty'
2729import ProcessingPerformance from './processing-performance'
2830import Status from './status'
2931import TargetConnections from './target-connections'
30-
31- import styles from './styles.module.scss'
32- import { Col , FlexItem , Row } from 'uiSrc/components/base/layout/flex'
33- import { AutoRefresh } from 'uiSrc/components'
32+ import * as S from './StatisticsPage.styles'
3433
3534const shouldShowStatistics = ( data : Nullable < IRdiStatistics > ) =>
3635 data ?. status === RdiPipelineStatus . Success && ! ! data ?. data
@@ -123,60 +122,61 @@ const StatisticsPage = () => {
123122
124123 const { data : statisticsData } = statisticsResults
125124
126-
127125 return (
128- < div className = { styles . pageContainer } >
129- < Col gap = "xxl" style = { { padding : 16 } } >
126+ < S . Container >
127+ < S . ContentWrapper gap = "xxl" >
130128 { pageLoading && (
131- < div className = { styles . cover } >
129+ < S . LoadingState centered >
132130 < Loader size = "xl" />
133- </ div >
131+ </ S . LoadingState >
134132 ) }
135133 { ! shouldShowStatistics ( statisticsResults ) ? (
136134 // TODO add loader
137135 < Empty rdiInstanceId = { rdiInstanceId } />
138136 ) : (
139- < >
140- < Row justify = "end" >
141- < FlexItem >
142- < AutoRefresh
143- postfix = "processing-performance-info"
144- displayText
145- loading = { isStatisticsLoading }
146- lastRefreshTime = { lastRefreshTime }
147- enableAutoRefreshDefault
148- testid = "processing-performance-info"
149- onRefresh = { ( ) => {
150- setLastRefreshTime ( Date . now ( ) )
151- onRefresh ( 'processing_performance' )
152- } }
153- onRefreshClicked = { ( ) =>
154- onRefreshClicked ( 'processing_performance' )
155- }
156- onEnableAutoRefresh = { (
157- enableAutoRefresh : boolean ,
158- refreshRate : string ,
159- ) =>
160- onChangeAutoRefresh (
161- 'processing_performance' ,
162- enableAutoRefresh ,
163- refreshRate ,
164- )
165- }
166- />
167- </ FlexItem >
168- </ Row >
169- < Status data = { statisticsData . rdiPipelineStatus } />
170- < ProcessingPerformance
171- data = { statisticsData . processingPerformance }
172- />
173- < TargetConnections data = { statisticsData . connections } />
174- < DataStreams data = { statisticsData . dataStreams } />
175- < Clients data = { statisticsData . clients } />
176- </ >
137+ ! pageLoading && (
138+ < >
139+ < Row justify = "end" >
140+ < FlexItem >
141+ < AutoRefresh
142+ postfix = "processing-performance-info"
143+ displayText
144+ loading = { isStatisticsLoading }
145+ lastRefreshTime = { lastRefreshTime }
146+ enableAutoRefreshDefault
147+ testid = "processing-performance-info"
148+ onRefresh = { ( ) => {
149+ setLastRefreshTime ( Date . now ( ) )
150+ onRefresh ( 'processing_performance' )
151+ } }
152+ onRefreshClicked = { ( ) =>
153+ onRefreshClicked ( 'processing_performance' )
154+ }
155+ onEnableAutoRefresh = { (
156+ enableAutoRefresh : boolean ,
157+ refreshRate : string ,
158+ ) =>
159+ onChangeAutoRefresh (
160+ 'processing_performance' ,
161+ enableAutoRefresh ,
162+ refreshRate ,
163+ )
164+ }
165+ />
166+ </ FlexItem >
167+ </ Row >
168+ < Status data = { statisticsData . rdiPipelineStatus } />
169+ < ProcessingPerformance
170+ data = { statisticsData . processingPerformance }
171+ />
172+ < TargetConnections data = { statisticsData . connections } />
173+ < DataStreams data = { statisticsData . dataStreams } />
174+ < Clients data = { statisticsData . clients } />
175+ </ >
176+ )
177177 ) }
178- </ Col >
179- </ div >
178+ </ S . ContentWrapper >
179+ </ S . Container >
180180 )
181181}
182182
0 commit comments