Skip to content

Commit ceb994e

Browse files
phixMealaturqua
authored andcommitted
Parent job in job panel (MarquezProject#2868)
* Adding parent job from query update. * Formatting and tooltip added. * None --> N/A Signed-off-by: Isa Inalcik <isa.inalcik@gmail.com>
1 parent c551e98 commit ceb994e

3 files changed

Lines changed: 43 additions & 12 deletions

File tree

web/src/components/datasets/DatasetInfo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ const DatasetInfo: FunctionComponent<DatasetInfoProps> = (props) => {
140140
disabled={!hasColumnLineage}
141141
size={'small'}
142142
component={Link}
143-
to={`/datasets/column-level/${encodeURIComponent(dataset.namespace)}/${
144-
encodeURIComponent(dataset.name)
145-
}?column=${encodeURIComponent(
143+
to={`/datasets/column-level/${encodeURIComponent(
144+
dataset.namespace
145+
)}/${encodeURIComponent(dataset.name)}?column=${encodeURIComponent(
146146
encodeQueryString(dataset.namespace, dataset.name, field.name)
147147
)}&columnName=${encodeURIComponent(field.name)}`}
148148
>

web/src/components/jobs/JobDetailPage.tsx

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ import '../../i18n/config'
77
import * as Redux from 'redux'
88
import { Box, Button, CircularProgress, Divider, Grid, Tab, Tabs } from '@mui/material'
99
import { CalendarIcon } from '@mui/x-date-pickers'
10-
import { DirectionsRun, SportsScore, Start } from '@mui/icons-material'
10+
import {
11+
DirectionsRun,
12+
EscalatorWarning,
13+
Speed,
14+
SportsScore,
15+
Start,
16+
Title,
17+
} from '@mui/icons-material'
1118
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1219
import { IState } from '../../store/reducers'
1320
import { LineageJob } from '../../types/lineage'
@@ -36,12 +43,12 @@ import CloseIcon from '@mui/icons-material/Close'
3643
import Dialog from '../Dialog'
3744
import IconButton from '@mui/material/IconButton'
3845
import JobTags from './JobTags'
46+
import MQTooltip from '../core/tooltip/MQTooltip'
3947
import MqEmpty from '../core/empty/MqEmpty'
4048
import MqStatus from '../core/status/MqStatus'
4149
import MqText from '../core/text/MqText'
4250
import RunInfo from './RunInfo'
4351
import Runs from './Runs'
44-
import SpeedRounded from '@mui/icons-material/SpeedRounded'
4552

4653
interface DispatchProps {
4754
fetchLatestRuns: typeof fetchLatestRuns
@@ -207,48 +214,70 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
207214
</Box>
208215
</Box>
209216
<Grid container spacing={2}>
210-
<Grid item xs={4}>
217+
<Grid item xs={3}>
211218
<MqInfo
212219
icon={<CalendarIcon color={'disabled'} />}
213220
label={'Created at'.toUpperCase()}
214221
value={formatUpdatedAt(job.createdAt)}
215222
/>
216223
</Grid>
217-
<Grid item xs={4}>
224+
<Grid item xs={3}>
218225
<MqInfo
219226
icon={<CalendarIcon color={'disabled'} />}
220227
label={'Updated at'.toUpperCase()}
221228
value={formatUpdatedAt(job.updatedAt)}
222229
/>
223230
</Grid>
224-
<Grid item xs={4}>
231+
<Grid item xs={3}>
225232
<MqInfo
226-
icon={<SpeedRounded color={'disabled'} />}
233+
icon={<Speed color={'disabled'} />}
227234
label={'Last Runtime'.toUpperCase()}
228235
value={job.latestRun ? stopWatchDuration(job.latestRun.durationMs) : 'N/A'}
229236
/>
230237
</Grid>
231-
<Grid item xs={4}>
238+
<Grid item xs={3}>
239+
<MqInfo
240+
icon={<Title color={'disabled'} />}
241+
label={'Type'.toUpperCase()}
242+
value={job.type ? job.type : 'N/A'}
243+
/>
244+
</Grid>
245+
<Grid item xs={3}>
232246
<MqInfo
233247
icon={<Start color={'disabled'} />}
234248
label={'Last Started'.toUpperCase()}
235249
value={job.latestRun ? formatUpdatedAt(job.latestRun.startedAt) : 'N/A'}
236250
/>
237251
</Grid>
238-
<Grid item xs={4}>
252+
<Grid item xs={3}>
239253
<MqInfo
240254
icon={<SportsScore color={'disabled'} />}
241255
label={'Last Finished'.toUpperCase()}
242256
value={job.latestRun ? formatUpdatedAt(job.latestRun.endedAt) : 'N/A'}
243257
/>
244258
</Grid>
245-
<Grid item xs={4}>
259+
<Grid item xs={3}>
246260
<MqInfo
247261
icon={<DirectionsRun color={'disabled'} />}
248262
label={'Running Status'.toUpperCase()}
249263
value={<MqStatus label={job.latestRun?.state} color={jobRunsStatus(latestRuns)} />}
250264
/>
251265
</Grid>
266+
<Grid item xs={3}>
267+
<MqInfo
268+
icon={<EscalatorWarning color={'disabled'} />}
269+
label={'Parent Job'.toUpperCase()}
270+
value={
271+
job.parentJobName ? (
272+
<MQTooltip title={job.parentJobName}>
273+
<>{truncateText(job.parentJobName, 16)}</>
274+
</MQTooltip>
275+
) : (
276+
'N/A'
277+
)
278+
}
279+
/>
280+
</Grid>
252281
</Grid>
253282
<Divider sx={{ my: 1 }} />
254283
<JobTags jobTags={jobTags} jobName={job.name} namespace={job.namespace} />

web/src/types/lineage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export interface LineageJob {
3636
location: string
3737
description: string
3838
latestRun: Nullable<Run>
39+
parentJobName: Nullable<string>
40+
parentJobUuid: Nullable<string>
3941
}
4042

4143
export interface LineageEdge {

0 commit comments

Comments
 (0)