forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui/data-contract): Data contract UI under Validation Tab (datahu…
…b-project#10625) Co-authored-by: jayacryl <159848059+jayacryl@users.noreply.github.com>
- Loading branch information
1 parent
154591b
commit 1b56035
Showing
36 changed files
with
2,272 additions
and
49 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
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
31 changes: 31 additions & 0 deletions
31
...ub-web-react/src/app/entity/shared/tabs/Dataset/Validations/FieldAssertionDescription.tsx
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,31 @@ | ||
import React from 'react'; | ||
import { Typography } from 'antd'; | ||
import { FieldAssertionInfo } from '../../../../../../types.generated'; | ||
import { | ||
getFieldDescription, | ||
getFieldOperatorDescription, | ||
getFieldParametersDescription, | ||
getFieldTransformDescription, | ||
} from './fieldDescriptionUtils'; | ||
|
||
type Props = { | ||
assertionInfo: FieldAssertionInfo; | ||
}; | ||
|
||
/** | ||
* A human-readable description of a Field Assertion. | ||
*/ | ||
export const FieldAssertionDescription = ({ assertionInfo }: Props) => { | ||
const field = getFieldDescription(assertionInfo); | ||
const operator = getFieldOperatorDescription(assertionInfo); | ||
const transform = getFieldTransformDescription(assertionInfo); | ||
const parameters = getFieldParametersDescription(assertionInfo); | ||
|
||
return ( | ||
<Typography.Text> | ||
{transform} | ||
{transform ? ' of ' : ''} | ||
<Typography.Text code>{field}</Typography.Text> {operator} {parameters} | ||
</Typography.Text> | ||
); | ||
}; |
16 changes: 16 additions & 0 deletions
16
datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/SqlAssertionDescription.tsx
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,16 @@ | ||
import React from 'react'; | ||
import { Typography } from 'antd'; | ||
import { AssertionInfo } from '../../../../../../types.generated'; | ||
|
||
type Props = { | ||
assertionInfo: AssertionInfo; | ||
}; | ||
|
||
/** | ||
* A human-readable description of a SQL Assertion. | ||
*/ | ||
export const SqlAssertionDescription = ({ assertionInfo }: Props) => { | ||
const { description } = assertionInfo; | ||
|
||
return <Typography.Text>{description}</Typography.Text>; | ||
}; |
Oops, something went wrong.