diff --git a/inlong-dashboard/src/ui/locales/cn.json b/inlong-dashboard/src/ui/locales/cn.json index 179b7462ac2..aebc6051da0 100644 --- a/inlong-dashboard/src/ui/locales/cn.json +++ b/inlong-dashboard/src/ui/locales/cn.json @@ -741,6 +741,7 @@ "pages.Clusters.Node.IpRule": "请输入正确的IP地址", "pages.Clusters.Node.PortRule": "请输入正确的端口", "pages.Clusters.Node.ProtocolTypeRule": "请输入正确的协议类型", + "pages.Clusters.Node.Online": "在线", "pages.Clusters.Pulsar.Tenant": "默认租户", "pages.Clusters.Pulsar.TokenPlaceholder": "如果群集配置了令牌,则为必需", "pages.Clusters.Kafka.ClusterUrl": "集群 URL", diff --git a/inlong-dashboard/src/ui/locales/en.json b/inlong-dashboard/src/ui/locales/en.json index 823d3457062..dc893aa3424 100644 --- a/inlong-dashboard/src/ui/locales/en.json +++ b/inlong-dashboard/src/ui/locales/en.json @@ -741,6 +741,7 @@ "pages.Clusters.Node.IpRule": "Please enter the IP address correctly", "pages.Clusters.Node.PortRule": "Please enter the port address correctly", "pages.Clusters.Node.ProtocolTypeRule": "Please enter the protocol type correctly", + "pages.Clusters.Node.Online": "Online", "pages.Clusters.Pulsar.Tenant": "Default tenant", "pages.Clusters.Pulsar.TokenPlaceholder": "Required if the cluster is configured with Token", "pages.Clusters.Kafka.ClusterUrl": "Cluster url", diff --git a/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx b/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx index 8e85977ab66..9ced80eb681 100644 --- a/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx +++ b/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx @@ -106,6 +106,26 @@ const NodeEditModal: React.FC = ({ id, type, clusterId, ...m max: 65535, }, }, + { + type: 'radio', + label: i18n.t('pages.Clusters.Node.Online'), + name: 'enabledOnline', + initialValue: true, + hidden: type !== 'DATAPROXY', + rules: [{ required: true }], + props: { + options: [ + { + label: i18n.t('basic.Yes'), + value: true, + }, + { + label: i18n.t('basic.No'), + value: false, + }, + ], + }, + }, { type: 'select', label: i18n.t('pages.Clusters.Node.ProtocolType'), diff --git a/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx b/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx index 4a1c93e6d85..1de113f003f 100644 --- a/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx +++ b/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx @@ -126,6 +126,11 @@ const Comp: React.FC = () => { title: i18n.t('pages.Clusters.Node.Port'), dataIndex: 'port', }, + { + title: i18n.t('pages.Clusters.Node.Online'), + dataIndex: 'enabledOnline', + render: text => (text !== undefined ? text.toString() : ''), + }, { title: i18n.t('pages.Clusters.Node.ProtocolType'), dataIndex: 'protocolType', @@ -165,7 +170,15 @@ const Comp: React.FC = () => { }, [onDelete]); return ( - + { } table={{ - columns, + columns: + type === 'AGENT' ? columns.filter(item => item.dataIndex !== 'enabledOnline') : columns, rowKey: 'id', dataSource: data?.list, pagination,