Skip to content

Commit

Permalink
[ui] Clean up old definitions pages (#25525)
Browse files Browse the repository at this point in the history
## Summary & Motivation

Clean up pages that are no longer available with the switchover of the new code location pages, which have their own definition list pages.

## How I Tested These Changes

TS, lint, jest.
  • Loading branch information
hellendag authored Oct 24, 2024
1 parent 2772968 commit bae7fe4
Show file tree
Hide file tree
Showing 28 changed files with 48 additions and 1,940 deletions.
6 changes: 1 addition & 5 deletions js_modules/dagster-ui/packages/ui-core/client.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import {MockedProvider} from '@apollo/client/testing';
import {Box} from '@dagster-io/ui-components';

import {StorybookProvider} from '../../testing/StorybookProvider';
import {VirtualizedRepoAssetTable} from '../../workspace/VirtualizedRepoAssetTable';
import {RepoAssetTableFragment} from '../../workspace/types/WorkspaceAssetsQuery.types';
import {AssetsCatalogTable} from '../AssetsCatalogTable';
import {
AssetCatalogGroupTableMock,
AssetCatalogTableMock,
AssetCatalogTableMockAssets,
SingleAssetQueryLastRunFailed,
SingleAssetQueryMaterializedStaleAndLate,
SingleAssetQueryMaterializedWithLatestRun,
Expand Down Expand Up @@ -49,22 +45,3 @@ export const GlobalCatalogWithPrefix = () => {
</StorybookProvider>
);
};

export const RepoAssets = () => {
const assets: RepoAssetTableFragment[] = AssetCatalogTableMockAssets.filter(
(a) => !!a.definition,
).map((a) => ({...a.definition!, assetKey: a.key}));

return (
<StorybookProvider routerProps={{initialEntries: ['/']}}>
<MockedProvider mocks={MOCKS}>
<Box flex={{direction: 'column'}} style={{height: '100%', overflow: 'hidden'}}>
<VirtualizedRepoAssetTable
repoAddress={{name: 'repo', location: 'test.py'}}
assets={assets}
/>
</Box>
</MockedProvider>
</StorybookProvider>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {useTrackPageView} from '../app/analytics';
import {useDocumentTitle} from '../hooks/useDocumentTitle';
import {useQueryPersistedState} from '../hooks/useQueryPersistedState';
import {RepoFilterButton} from '../instance/RepoFilterButton';
import {RESOURCE_ENTRY_FRAGMENT} from '../resources/WorkspaceResourcesRoot';
import {ResourceEntryFragment} from '../resources/types/WorkspaceResourcesRoot.types';
import {RESOURCE_ENTRY_FRAGMENT} from '../resources/WorkspaceResourcesQuery';
import {ResourceEntryFragment} from '../resources/types/WorkspaceResourcesQuery.types';
import {SearchInputSpinner} from '../ui/SearchInputSpinner';
import {WorkspaceContext} from '../workspace/WorkspaceContext/WorkspaceContext';
import {WorkspaceLocationNodeFragment} from '../workspace/WorkspaceContext/types/WorkspaceQueries.types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
VirtualizedResourceHeader,
VirtualizedResourceRow,
} from '../resources/VirtualizedResourceRow';
import {ResourceEntryFragment} from '../resources/types/WorkspaceResourcesRoot.types';
import {ResourceEntryFragment} from '../resources/types/WorkspaceResourcesQuery.types';
import {Container, Inner} from '../ui/VirtualizedTable';
import {findDuplicateRepoNames} from '../ui/findDuplicateRepoNames';
import {useRepoExpansionState} from '../ui/useRepoExpansionState';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {Link} from 'react-router-dom';
import styled from 'styled-components';

import {succinctType} from './ResourceRoot';
import {ResourceEntryFragment} from './types/WorkspaceResourcesRoot.types';
import {HeaderCell, HeaderRow, Row, RowCell} from '../ui/VirtualizedTable';
import {RepoAddress} from '../workspace/types';
import {workspacePathFromAddress} from '../workspace/workspacePath';
import {ResourceEntryFragment} from './types/WorkspaceResourcesQuery.types';

const TEMPLATE_COLUMNS = '1.5fr 1fr 1fr';

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {gql} from '../apollo-client';
import {PYTHON_ERROR_FRAGMENT} from '../app/PythonErrorFragment';

export const RESOURCE_ENTRY_FRAGMENT = gql`
fragment ResourceEntryFragment on ResourceDetails {
name
description
resourceType
parentResources {
name
}
assetKeysUsing {
path
}
jobsOpsUsing {
jobName
}
schedulesUsing
sensorsUsing
}
`;

export const WORKSPACE_RESOURCES_QUERY = gql`
query WorkspaceResourcesQuery($selector: RepositorySelector!) {
repositoryOrError(repositorySelector: $selector) {
... on Repository {
id
name
allTopLevelResourceDetails {
id
...ResourceEntryFragment
}
}
...PythonErrorFragment
}
}
${PYTHON_ERROR_FRAGMENT}
${RESOURCE_ENTRY_FRAGMENT}
`;

This file was deleted.

Loading

1 comment on commit bae7fe4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-4mvhh0pyt-elementl.vercel.app

Built with commit bae7fe4.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.