-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Selection on graph with edges. Status for jobs/datasets (#2384)
* Selection on graph with edges. Status for jobs/datasets Signed-off-by: tito12 <[email protected]> --------- Signed-off-by: tito12 <[email protected]> Co-authored-by: Willy Lulciuc <[email protected]>
- Loading branch information
Showing
20 changed files
with
329 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { theme } from '../../../helpers/theme' | ||
import Box from '@material-ui/core/Box' | ||
import MqText from '../text/MqText' | ||
import React from 'react' | ||
import createStyles from '@material-ui/core/styles/createStyles' | ||
import withStyles, { WithStyles } from '@material-ui/core/styles/withStyles' | ||
|
||
const styles = () => | ||
createStyles({ | ||
type: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: theme.spacing(1) | ||
}, | ||
status: { | ||
width: theme.spacing(2), | ||
height: theme.spacing(2), | ||
borderRadius: '50%' | ||
} | ||
}) | ||
|
||
interface OwnProps { | ||
color: string | null | ||
label?: string | ||
} | ||
|
||
const MqStatus: React.FC<OwnProps & WithStyles<typeof styles>> = ({ label, color, classes }) => { | ||
if (!color) { | ||
return null | ||
} | ||
return ( | ||
<Box className={classes.type}> | ||
<Box className={classes.status} style={{ backgroundColor: color }} /> | ||
{label && <MqText>{label}</MqText>} | ||
</Box> | ||
) | ||
} | ||
|
||
export default withStyles(styles)(MqStatus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.