This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 869aeb05e4 [INLONG-9530][Dashboard] Dataproxy cluster nodes support
adding the enabledOnline parameter (#9540)
869aeb05e4 is described below
commit 869aeb05e474a80cb5ba8f03ed8d90ba2b18e070
Author: Lizhen <[email protected]>
AuthorDate: Thu Dec 28 16:29:13 2023 +0800
[INLONG-9530][Dashboard] Dataproxy cluster nodes support adding the
enabledOnline parameter (#9540)
---
inlong-dashboard/src/ui/locales/cn.json | 1 +
inlong-dashboard/src/ui/locales/en.json | 1 +
.../src/ui/pages/Clusters/NodeEditModal.tsx | 20 ++++++++++++++++++++
.../src/ui/pages/Clusters/NodeManage.tsx | 18 ++++++++++++++++--
4 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/inlong-dashboard/src/ui/locales/cn.json
b/inlong-dashboard/src/ui/locales/cn.json
index 179b7462ac..aebc6051da 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 823d345706..dc893aa342 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 8e85977ab6..9ced80eb68 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<NodeEditModalProps> = ({ 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 4a1c93e6d8..1de113f003 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 (
- <PageContainer breadcrumb={[{ name: `${type}
${i18n.t('pages.Clusters.Node.Name')}` }]}>
+ <PageContainer
+ breadcrumb={[
+ {
+ name: `${type === 'DATAPROXY' ? 'DataProxy' : 'Agent'} ${i18n.t(
+ 'pages.Clusters.Node.Name',
+ )}`,
+ },
+ ]}
+ >
<HighTable
filterForm={{
content: getFilterFormContent(options),
@@ -177,7 +190,8 @@ const Comp: React.FC = () => {
</Button>
}
table={{
- columns,
+ columns:
+ type === 'AGENT' ? columns.filter(item => item.dataIndex !==
'enabledOnline') : columns,
rowKey: 'id',
dataSource: data?.list,
pagination,