-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Quality and node display * Fixing display on column lineage title. * Fixing bad status icon and adding divider to tooltip. * Fixing minor theme details. * Minor code review updates. * UX tweaks * Adding updated at --------- Co-authored-by: phix <peter.hicks@astronomer.io>
- Loading branch information
Showing
14 changed files
with
329 additions
and
55 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
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,65 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Assertion } from '../../types/api' | ||
import { Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material' | ||
import { theme } from '../../helpers/theme' | ||
import MqStatus from '../core/status/MqStatus' | ||
import MqText from '../core/text/MqText' | ||
import React from 'react' | ||
|
||
interface OwnProps { | ||
assertions: Assertion[] | ||
hasHeader?: boolean | ||
} | ||
|
||
const Assertions: React.FC<OwnProps> = ({ assertions, hasHeader }) => { | ||
if (assertions.length === 0) { | ||
return null | ||
} | ||
return ( | ||
<Table size={'small'}> | ||
{hasHeader && ( | ||
<TableHead> | ||
<TableRow> | ||
<TableCell align={'left'}> | ||
<MqText bold>COLUMN</MqText> | ||
</TableCell> | ||
<TableCell align={'left'}> | ||
<MqText bold>ASSERTION</MqText> | ||
</TableCell> | ||
<TableCell align={'left'}> | ||
<MqText bold>STATUS</MqText> | ||
</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
)} | ||
<TableBody> | ||
{assertions.map((assertion) => { | ||
const sx = { borderBottom: 'none' } | ||
return ( | ||
<TableRow key={`${assertion.column}-${assertion.assertion}`}> | ||
<TableCell align={'left'} sx={sx}> | ||
<MqText font={'mono'}>{assertion.column}</MqText> | ||
</TableCell> | ||
<TableCell align={'left'} sx={sx}> | ||
<MqText subdued>{assertion.assertion}</MqText> | ||
</TableCell> | ||
<TableCell align={'left'} sx={sx}> | ||
{ | ||
<MqStatus | ||
label={assertion.success ? 'pass'.toUpperCase() : 'fail'.toUpperCase()} | ||
color={ | ||
assertion.success ? theme.palette.primary.main : theme.palette.error.main | ||
} | ||
></MqStatus> | ||
} | ||
</TableCell> | ||
</TableRow> | ||
) | ||
})} | ||
</TableBody> | ||
</Table> | ||
) | ||
} | ||
|
||
export default Assertions |
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.