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 { Check } from '@mui/icons-material'
45import { Snackbar } from '@mui/material'
56import ContentCopyIcon from '@mui/icons-material/ContentCopy'
67import IconButton from '@mui/material/IconButton'
@@ -13,6 +14,7 @@ interface MqCopyProps {
1314
1415const MqEmpty : React . FC < MqCopyProps > = ( { string } ) => {
1516 const [ open , setOpen ] = React . useState ( false )
17+ const [ hasCopied , setHasCopied ] = React . useState ( false )
1618 const handleClose = ( event : React . SyntheticEvent | Event , reason ?: string ) => {
1719 if ( reason === 'clickaway' ) {
1820 return
@@ -28,12 +30,13 @@ const MqEmpty: React.FC<MqCopyProps> = ({ string }) => {
2830 event . stopPropagation ( )
2931 navigator . clipboard . writeText ( string )
3032 setOpen ( true )
33+ setHasCopied ( true )
3134 } }
3235 aria-label = 'copy'
3336 size = { 'small' }
3437 color = { 'primary' }
3538 >
36- < ContentCopyIcon fontSize = { 'small' } />
39+ { hasCopied ? < Check fontSize = { 'small' } /> : < ContentCopyIcon fontSize = { 'small' } /> }
3740 </ IconButton >
3841 </ MQTooltip >
3942 < Snackbar
Original file line number Diff line number Diff line change @@ -92,11 +92,7 @@ const DatasetVersions: FunctionComponent<DatasetVersionsProps & DispatchProps> =
9292 < ArrowBackIosRounded fontSize = { 'small' } />
9393 </ IconButton >
9494 </ Box >
95- < DatasetInfo
96- dataset = { dataset }
97- datasetFields = { infoView . fields }
98- facets = { infoView . facets }
99- />
95+ < DatasetInfo dataset = { dataset } datasetFields = { infoView . fields } facets = { infoView . facets } />
10096 </ >
10197 )
10298 }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { formatUpdatedAt } from '../../helpers'
2424import { runStateColor } from '../../helpers/nodes'
2525import { stopWatchDuration } from '../../helpers/time'
2626import { useTheme } from '@emotion/react'
27+ import MQTooltip from '../core/tooltip/MQTooltip'
2728import MqCode from '../core/code/MqCode'
2829import MqCopy from '../core/copy/MqCopy'
2930import MqEmpty from '../core/empty/MqEmpty'
@@ -156,7 +157,11 @@ const Runs: FunctionComponent<RunsProps & DispatchProps> = (props) => {
156157 >
157158 < TableCell align = 'left' >
158159 < Box display = { 'flex' } alignItems = { 'center' } >
159- { run . id . substring ( 0 , 8 ) } ...
160+ < MQTooltip title = { run . id } >
161+ < Box >
162+ < MqText font = { 'mono' } > { run . id . substring ( 0 , 8 ) } ...</ MqText >
163+ </ Box >
164+ </ MQTooltip >
160165 < MqCopy string = { run . id } />
161166 </ Box >
162167 </ TableCell >
Original file line number Diff line number Diff line change @@ -296,7 +296,13 @@ const Events: React.FC<EventsProps> = ({
296296 >
297297 < TableCell align = 'left' >
298298 < Box display = { 'flex' } alignItems = { 'center' } >
299- < MqText font = { 'mono' } > { event . run . runId . substring ( 0 , 8 ) } ...</ MqText >
299+ < MQTooltip title = { event . run . runId } >
300+ < Box >
301+ < MqText font = { 'mono' } >
302+ { event . run . runId . substring ( 0 , 8 ) } ...
303+ </ MqText >
304+ </ Box >
305+ </ MQTooltip >
300306 < MqCopy string = { event . run . runId } />
301307 </ Box >
302308 </ TableCell >
You can’t perform that action at this time.
0 commit comments