Skip to content

Commit

Permalink
[INLONG-9530][Dashboard] Dataproxy cluster nodes support adding the e…
Browse files Browse the repository at this point in the history
…nabledOnline parameter (#9540)
  • Loading branch information
bluewang authored Dec 28, 2023
1 parent a1523ec commit 869aeb0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions inlong-dashboard/src/ui/locales/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions inlong-dashboard/src/ui/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
18 changes: 16 additions & 2 deletions inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit 869aeb0

Please sign in to comment.