-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
- Loading branch information
1 parent
a78f8ec
commit aabfdff
Showing
10 changed files
with
132 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Box } from '@material-ui/core' | ||
import MqEmpty from '../core/empty/MqEmpty' | ||
import MqJson from '../core/code/MqJson' | ||
import React, { FunctionComponent } from 'react' | ||
|
||
interface DatasetColumnLineageProps { | ||
columnLineage: object | ||
} | ||
|
||
const DatasetColumnLineage: FunctionComponent<DatasetColumnLineageProps> = props => { | ||
const { columnLineage } = props | ||
|
||
return ( | ||
<Box> | ||
{columnLineage === null && <MqEmpty title={'No column lineage'} body={'Column lineage not available for the specified dataset.'} />} | ||
{columnLineage && ( | ||
<Box mt={2}> | ||
<MqJson code={columnLineage} /> | ||
</Box> | ||
)} | ||
</Box> | ||
) | ||
} | ||
|
||
export default DatasetColumnLineage |
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,30 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Dataset } from '../../types/api' | ||
import { | ||
FETCH_DATASET, | ||
FETCH_DATASET_SUCCESS, | ||
RESET_DATASET | ||
} from '../actionCreators/actionTypes' | ||
import { fetchDatasetSuccess } from '../actionCreators'; | ||
|
||
export type IDatasetState = { isLoading: boolean; result: Dataset; init: boolean } | ||
|
||
export const initialState: IDatasetState = { isLoading: false, init: false, result: { } as Dataset } | ||
|
||
type IDatasetAction = ReturnType<typeof fetchDatasetSuccess> | ||
|
||
export default (state: IDatasetState = initialState, action: IDatasetAction): IDatasetState => { | ||
const { type, payload } = action | ||
|
||
switch (type) { | ||
case FETCH_DATASET: | ||
return { ...state, isLoading: true } | ||
case FETCH_DATASET_SUCCESS: | ||
return { ...state, isLoading: false, init: true, result: payload.dataset } | ||
case RESET_DATASET: | ||
return initialState | ||
default: | ||
return state | ||
} | ||
} |
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