-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dagit] Remove the global asset graph in preparation for asset group …
…graphs
- Loading branch information
bengotow
committed
May 31, 2022
1 parent
ce88f66
commit 1b99974
Showing
9 changed files
with
9 additions
and
161 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
14 changes: 1 addition & 13 deletions
14
js_modules/dagit/packages/core/src/assets/AssetViewModeSwitch.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 |
---|---|---|
@@ -1,27 +1,15 @@ | ||
import {ButtonGroup, ButtonGroupItem} from '@dagster-io/ui'; | ||
import * as React from 'react'; | ||
import {useHistory} from 'react-router-dom'; | ||
|
||
import {AssetViewType, useAssetView} from './useAssetView'; | ||
|
||
export const AssetViewModeSwitch = () => { | ||
const history = useHistory(); | ||
const [view, _setView] = useAssetView(); | ||
const [view, setView] = useAssetView(); | ||
|
||
const buttons: ButtonGroupItem<AssetViewType>[] = [ | ||
{id: 'graph', icon: 'gantt_waterfall', tooltip: 'Graph view'}, | ||
{id: 'flat', icon: 'view_list', tooltip: 'List view'}, | ||
{id: 'directory', icon: 'folder', tooltip: 'Folder view'}, | ||
]; | ||
|
||
const setView = (view: AssetViewType) => { | ||
_setView(view); | ||
if (view === 'graph') { | ||
history.push('/instance/asset-graph'); | ||
} else if (history.location.pathname !== '/instance/assets') { | ||
history.push('/instance/assets'); | ||
} | ||
}; | ||
|
||
return <ButtonGroup activeItems={new Set([view])} buttons={buttons} onClick={setView} />; | ||
}; |
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
46 changes: 0 additions & 46 deletions
46
js_modules/dagit/packages/core/src/assets/InstanceAssetGraphExplorer.tsx
This file was deleted.
Oops, something went wrong.
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