@@ -11,11 +11,14 @@ import type {MetaClusterVersion} from '../../../types/api/meta';
11
11
import type { ETenantType } from '../../../types/api/tenant' ;
12
12
import { getVersionColors , getVersionMap } from '../../../utils/clusterVersionColors' ;
13
13
import { cn } from '../../../utils/cn' ;
14
+ import { USE_CLUSTER_BALANCER_AS_BACKEND_KEY } from '../../../utils/constants' ;
15
+ import { useSetting } from '../../../utils/hooks' ;
16
+ import { useAdditionalNodesProps } from '../../../utils/hooks/useAdditionalNodesProps' ;
14
17
import type { GetMonitoringClusterLink , GetMonitoringLink } from '../../../utils/monitoring' ;
15
18
import { getCleanBalancerValue , removeViewerPathname } from '../../../utils/parseBalancer' ;
16
19
import { getBackendFromNodeHost , getBackendFromRawNodeData } from '../../../utils/prepareBackend' ;
17
20
import type { Cluster } from '../../Cluster/Cluster' ;
18
- import { useClusterData } from '../useClusterData' ;
21
+ import { useClusterVersions } from '../useClusterData' ;
19
22
20
23
import './ExtendedCluster.scss' ;
21
24
@@ -123,10 +126,12 @@ export function ExtendedCluster({
123
126
getMonitoringLink,
124
127
getMonitoringClusterLink,
125
128
} : ExtendedClusterProps ) {
126
- const { versions, useClusterBalancerAsBackend , additionalNodesProps } = useClusterData ( ) ;
127
-
129
+ const versions = useClusterVersions ( ) ;
130
+ const additionalNodesProps = useAdditionalNodesProps ( ) ;
128
131
const { name, balancer, monitoring} = useClusterBaseInfo ( ) ;
129
132
133
+ const [ useClusterBalancerAsBackend ] = useSetting < boolean > ( USE_CLUSTER_BALANCER_AS_BACKEND_KEY ) ;
134
+
130
135
return (
131
136
< div className = { b ( ) } >
132
137
< ClusterComponent
0 commit comments