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): Add warning banner to looker and lookml UI ingestion forms (d…
- Loading branch information
1 parent
baeba0d
commit e25e2be
Showing
3 changed files
with
71 additions
and
11 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
datahub-web-react/src/app/ingest/source/builder/DefineRecipeStep.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
41 changes: 41 additions & 0 deletions
41
datahub-web-react/src/app/ingest/source/builder/LookerWarning.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,41 @@ | ||
import React from 'react'; | ||
import { Alert } from 'antd'; | ||
import { LOOKER, LOOK_ML } from './constants'; | ||
|
||
const LOOKML_DOC_LINK = 'https://datahubproject.io/docs/generated/ingestion/sources/looker#module-lookml'; | ||
const LOOKER_DOC_LINK = 'https://datahubproject.io/docs/generated/ingestion/sources/looker#module-looker'; | ||
|
||
interface Props { | ||
type: string; | ||
} | ||
|
||
export const LookerWarning = ({ type }: Props) => { | ||
let link: React.ReactNode; | ||
if (type === LOOKER) { | ||
link = ( | ||
<a href={LOOKML_DOC_LINK} target="_blank" rel="noopener noreferrer"> | ||
DataHub lookml module | ||
</a> | ||
); | ||
} else if (type === LOOK_ML) { | ||
link = ( | ||
<a href={LOOKER_DOC_LINK} target="_blank" rel="noopener noreferrer"> | ||
DataHub looker module | ||
</a> | ||
); | ||
} | ||
|
||
return ( | ||
<Alert | ||
style={{ marginBottom: '10px' }} | ||
type="warning" | ||
banner | ||
message={ | ||
<> | ||
To get complete Looker metadata integration (including Looker views and lineage to the underlying | ||
warehouse tables), you must <b>also</b> use the {link}. | ||
</> | ||
} | ||
/> | ||
); | ||
}; |
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