From c9e3e6997490b3cd941837868630b9cde98d61ad Mon Sep 17 00:00:00 2001 From: fengyang_sy Date: Thu, 16 Jun 2022 15:17:38 +0800 Subject: [PATCH] [#issue-457]Modify node operation list Modify node operation list, operation type Signed-off-by: fengyang_sy --- .../src/pages/Operator/Node/index.js | 61 ++++++++----------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/src/dashboard/src/pages/Operator/Node/index.js b/src/dashboard/src/pages/Operator/Node/index.js index 69b452dc2..45d8c18b8 100644 --- a/src/dashboard/src/pages/Operator/Node/index.js +++ b/src/dashboard/src/pages/Operator/Node/index.js @@ -566,39 +566,11 @@ class Index extends PureComponent { )} - { - record.status === 'stopped' && - - this.operationForNode('start', record)}> - {intl.formatMessage({ - id: 'app.operator.node.table.operation.start', - defaultMessage: 'Start', - })} - - - } - { - record.status === 'running' && - - this.operationForNode('stop', record)}> - {intl.formatMessage({ - id: 'app.operator.node.table.operation.stop', - defaultMessage: 'Stop', - })} - - - } - { - record.status === 'stopped' && - - this.operationForNode('restart', record)}> - {intl.formatMessage({ - id: 'app.operator.node.table.operation.restart', - defaultMessage: 'Restart', - })} - - - } + + this.handleDeleteNode(record)}> + {intl.formatMessage({ id: 'form.menu.item.delete', defaultMessage: 'Delete' })} + + ); @@ -652,9 +624,26 @@ class Index extends PureComponent { }), render: (text, record) => ( - this.handleDeleteNode(record)}> - {intl.formatMessage({ id: 'form.menu.item.delete', defaultMessage: 'Delete' })} - + { + record.status === 'running' && + this.operationForNode('stop', record)}> + {intl.formatMessage({ + id: 'app.operator.node.table.operation.stop', + defaultMessage: 'Stop', + })} + + } + { + record.status === 'stopped' && + + this.operationForNode('start', record)}> + {intl.formatMessage({ + id: 'app.operator.node.table.operation.start', + defaultMessage: 'Start', + })} + + + }