This is an automated email from the ASF dual-hosted git repository.
aloyszhang 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 6c6caaa8d6 [INLONG-11780][Dashboard] DataProxy node edit failed
(#11781)
6c6caaa8d6 is described below
commit 6c6caaa8d60e40f5365dfde0deb888c0a8e50332
Author: kamianlaida <[email protected]>
AuthorDate: Wed Feb 26 10:55:36 2025 +0800
[INLONG-11780][Dashboard] DataProxy node edit failed (#11781)
---
.../src/ui/pages/Clusters/NodeEditModal.tsx | 1 +
.../src/ui/pages/Clusters/NodeManage.tsx | 68 +++++++++++++---------
2 files changed, 40 insertions(+), 29 deletions(-)
diff --git a/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx
b/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx
index 0496e820cf..856af46cf7 100644
--- a/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx
+++ b/inlong-dashboard/src/ui/pages/Clusters/NodeEditModal.tsx
@@ -244,6 +244,7 @@ const NodeEditModal: React.FC<NodeEditModalProps> = ({ id,
type, clusterId, ...m
name: 'isInstall',
initialValue: false,
hidden: type !== 'AGENT',
+ visible: () => form.getFieldValue('type') === 'AGENT',
rules: [{ required: true }],
props: {
onChange: ({ target: { value } }) => {
diff --git a/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx
b/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx
index 74ab2112e5..051a7f4777 100644
--- a/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx
+++ b/inlong-dashboard/src/ui/pages/Clusters/NodeManage.tsx
@@ -339,7 +339,7 @@ const Comp: React.FC = () => {
title: i18n.t('basic.Operating'),
dataIndex: 'action',
key: 'operation',
- width: isSmall ? 200 : 400,
+ width: 200,
render: (text, record) => (
<>
<Button type="link" onClick={() => onEdit(record)}>
@@ -367,7 +367,7 @@ const Comp: React.FC = () => {
title: i18n.t('basic.Operating'),
dataIndex: 'action',
key: 'operation',
- width: isSmall ? 200 : 400,
+ width: type !== 'AGENT' ? 200 : 400,
render: (text, record) => (
<>
<Button type="link" onClick={() => onEdit(record)}>
@@ -376,33 +376,43 @@ const Comp: React.FC = () => {
<Button type="link" onClick={() => onDelete(record)}>
{i18n.t('basic.Delete')}
</Button>
- <Button
- type="link"
- onClick={() => getNodeData(record.id).then(() =>
setOperationType('onInstall'))}
- >
- {i18n.t('pages.Cluster.Node.Install')}
- </Button>
- <Button
- type="link"
- onClick={() => getNodeData(record.id).then(() =>
setOperationType('onRestart'))}
- >
- {i18n.t('pages.Nodes.Restart')}
- </Button>
- <Button
- type="link"
- onClick={() => getNodeData(record.id).then(() =>
setOperationType('onUnload'))}
- >
- {i18n.t('pages.Cluster.Node.Unload')}
- </Button>
- <Button type="link" onClick={() => onLog(record)}>
- {i18n.t('pages.Cluster.Node.InstallLog')}
- </Button>
- <Button type="link" onClick={() => openHeartModal(record)}>
- {i18n.t('pages.Clusters.Node.Agent.HeartbeatDetection')}
- </Button>
- <Button type="link" onClick={() =>
openOperationLogModal(record)}>
- {i18n.t('pages.GroupDetail.OperationLog')}
- </Button>
+ {type === 'AGENT' && (
+ <>
+ <Button
+ type="link"
+ onClick={() =>
+ getNodeData(record.id).then(() =>
setOperationType('onInstall'))
+ }
+ >
+ {i18n.t('pages.Cluster.Node.Install')}
+ </Button>
+ <Button
+ type="link"
+ onClick={() =>
+ getNodeData(record.id).then(() =>
setOperationType('onRestart'))
+ }
+ >
+ {i18n.t('pages.Nodes.Restart')}
+ </Button>
+ <Button
+ type="link"
+ onClick={() =>
+ getNodeData(record.id).then(() =>
setOperationType('onUnload'))
+ }
+ >
+ {i18n.t('pages.Cluster.Node.Unload')}
+ </Button>
+ <Button type="link" onClick={() => onLog(record)}>
+ {i18n.t('pages.Cluster.Node.InstallLog')}
+ </Button>
+ <Button type="link" onClick={() => openHeartModal(record)}>
+ {i18n.t('pages.Clusters.Node.Agent.HeartbeatDetection')}
+ </Button>
+ <Button type="link" onClick={() =>
openOperationLogModal(record)}>
+ {i18n.t('pages.GroupDetail.OperationLog')}
+ </Button>
+ </>
+ )}
</>
),
},