diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/Flags.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/Flags.tsx
index 68b4b49b47ee0..d19fedc0aef18 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/app/Flags.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/app/Flags.tsx
@@ -11,6 +11,7 @@ export const FeatureFlag = {
flagDisableWebsockets: 'flagDisableWebsockets' as const,
flagSidebarResources: 'flagSidebarResources' as const,
flagDisableAutoLoadDefaults: 'flagDisableAutoLoadDefaults' as const,
+ flagUseOldAutomationPage: 'flagUseOldAutomationPage' as const,
};
export type FeatureFlagType = keyof typeof FeatureFlag;
diff --git a/js_modules/dagster-ui/packages/ui-core/src/app/getVisibleFeatureFlagRows.tsx b/js_modules/dagster-ui/packages/ui-core/src/app/getVisibleFeatureFlagRows.tsx
index d818c2dd468a4..c192620522b83 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/app/getVisibleFeatureFlagRows.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/app/getVisibleFeatureFlagRows.tsx
@@ -20,4 +20,8 @@ export const getVisibleFeatureFlagRows = () => [
key: 'Debug console logging',
flagType: FeatureFlag.flagDebugConsoleLogging,
},
+ {
+ key: 'Use old asset auto-materialize history page',
+ flagType: FeatureFlag.flagUseOldAutomationPage,
+ },
];
diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx
index 2993a4537b78d..5434ab8f2d293 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx
@@ -3,6 +3,7 @@ import {Alert, Box, NonIdealState, Spinner, Tag, ErrorBoundary} from '@dagster-i
import * as React from 'react';
import {Link, useLocation} from 'react-router-dom';
+import {useFeatureFlags} from '../app/Flags';
import {Timestamp} from '../app/time/Timestamp';
import {AssetLiveDataRefresh, useAssetLiveData} from '../asset-data/AssetLiveDataProvider';
import {
@@ -31,6 +32,7 @@ import {AssetPartitions} from './AssetPartitions';
import {AssetPlots} from './AssetPlots';
import {AssetTabs} from './AssetTabs';
import {AssetAutomaterializePolicyPage} from './AutoMaterializePolicyPage/AssetAutomaterializePolicyPage';
+import {AssetAutomaterializePolicyPageOld} from './AutoMaterializePolicyPageOld/AssetAutomaterializePolicyPage';
import {AutomaterializeDaemonStatusTag} from './AutomaterializeDaemonStatusTag';
import {useAutomationPolicySensorFlag} from './AutomationPolicySensorFlag';
import {LaunchAssetExecutionButton} from './LaunchAssetExecutionButton';
@@ -182,10 +184,20 @@ export const AssetView = ({assetKey, trace}: Props) => {
);
};
+ const {flagUseOldAutomationPage} = useFeatureFlags();
+
const renderAutomaterializeHistoryTab = () => {
if (definitionQueryResult.loading && !definitionQueryResult.previousData) {
return ;
}
+ if (flagUseOldAutomationPage) {
+ return (
+
+ );
+ }
return ;
};
diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/ParentUpdatedPartitionLink.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/ParentUpdatedPartitionLink.tsx
deleted file mode 100644
index ed4e51412dcc6..0000000000000
--- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/ParentUpdatedPartitionLink.tsx
+++ /dev/null
@@ -1,99 +0,0 @@
-import {ButtonLink, Box, Tag, Caption} from '@dagster-io/ui-components';
-import * as React from 'react';
-
-import {sortAssetKeys} from '../../asset-graph/Utils';
-import {AssetLink} from '../AssetLink';
-import {AssetKey} from '../types';
-
-import {AssetKeysDialog, AssetKeysDialogEmptyState, AssetKeysDialogHeader} from './AssetKeysDialog';
-import {VirtualizedAssetPartitionListForDialog} from './VirtualizedAssetPartitionListForDialog';
-import {AssetDetailType, detailTypeToLabel} from './assetDetailUtils';
-import {useFilterPartitionNames} from './assetFilters';
-
-interface Props {
- updatedAssetKeys: Record;
- willUpdateAssetKeys: Record;
-}
-
-export const ParentUpdatedPartitionLink = ({updatedAssetKeys, willUpdateAssetKeys}: Props) => {
- const [isOpen, setIsOpen] = React.useState(false);
- const [queryString, setQueryString] = React.useState('');
-
- const partitionNames = React.useMemo(() => {
- return Array.from(
- new Set([...Object.keys(updatedAssetKeys), ...Object.keys(willUpdateAssetKeys)]),
- );
- }, [updatedAssetKeys, willUpdateAssetKeys]);
-
- const count = partitionNames.length;
- const filteredPartitionNames = useFilterPartitionNames(partitionNames, queryString);
-
- const visiblePartitions = React.useMemo(() => {
- return Object.fromEntries(
- filteredPartitionNames.map((partitionName) => {
- return [
- partitionName,
- [
- ...(updatedAssetKeys[partitionName] || []).sort(sortAssetKeys).map((assetKey) => ({
- assetKey,
- detailType: AssetDetailType.Updated,
- })),
- ...(willUpdateAssetKeys[partitionName] || []).sort(sortAssetKeys).map((assetKey) => ({
- assetKey,
- detailType: AssetDetailType.WillUpdate,
- })),
- ],
- ];
- }),
- );
- }, [updatedAssetKeys, willUpdateAssetKeys, filteredPartitionNames]);
-
- return (
- <>
-
- {count === 1 ? `1 partition` : `${count} partitions`}
- setIsOpen(true)}>
- View details
-
-
- 0}
- />
- }
- content={
- queryString && !filteredPartitionNames.length ? (
-
- No matching partitions for {queryString}
- >
- }
- />
- ) : (
-
- assetCount === 1 ? `(1 parent updated)` : `(${assetCount} parents updated)`
- }
- renderItem={(item) => (
-
-
- ({detailTypeToLabel(item.detailType)})
-
- )}
- />
- )
- }
- />
- >
- );
-};
diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/AssetAutomaterializePolicyPage.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/AssetAutomaterializePolicyPage.tsx
index 769ee58be99bc..0f8dcb59dfae7 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/AssetAutomaterializePolicyPage.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/AssetAutomaterializePolicyPage.tsx
@@ -12,7 +12,7 @@ import {AutomaterializeMiddlePanel} from './AutomaterializeMiddlePanel';
import {AutomaterializeRightPanel} from './AutomaterializeRightPanel';
import {useEvaluationsQueryResult} from './useEvaluationsQueryResult';
-export const AssetAutomaterializePolicyPage = ({
+export const AssetAutomaterializePolicyPageOld = ({
assetKey,
assetHasDefinedPartitions,
}: {
diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/ParentUpdatedPartitionLink.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/ParentUpdatedPartitionLink.tsx
index ed4e51412dcc6..b000e3c9bb568 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/ParentUpdatedPartitionLink.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPageOld/ParentUpdatedPartitionLink.tsx
@@ -28,20 +28,28 @@ export const ParentUpdatedPartitionLink = ({updatedAssetKeys, willUpdateAssetKey
const count = partitionNames.length;
const filteredPartitionNames = useFilterPartitionNames(partitionNames, queryString);
+ console.log({filteredPartitionNames});
+
const visiblePartitions = React.useMemo(() => {
return Object.fromEntries(
filteredPartitionNames.map((partitionName) => {
return [
partitionName,
[
- ...(updatedAssetKeys[partitionName] || []).sort(sortAssetKeys).map((assetKey) => ({
- assetKey,
- detailType: AssetDetailType.Updated,
- })),
- ...(willUpdateAssetKeys[partitionName] || []).sort(sortAssetKeys).map((assetKey) => ({
- assetKey,
- detailType: AssetDetailType.WillUpdate,
- })),
+ ...(updatedAssetKeys[partitionName] || [])
+ .slice()
+ .sort(sortAssetKeys)
+ .map((assetKey) => ({
+ assetKey,
+ detailType: AssetDetailType.Updated,
+ })),
+ ...(willUpdateAssetKeys[partitionName] || [])
+ .slice()
+ .sort(sortAssetKeys)
+ .map((assetKey) => ({
+ assetKey,
+ detailType: AssetDetailType.WillUpdate,
+ })),
],
];
}),