From 9485289641490e29781e1b9a98750d086d0c5cea Mon Sep 17 00:00:00 2001 From: vapao Date: Sat, 23 May 2020 18:30:29 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=8F=91=E5=B8=83=E5=9C=A8=E6=97=A0=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E5=8A=A8=E4=BD=9C=E6=97=B6=E5=8F=91=E5=B8=83=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9C=AA=E6=AD=A3=E5=B8=B8=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/deploy/utils.py | 4 +++- spug_web/src/pages/deploy/do/Ext2Index.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spug_api/apps/deploy/utils.py b/spug_api/apps/deploy/utils.py index c1f443e..266a58b 100644 --- a/spug_api/apps/deploy/utils.py +++ b/spug_api/apps/deploy/utils.py @@ -121,6 +121,8 @@ def _ext2_deploy(req, helper, env): if exception: helper.send_error(h_id, f'Exception: {exception}') raise exception + else: + helper.send_step('local', 100, f'\r\n{human_time()} ** 发布成功 **') def _deploy_ext1_host(helper, h_id, extend, env): @@ -180,7 +182,7 @@ def _deploy_ext2_host(helper, h_id, actions, env): helper.send_step(h_id, 2 + index, f'{human_time()} {action["title"]}...\r\n') helper.remote(host.id, ssh, f'cd /tmp && {action["data"]}', env) - helper.send_step(h_id, 100, f'\r\n{human_time()}** 发布成功 **') + helper.send_step(h_id, 100, f'\r\n{human_time()} ** 发布成功 **') class Helper: diff --git a/spug_web/src/pages/deploy/do/Ext2Index.js b/spug_web/src/pages/deploy/do/Ext2Index.js index 2555967..3671792 100644 --- a/spug_web/src/pages/deploy/do/Ext2Index.js +++ b/spug_web/src/pages/deploy/do/Ext2Index.js @@ -99,7 +99,8 @@ class Ext1Index extends React.Component { getStatusAlias = () => { if (Object.keys(store.outputs).length !== 0) { - for (let item of [{id: 'local'}, ...store.request.targets]) { + const {targets, host_actions} = store.request; + for (let item of [{id: 'local'}, ...(host_actions.length > 0 ? targets : [])]) { if (lds.get(store.outputs, `${item.id}.status`) === 'error') { return 发布异常 } else if (lds.get(store.outputs, `${item.id}.step`, -1) < 100) {