From 124d1e88846d87bd0e54fcdd25977f355e1abad7 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Sun, 8 Oct 2023 04:54:15 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=AF=E5=8A=A8=E4=B8=AD=E7=9A=84=20?= =?UTF-8?q?node.js=20=E8=BF=90=E8=A1=8C=E7=8E=AF=E5=A2=83=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E7=BC=96=E8=BE=91=E3=80=81=E5=81=9C=E6=AD=A2=E7=AD=89?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=20(#2466)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/website/runtime/node/index.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/website/runtime/node/index.vue b/frontend/src/views/website/runtime/node/index.vue index 15367267e..b9e1182c4 100644 --- a/frontend/src/views/website/runtime/node/index.vue +++ b/frontend/src/views/website/runtime/node/index.vue @@ -128,7 +128,7 @@ const buttons = [ operateRuntime('down', row.id); }, disabled: function (row: Runtime.Runtime) { - return disabledRuntime(row) || row.status === 'stopped'; + return row.status === 'recreating' || row.status === 'stopped'; }, }, { @@ -137,7 +137,7 @@ const buttons = [ operateRuntime('up', row.id); }, disabled: function (row: Runtime.Runtime) { - return disabledRuntime(row) || row.status === 'running'; + return row.status === 'starting' || row.status === 'recreating' || row.status === 'running'; }, }, { @@ -146,7 +146,7 @@ const buttons = [ operateRuntime('restart', row.id); }, disabled: function (row: Runtime.Runtime) { - return disabledRuntime(row); + return row.status === 'recreating'; }, }, { @@ -155,7 +155,7 @@ const buttons = [ openDetail(row); }, disabled: function (row: Runtime.Runtime) { - return disabledRuntime(row); + return row.status === 'recreating'; }, }, { @@ -166,10 +166,6 @@ const buttons = [ }, ]; -const disabledRuntime = (row: Runtime.Runtime) => { - return row.status === 'starting' || row.status === 'recreating'; -}; - const search = async () => { req.page = paginationConfig.currentPage; req.pageSize = paginationConfig.pageSize;