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) {