diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx index 1407477835db6..fe5ff780642dd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx @@ -55,7 +55,6 @@ import {AssetFilterState} from '../assets/useAssetDefinitionFilterState.oss'; import {DEFAULT_MAX_ZOOM, SVGViewport} from '../graph/SVGViewport'; import {useAssetLayout} from '../graph/asyncGraphLayout'; import {closestNodeInDirection, isNodeOffscreen} from '../graph/common'; -import {DefinitionTag} from '../graphql/types'; import {useQueryAndLocalStoragePersistedState} from '../hooks/useQueryAndLocalStoragePersistedState'; import {PageLoadTrace} from '../performance'; import { @@ -105,26 +104,25 @@ export const AssetGraphExplorer = (props: Props) => { const {explorerPath, onChangeExplorerPath} = props; - const {button, filterBar, computeKindTagsFilter, storageKindTagsFilter} = - useAssetGraphExplorerFilters({ - nodes: React.useMemo( - () => (fullAssetGraphData ? Object.values(fullAssetGraphData.nodes) : []), - [fullAssetGraphData], - ), - loading: fetchResult.loading, - isGlobalGraph: !!props.isGlobalGraph, - assetFilterState: props.assetFilterState, - explorerPath: explorerPath.opsQuery, - clearExplorerPath: React.useCallback(() => { - onChangeExplorerPath( - { - ...explorerPath, - opsQuery: '', - }, - 'push', - ); - }, [explorerPath, onChangeExplorerPath]), - }); + const {button, filterBar, computeKindTagsFilter} = useAssetGraphExplorerFilters({ + nodes: React.useMemo( + () => (fullAssetGraphData ? Object.values(fullAssetGraphData.nodes) : []), + [fullAssetGraphData], + ), + loading: fetchResult.loading, + isGlobalGraph: !!props.isGlobalGraph, + assetFilterState: props.assetFilterState, + explorerPath: explorerPath.opsQuery, + clearExplorerPath: React.useCallback(() => { + onChangeExplorerPath( + { + ...explorerPath, + opsQuery: '', + }, + 'push', + ); + }, [explorerPath, onChangeExplorerPath]), + }); return ( @@ -154,7 +152,6 @@ export const AssetGraphExplorer = (props: Props) => { filterBar={filterBar} filterButton={button} computeKindTagsFilter={computeKindTagsFilter} - storageKindTagsFilter={storageKindTagsFilter} {...props} /> ); @@ -174,7 +171,6 @@ type WithDataProps = Props & { isGlobalGraph?: boolean; trace?: PageLoadTrace; computeKindTagsFilter?: StaticSetFilter; - storageKindTagsFilter?: StaticSetFilter; }; const AssetGraphExplorerWithData = ({ @@ -192,7 +188,6 @@ const AssetGraphExplorerWithData = ({ filterBar, assetFilterState, isGlobalGraph = false, - storageKindTagsFilter, computeKindTagsFilter, trace, }: WithDataProps) => { @@ -634,7 +629,6 @@ const AssetGraphExplorerWithData = ({ definition={graphNode.definition} selected={selectedGraphNodes.includes(graphNode)} computeKindTagsFilter={computeKindTagsFilter} - storageKindTagsFilter={storageKindTagsFilter} /> )} diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx index 3f5bc0d16825e..b74042d211a55 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx @@ -18,12 +18,7 @@ import {ChangedReasonsTag, MinimalNodeChangedDot} from '../assets/ChangedReasons import {MinimalNodeStaleDot, StaleReasonsTag, isAssetStale} from '../assets/Stale'; import {AssetChecksStatusSummary} from '../assets/asset-checks/AssetChecksStatusSummary'; import {assetDetailsPathForKey} from '../assets/assetDetailsPathForKey'; -import { - AssetComputeKindTag, - AssetStorageKindTag, - isCanonicalStorageKindTag, -} from '../graph/KindTags'; -import {DefinitionTag} from '../graphql/types'; +import {AssetComputeKindTag} from '../graph/KindTags'; import {StaticSetFilter} from '../ui/BaseFilters/useStaticSetFilter'; import {markdownToPlaintext} from '../ui/markdownToPlaintext'; @@ -31,68 +26,56 @@ interface Props { definition: AssetNodeFragment; selected: boolean; computeKindTagsFilter?: StaticSetFilter; - storageKindTagsFilter?: StaticSetFilter; } -export const AssetNode = React.memo( - ({definition, selected, computeKindTagsFilter, storageKindTagsFilter}: Props) => { - const isSource = definition.isSource; +export const AssetNode = React.memo(({definition, selected, computeKindTagsFilter}: Props) => { + const isSource = definition.isSource; - const {liveData} = useAssetLiveData(definition.assetKey); - const storageKindTag = definition.tags?.find(isCanonicalStorageKindTag); - return ( - - - - - - - - - - {definition.description ? ( - - {markdownToPlaintext(definition.description).split('\n')[0]} - - ) : ( - No description - )} - {definition.isPartitioned && !definition.isSource && ( - - )} - - - - {(liveData?.assetChecks || []).length > 0 && ( - + const {liveData} = useAssetLiveData(definition.assetKey); + return ( + + + + + + + + + + {definition.description ? ( + + {markdownToPlaintext(definition.description).split('\n')[0]} + + ) : ( + No description )} - - - {storageKindTag && ( - + {definition.isPartitioned && !definition.isSource && ( + )} - - - - ); - }, - isEqual, -); + + + {(liveData?.assetChecks || []).length > 0 && ( + + )} + + + + + + + ); +}, isEqual); export const AssetNameRow = ({definition}: {definition: AssetNodeFragment}) => { const displayName = definition.assetKey.path[definition.assetKey.path.length - 1]!;