Skip to content

Commit 69f0d90

Browse files
committed
also gate health data
1 parent a73a0e5 commit 69f0d90

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import {FeatureFlag} from 'shared/app/FeatureFlags.oss';
23

34
import {ApolloClient, gql, useApolloClient} from '../apollo-client';
45
import {AssetBaseData} from './AssetBaseDataProvider';
@@ -8,13 +9,17 @@ import {liveDataFactory} from '../live-data-provider/Factory';
89
import {LiveDataThreadID} from '../live-data-provider/LiveDataThread';
910
import {useBlockTraceUntilTrue} from '../performance/TraceContext';
1011
import {AssetHealthQuery, AssetHealthQueryVariables} from './types/AssetHealthDataProvider.types';
12+
import {featureEnabled} from '../app/Flags';
1113

1214
function init() {
1315
return liveDataFactory(
1416
() => {
1517
return useApolloClient();
1618
},
1719
async (keys, client: ApolloClient<any>) => {
20+
if (!featureEnabled(FeatureFlag.flagUseNewObserveUIs)) {
21+
return Object.fromEntries(keys.map((key) => [key, null]));
22+
}
1823
const assetKeys = keys.map(tokenToAssetKey);
1924
const healthResponse = await client.query<AssetHealthQuery, AssetHealthQueryVariables>({
2025
query: ASSETS_HEALTH_INFO_QUERY,

0 commit comments

Comments
 (0)