File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright 2018-2023 contributors to the Marquez project
22// SPDX-License-Identifier: Apache-2.0
33
4- import { HEADER_HEIGHT } from '../../../helpers/theme'
54import Box from '@mui/material/Box'
65import CircularProgress from '@mui/material/CircularProgress/CircularProgress'
76import React , { ReactElement } from 'react'
87
98interface MqScreenLoadProps {
109 children ?: ReactElement
1110 loading : boolean
12- noHeader ?: boolean
11+ customHeight ?: string
1312}
1413
15- export const MqScreenLoad : React . FC < MqScreenLoadProps > = ( { loading, children, noHeader } ) => {
14+ export const MqScreenLoad : React . FC < MqScreenLoadProps > = ( { loading, children, customHeight } ) => {
1615 return loading || ! children ? (
1716 < Box
18- height = { noHeader ? 'calc(100vh)' : ` calc(100vh - ${ HEADER_HEIGHT } px)` }
17+ height = { customHeight ? customHeight : ' calc(100vh)' }
1918 display = { 'flex' }
2019 justifyContent = { 'center' }
2120 alignItems = { 'center' }
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ const DatasetDetailPage: FunctionComponent<IProps> = (props) => {
152152 < Box px = { 2 } >
153153 < Box
154154 position = { 'sticky' }
155- top = { '98px' }
155+ top = { 0 }
156156 bgcolor = { theme . palette . background . default }
157157 pt = { 2 }
158158 zIndex = { theme . zIndex . appBar }
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
112112 < Box px = { 2 } display = 'flex' flexDirection = 'column' justifyContent = 'space-between' >
113113 < Box
114114 position = { 'sticky' }
115- top = { '98px' }
115+ top = { 0 }
116116 bgcolor = { theme . palette . background . default }
117117 py = { 2 }
118118 zIndex = { theme . zIndex . appBar }
Original file line number Diff line number Diff line change @@ -90,10 +90,15 @@ const ColumnLevel: React.FC<ColumnLevelProps> = ({
9090 open = { ! ! searchParams . get ( 'dataset' ) }
9191 onClose = { ( ) => setSearchParams ( { } ) }
9292 PaperProps = { {
93- sx : { backgroundColor : theme . palette . background . default , backgroundImage : 'none' } ,
93+ sx : {
94+ backgroundColor : theme . palette . background . default ,
95+ backgroundImage : 'none' ,
96+ mt : '98px' ,
97+ height : 'calc(100vh - 98px)' ,
98+ } ,
9499 } }
95100 >
96- < Box sx = { { pt : '98px' } } >
101+ < Box >
97102 < ColumnLevelDrawer />
98103 </ Box >
99104 </ Drawer >
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const ColumnLevelDrawer = ({
5959 < Box width = { `${ WIDTH } px` } >
6060 < Box
6161 position = { 'sticky' }
62- top = { '98px' }
62+ top = { 0 }
6363 bgcolor = { theme . palette . background . default }
6464 pt = { 2 }
6565 zIndex = { theme . zIndex . appBar }
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515} from '@mui/material'
1616import { ChevronLeftRounded , ChevronRightRounded , Refresh } from '@mui/icons-material'
1717import { Dataset } from '../../types/api'
18+ import { HEADER_HEIGHT } from '../../helpers/theme'
1819import { IState } from '../../store/reducers'
1920import { MqScreenLoad } from '../../components/core/screen-load/MqScreenLoad'
2021import { Nullable } from '../../types/util/Nullable'
@@ -58,6 +59,7 @@ interface DispatchProps {
5859type DatasetsProps = StateProps & DispatchProps
5960
6061const PAGE_SIZE = 20
62+ const DATASET_HEADER_HEIGHT = 62
6163
6264const Datasets : React . FC < DatasetsProps > = ( {
6365 datasets,
@@ -129,7 +131,10 @@ const Datasets: React.FC<DatasetsProps> = ({
129131 </ MQTooltip >
130132 </ Box >
131133 </ Box >
132- < MqScreenLoad loading = { isDatasetsLoading && ! isDatasetsInit } >
134+ < MqScreenLoad
135+ loading = { isDatasetsLoading && ! isDatasetsInit }
136+ customHeight = { `calc(100vh - ${ HEADER_HEIGHT } px - ${ DATASET_HEADER_HEIGHT } px)` }
137+ >
133138 < >
134139 { datasets . length === 0 ? (
135140 < Box p = { 2 } >
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 createTheme ,
1515} from '@mui/material'
1616import { ChevronLeftRounded , ChevronRightRounded , Refresh } from '@mui/icons-material'
17+ import { HEADER_HEIGHT } from '../../helpers/theme'
1718import { IState } from '../../store/reducers'
1819import { Job } from '../../types/api'
1920import { MqScreenLoad } from '../../components/core/screen-load/MqScreenLoad'
@@ -54,6 +55,7 @@ interface DispatchProps {
5455type JobsProps = StateProps & DispatchProps
5556
5657const PAGE_SIZE = 20
58+ const JOB_HEADER_HEIGHT = 62
5759
5860const Jobs : React . FC < JobsProps > = ( {
5961 jobs,
@@ -125,7 +127,10 @@ const Jobs: React.FC<JobsProps> = ({
125127 </ MQTooltip >
126128 </ Box >
127129 </ Box >
128- < MqScreenLoad loading = { isJobsLoading && ! isJobsInit } >
130+ < MqScreenLoad
131+ loading = { isJobsLoading && ! isJobsInit }
132+ customHeight = { `calc(100vh - ${ HEADER_HEIGHT } px - ${ JOB_HEADER_HEIGHT } px)` }
133+ >
129134 < >
130135 { jobs . length === 0 ? (
131136 < Box p = { 2 } >
Original file line number Diff line number Diff line change @@ -109,10 +109,15 @@ const ColumnLevel: React.FC<ColumnLevelProps> = ({
109109 open = { ! ! searchParams . get ( 'tableLevelNode' ) }
110110 onClose = { ( ) => setSearchParams ( { } ) }
111111 PaperProps = { {
112- sx : { backgroundColor : theme . palette . background . default , backgroundImage : 'none' } ,
112+ sx : {
113+ backgroundColor : theme . palette . background . default ,
114+ backgroundImage : 'none' ,
115+ mt : '98px' ,
116+ height : 'calc(100vh - 98px)' ,
117+ } ,
113118 } }
114119 >
115- < Box sx = { { pt : '98px' } } >
120+ < Box >
116121 < TableLevelDrawer />
117122 </ Box >
118123 </ Drawer >
You can’t perform that action at this time.
0 commit comments