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

Cleanup issues highlighted by some Spark Integration Data #2856

Merged
merged 2 commits into from
Jul 20, 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
4 changes: 3 additions & 1 deletion web/src/components/jobs/JobTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ const JobTags: React.FC<IProps> = (props) => {
<MQText label sx={{ fontSize: '1.25rem' }} bottomMargin>
Select a Tag to change
</MQText>
<MQText label sx={{ fontSize: '0.85rem' }}>Tag</MQText>
<MQText label sx={{ fontSize: '0.85rem' }}>
Tag
</MQText>
<Autocomplete
options={tagData.map((option) => option.name)}
autoSelect
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/jobs/RunInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const RunInfo: FunctionComponent<RunInfoProps> = (props) => {
return (
<Box>
{<MqCode code={(jobFacets?.sql as SqlFacet)?.query} language={'sql'} />}
{
{jobFacets?.sourceCode && (
<MqCode
code={(jobFacets.sourceCode as SourceCodeFacet)?.sourceCode}
language={(jobFacets.sourceCode as SourceCodeFacet)?.language}
/>
}
)}
{run.facets && (
<Box mt={2}>
<Box mb={1}>
Expand Down
7 changes: 6 additions & 1 deletion web/src/components/jobs/Runs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ const Runs: FunctionComponent<RunsProps> = (props) => {
}}
onClick={() => handleClick(run)}
>
<TableCell align='left'>{run.id}</TableCell>
<TableCell align='left'>
<Box display={'flex'} alignItems={'center'}>
{run.id.substring(0, 8)}...
<MqCopy string={run.id} />{' '}
</Box>
</TableCell>
<TableCell align='left'>
<MqStatus color={runStateColor(run.state)} label={run.state} />
</TableCell>
Expand Down
5 changes: 3 additions & 2 deletions web/src/routes/datasets/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
} from '../../helpers/nodes'
import { fetchDatasets, resetDatasets } from '../../store/actionCreators'
import { formatUpdatedAt } from '../../helpers'
import { truncateText } from '../../helpers/text'
import { useTheme } from '@emotion/react'
import Assertions from '../../components/datasets/Assertions'
import Box from '@mui/material/Box'
Expand Down Expand Up @@ -203,11 +204,11 @@ const Datasets: React.FC<DatasetsProps> = ({
dataset.name
)}`}
>
{dataset.name}
{truncateText(dataset.name, 40)}
</MqText>
</TableCell>
<TableCell align='left'>
<MqText>{dataset.namespace}</MqText>
<MqText>{truncateText(dataset.namespace, 40)}</MqText>
</TableCell>
<TableCell align='left'>
<MqText>{dataset.sourceName}</MqText>
Expand Down
5 changes: 3 additions & 2 deletions web/src/routes/events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { fetchEvents, resetEvents } from '../../store/actionCreators'
import { fileSize, formatUpdatedAt } from '../../helpers'
import { formatDateAPIQuery, formatDatePicker } from '../../helpers/time'
import { saveAs } from 'file-saver'
import { truncateText } from '../../helpers/text'
import { useSearchParams } from 'react-router-dom'
import { useTheme } from '@emotion/react'
import Box from '@mui/material/Box'
Expand Down Expand Up @@ -305,9 +306,9 @@ const Events: React.FC<EventsProps> = ({
label={event.eventType}
/>
</TableCell>
<TableCell align='left'>{event.job.name}</TableCell>
<TableCell align='left'>{truncateText(event.job.name, 40)}</TableCell>
<TableCell align='left'>
<MqText> {event.job.namespace} </MqText>
<MqText> {truncateText(event.job.namespace, 40)} </MqText>
</TableCell>
<TableCell align='left'>
<MqText>{formatUpdatedAt(event.eventTime)}</MqText>
Expand Down
5 changes: 3 additions & 2 deletions web/src/routes/jobs/Jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { encodeNode, runStateColor } from '../../helpers/nodes'
import { fetchJobs, resetJobs } from '../../store/actionCreators'
import { formatUpdatedAt } from '../../helpers'
import { stopWatchDuration } from '../../helpers/time'
import { truncateText } from '../../helpers/text'
import Box from '@mui/material/Box'
import CircularProgress from '@mui/material/CircularProgress/CircularProgress'
import IconButton from '@mui/material/IconButton'
Expand Down Expand Up @@ -183,11 +184,11 @@ const Jobs: React.FC<JobsProps> = ({
link
linkTo={`/lineage/${encodeNode('JOB', job.namespace, job.name)}`}
>
{job.name}
{truncateText(job.name, 40)}
</MqText>
</TableCell>
<TableCell align='left'>
<MqText>{job.namespace}</MqText>
<MqText>{truncateText(job.namespace, 40)}</MqText>
</TableCell>
<TableCell align='left'>
<MqText>{formatUpdatedAt(job.updatedAt)}</MqText>
Expand Down
7 changes: 5 additions & 2 deletions web/src/routes/table-level/ActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ArrowBackIosRounded, Refresh } from '@mui/icons-material'
import { Divider, FormControlLabel, Switch, TextField } from '@mui/material'
import { fetchLineage } from '../../store/actionCreators'
import { theme } from '../../helpers/theme'
import { truncateText } from '../../helpers/text'
import { useNavigate, useParams, useSearchParams } from 'react-router-dom'
import Box from '@mui/material/Box'
import IconButton from '@mui/material/IconButton'
Expand Down Expand Up @@ -68,12 +69,14 @@ export const ActionBar = ({
<Divider orientation='vertical' flexItem sx={{ mx: 2 }} />
<Box>
<MqText subdued>Namespace</MqText>
<MqText font={'mono'}>{namespace || 'Unknown namespace name'}</MqText>
<MqText font={'mono'}>
{namespace ? truncateText(namespace, 40) : 'Unknown namespace name'}
</MqText>
</Box>
<Divider orientation='vertical' flexItem sx={{ mx: 2 }} />
<Box>
<MqText subdued>Name</MqText>
<MqText font={'mono'}>{name || 'Unknown dataset name'}</MqText>
<MqText font={'mono'}>{name ? truncateText(name, 40) : 'Unknown dataset name'}</MqText>
</Box>
</Box>
<Box display={'flex'} alignItems={'center'}>
Expand Down
Loading