@@ -28,10 +28,11 @@ import { Clip } from '../../../../common/components';
2828import { DialogNameEnum } from '../../../models' ;
2929import { RootProps } from '../../ClusterApp' ;
3030import { ClusterStatus } from '../../clusterManage/ClusterTablePanel' ;
31+ import { ContainerRuntimeEnum } from '@src/modules/cluster/constants/Config' ;
3132
3233export class ClusterDetailBasicInfoPanel extends React . Component < RootProps , { } > {
3334 render ( ) {
34- let { cluster } = this . props ;
35+ const { cluster } = this . props ;
3536
3637 return (
3738 < FormPanel title = { t ( '基本信息' ) } >
@@ -44,20 +45,20 @@ export class ClusterDetailBasicInfoPanel extends React.Component<RootProps, {}>
4445 ) ;
4546 }
4647 _renderNodeMax ( ) {
47- let { cluster } = this . props ;
48- let clusterInfo : Cluster = cluster . selection ;
48+ const { cluster } = this . props ;
49+ const clusterInfo : Cluster = cluster . selection ;
4950 if ( clusterInfo && clusterInfo . spec . clusterCIDR ) {
50- let b = clusterInfo . spec . clusterCIDR . split ( '/' ) [ 1 ] ;
51- let { maxNodePodNum, maxClusterServiceNum } = clusterInfo . spec . properties ;
51+ const b = clusterInfo . spec . clusterCIDR . split ( '/' ) [ 1 ] ;
52+ const { maxNodePodNum, maxClusterServiceNum } = clusterInfo . spec . properties ;
5253 return Math . pow ( 2 , 32 - parseInt ( b ) ) / maxNodePodNum - Math . ceil ( maxClusterServiceNum / maxNodePodNum ) ;
5354 } else {
5455 return '' ;
5556 }
5657 }
5758 /** 处理开关日志采集组件的的操作 */
5859 private _handleSwitch ( cluster : Cluster ) {
59- let { actions, route } = this . props ;
60- let enableLogAgent = ! cluster . spec . logAgentName ;
60+ const { actions, route } = this . props ;
61+ const enableLogAgent = ! cluster . spec . logAgentName ;
6162 if ( enableLogAgent ) {
6263 actions . cluster . enableLogAgent ( cluster ) ;
6364 } else {
@@ -70,9 +71,9 @@ export class ClusterDetailBasicInfoPanel extends React.Component<RootProps, {}>
7071 }
7172 /** 展示集群的基本信息 */
7273 private _renderClusterInfo ( ) {
73- let { actions, cluster } = this . props ;
74- let clusterInfo : Cluster = cluster . selection ;
75- let nodeMax = this . _renderNodeMax ( ) ;
74+ const { actions, cluster } = this . props ;
75+ const clusterInfo : Cluster = cluster . selection ;
76+ const nodeMax = this . _renderNodeMax ( ) ;
7677 return cluster . selection ? (
7778 < React . Fragment >
7879 < FormPanel . Item label = { t ( '集群名称' ) } text >
@@ -89,6 +90,9 @@ export class ClusterDetailBasicInfoPanel extends React.Component<RootProps, {}>
8990 < FormPanel . Item label = { t ( 'Kubernetes版本' ) } text >
9091 { clusterInfo . status . version }
9192 </ FormPanel . Item >
93+ < FormPanel . Item label = { t ( '运行时组件' ) } text >
94+ { clusterInfo ?. spec ?. features ?. enableContainerRuntime ?? ContainerRuntimeEnum . DOCKER }
95+ </ FormPanel . Item >
9296 { clusterInfo . spec . networkDevice && (
9397 < FormPanel . Item label = { t ( '网卡名称' ) } text >
9498 { clusterInfo . spec . networkDevice }
0 commit comments