Skip to content

Commit 424b17a

Browse files
authored
[1/n][Asset Health] Add descriptions to health summary card (#29256)
## Summary & Motivation 1. Add descriptions. 2. Fix the order of events in the health trend. ## How I Tested These Changes <img width="1440" alt="Screenshot 2025-04-14 at 12 09 29 PM" src="https://github.com/user-attachments/assets/fe9bccd6-aca5-4b2c-8bd4-aeeb126bfe54" /> <img width="365" alt="Screenshot 2025-04-14 at 12 09 09 PM" src="https://github.com/user-attachments/assets/73a6cb5b-a036-46bd-b62c-be206112a3e0" /> <img width="361" alt="Screenshot 2025-04-14 at 12 09 02 PM" src="https://github.com/user-attachments/assets/2dada884-07a7-4a20-a1c8-03f3d04869b8" /> <img width="375" alt="Screenshot 2025-04-14 at 12 08 57 PM" src="https://github.com/user-attachments/assets/095a5fcf-a700-4353-9d77-6d0987465980" /> <img width="375" alt="Screenshot 2025-04-14 at 12 08 50 PM" src="https://github.com/user-attachments/assets/c39d2c39-bd2c-4a00-877e-651482d2d402" /> <img width="466" alt="Screenshot 2025-04-14 at 12 22 24 PM" src="https://github.com/user-attachments/assets/50adff64-0570-4bcd-bb9b-5bee779c1b0d" /> <img width="373" alt="Screenshot 2025-04-14 at 12 22 17 PM" src="https://github.com/user-attachments/assets/b8839a4a-7a6d-4260-af7b-fec517c20b9c" />
1 parent 138295a commit 424b17a

File tree

7 files changed

+351
-42
lines changed

7 files changed

+351
-42
lines changed

Diff for: js_modules/dagster-ui/packages/ui-core/client.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetHealthDataProvider.tsx

+40
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,50 @@ export const ASSETS_HEALTH_INFO_QUERY = gql`
7070
assetHealth {
7171
assetHealth
7272
materializationStatus
73+
materializationStatusMetadata {
74+
...AssetHealthMaterializationDegradedPartitionedMetaFragment
75+
...AssetHealthMaterializationWarningPartitionedMetaFragment
76+
...AssetHealthMaterializationDegradedNotPartitionedMetaFragment
77+
}
7378
assetChecksStatus
79+
assetChecksStatusMetadata {
80+
...AssetHealthCheckDegradedMetaFragment
81+
...AssetHealthCheckWarningMetaFragment
82+
...AssetHealthCheckUnknownMetaFragment
83+
}
7484
freshnessStatus
7585
}
7686
}
87+
88+
fragment AssetHealthMaterializationDegradedPartitionedMetaFragment on AssetHealthMaterializationDegradedPartitionedMeta {
89+
numMissingPartitions
90+
totalNumPartitions
91+
}
92+
93+
fragment AssetHealthMaterializationWarningPartitionedMetaFragment on AssetHealthMaterializationWarningPartitionedMeta {
94+
numMissingPartitions
95+
totalNumPartitions
96+
}
97+
98+
fragment AssetHealthMaterializationDegradedNotPartitionedMetaFragment on AssetHealthMaterializationDegradedNotPartitionedMeta {
99+
failedRunId
100+
}
101+
102+
fragment AssetHealthCheckDegradedMetaFragment on AssetHealthCheckDegradedMeta {
103+
numFailedChecks
104+
numWarningChecks
105+
totalNumChecks
106+
}
107+
108+
fragment AssetHealthCheckWarningMetaFragment on AssetHealthCheckWarningMeta {
109+
numWarningChecks
110+
totalNumChecks
111+
}
112+
113+
fragment AssetHealthCheckUnknownMetaFragment on AssetHealthCheckUnknownMeta {
114+
numNotExecutedChecks
115+
totalNumChecks
116+
}
77117
`;
78118

79119
// For tests

Diff for: js_modules/dagster-ui/packages/ui-core/src/asset-data/types/AssetHealthDataProvider.types.ts

+99-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js_modules/dagster-ui/packages/ui-core/src/assets/AssetCatalogTableV2.tsx

+18-26
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import relativeTime from 'dayjs/plugin/relativeTime';
1919
import updateLocale from 'dayjs/plugin/updateLocale';
2020
import React, {useCallback, useMemo, useRef, useState} from 'react';
2121
import {Link} from 'react-router-dom';
22+
import {CreateCatalogViewButton} from 'shared/assets/CreateCatalogViewButton.oss';
2223
import styled from 'styled-components';
2324

2425
import {AssetHealthStatusString, STATUS_INFO, statusToIconAndColor} from './AssetHealthSummary';
@@ -33,7 +34,6 @@ import {AssetTableFragment} from './types/AssetTableFragment.types';
3334
import {useAssetsHealthData} from '../asset-data/AssetHealthDataProvider';
3435
import {AssetHealthFragment} from '../asset-data/types/AssetHealthDataProvider.types';
3536
import {useAssetSelectionInput} from '../asset-selection/input/useAssetSelectionInput';
36-
import {useDebugChanged} from '../hooks/useDebugChanged';
3737
import {useBlockTraceUntilTrue} from '../performance/TraceContext';
3838
import {SyntaxError} from '../selection/CustomErrorListener';
3939
import {IndeterminateLoadingBar} from '../ui/IndeterminateLoadingBar';
@@ -65,8 +65,6 @@ export const AssetsCatalogTableV2Impl = React.memo(() => {
6565
useMemo(() => filtered.map((asset) => asAssetKeyInput(asset.key)), [filtered]),
6666
);
6767

68-
console.log(Object.keys(liveDataByNode).length);
69-
7068
const healthDataLoading = useMemo(() => {
7169
return Object.values(liveDataByNode).length !== filtered.length;
7270
}, [liveDataByNode, filtered]);
@@ -98,27 +96,6 @@ export const AssetsCatalogTableV2Impl = React.memo(() => {
9896
}
9997
}, [selectedTab, filtered, groupedByStatus, loading]);
10098

101-
useDebugChanged([
102-
liveDataByNode,
103-
filtered,
104-
assets,
105-
errorState,
106-
filterInput,
107-
loading,
108-
assetsLoading,
109-
error,
110-
selectedTab,
111-
groupedByStatus,
112-
content,
113-
healthDataLoading,
114-
assetsLoading,
115-
loading,
116-
error,
117-
selectedTab,
118-
groupedByStatus,
119-
content,
120-
]);
121-
12299
if (error) {
123100
return <PythonErrorInfo error={error} />;
124101
}
@@ -140,7 +117,13 @@ export const AssetsCatalogTableV2Impl = React.memo(() => {
140117
minHeight: 600,
141118
}}
142119
>
143-
<Box padding={{vertical: 12, horizontal: 24}}>{filterInput}</Box>
120+
<Box
121+
flex={{direction: 'row', alignItems: 'center', gap: 8}}
122+
padding={{vertical: 12, horizontal: 24}}
123+
>
124+
<Box flex={{grow: 1, shrink: 1}}>{filterInput}</Box>
125+
<CreateCatalogViewButton />
126+
</Box>
144127
<IndeterminateLoadingBar $loading={loading || healthDataLoading} />
145128
<Box border="bottom">
146129
<Tabs
@@ -368,7 +351,16 @@ const AssetRow = React.memo(({asset}: {asset: AssetHealthFragment}) => {
368351
</AssetIconWrapper>
369352
{asset.assetKey.path.join(' / ')}
370353
</Box>
371-
<AssetRecentUpdatesTrend asset={asset} />
354+
{/* Prevent clicks on the trend from propoagating to the row and triggering the link */}
355+
<div
356+
onClick={(e) => {
357+
e.stopPropagation();
358+
e.preventDefault();
359+
}}
360+
className="test"
361+
>
362+
<AssetRecentUpdatesTrend asset={asset} />
363+
</div>
372364
</Box>
373365
</RowWrapper>
374366
);

0 commit comments

Comments
 (0)