Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status Display Improvement #2785

Merged
merged 4 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions web/src/components/core/date-picker/MqDatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const MqDatePicker: React.FC<DatePickerProps> = ({
label: {
left: theme.spacing(2),
},
'.MuiOutlinedInput-input': {
padding: '6.5px 14px',
},
'&:hover': {
'.MuiOutlinedInput-notchedOutline': {
borderColor: `${theme.palette.primary.main} !important`,
Expand Down
16 changes: 12 additions & 4 deletions web/src/components/core/status/MqStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@ const MqStatus: React.FC<OwnProps> = ({ label, color }) => {
return (
<Box
sx={{
display: 'flex',
display: 'inline-flex',
alignItems: 'center',
gap: theme.spacing(1),
}}
border={`1px solid ${color}`}
p={'4px 8px'}
borderRadius={theme.spacing(1)}
>
<Box
sx={{
width: theme.spacing(2),
height: theme.spacing(2),
width: theme.spacing(1.5),
height: theme.spacing(1.5),
borderRadius: '50%',
}}
display={'flex'}
style={{ backgroundColor: color }}
/>
{label && <MqText>{label}</MqText>}
{label && (
<MqText small bold color={color}>
{label}
</MqText>
)}
</Box>
)
}
Expand Down
1 change: 1 addition & 0 deletions web/src/components/core/text/MqText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const MqText: React.FC<MqTextProps> = ({
},
small: {
fontSize: '.625rem',
lineHeight: 'inherit',
},
paragraph: {
marginBottom: theme.spacing(2),
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/datasets/DatasetDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const DatasetDetailPage: FunctionComponent<IProps> = (props) => {
<Box display={'flex'} alignItems={'center'}>
{facetsStatus && (
<Box mr={1}>
<MqStatus color={facetsStatus} />
<MqStatus label={'Quality'} color={facetsStatus} />
</Box>
)}
<MqText heading font={'mono'}>
Expand Down
14 changes: 11 additions & 3 deletions web/src/components/jobs/JobDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {

if (runsLoading) {
return (
<Box display={'flex'} justifyContent={'center'}>
<Box display={'flex'} justifyContent={'center'} mt={2}>
<CircularProgress color='primary' />
</Box>
)
Expand All @@ -110,7 +110,13 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
padding: theme.spacing(2),
}}
>
<Box mb={2} display={'flex'} justifyContent={'space-between'} alignItems={'center'}>
<Box
mb={2}
display={'flex'}
justifyContent={'space-between'}
alignItems={'center'}
sx={{ borderBottom: 1, borderColor: 'divider', width: '100%' }}
>
<Tabs value={tabIndex} onChange={handleChange} textColor='primary' indicatorColor='primary'>
<Tab label={i18next.t('jobs.latest_tab')} disableRipple={true} />
<Tab label={'I/O'} disableRipple={true} />
Expand All @@ -120,6 +126,7 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
<Box mr={1}>
<Button
variant='outlined'
size={'small'}
sx={{
borderColor: theme.palette.error.main,
color: theme.palette.error.main,
Expand All @@ -146,6 +153,7 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
</Box>
<Box mr={1}>
<Button
size={'small'}
variant='outlined'
color='primary'
target={'_blank'}
Expand All @@ -163,7 +171,7 @@ const JobDetailPage: FunctionComponent<IProps> = (props) => {
<Box display={'flex'} alignItems={'center'}>
{runs.length && (
<Box mr={1}>
<MqStatus color={jobRunsStatus(runs)} />
<MqStatus label={job.latestRun?.state} color={jobRunsStatus(runs)} />
</Box>
)}
<MqText font={'mono'} heading>
Expand Down
5 changes: 4 additions & 1 deletion web/src/routes/datasets/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ const Datasets: React.FC<DatasetsProps> = ({
<TableCell align='left'>
{datasetFacetsStatus(dataset.facets) ? (
<>
<MqStatus color={datasetFacetsStatus(dataset.facets)} />
<MqStatus
label={'Quality'}
color={datasetFacetsStatus(dataset.facets)}
/>
</>
) : (
<MqText>N/A</MqText>
Expand Down
Loading