From 014dd163b500a4b825b9ecef55f6628d631c8331 Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 22 Mar 2021 23:35:49 +0800 Subject: [PATCH] update --- spug_api/apps/deploy/views.py | 4 ++-- .../src/pages/deploy/request/Ext2Console.js | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/spug_api/apps/deploy/views.py b/spug_api/apps/deploy/views.py index e9b3458..8326390 100644 --- a/spug_api/apps/deploy/views.py +++ b/spug_api/apps/deploy/views.py @@ -124,10 +124,10 @@ class RequestDetailView(View): if not req: return json_response(error='未找到指定发布申请') hosts = Host.objects.filter(id__in=json.loads(req.host_ids)) - outputs = {x.id: {'id': x.id, 'title': x.name, 'data': []} for x in hosts} + outputs = {x.id: {'id': x.id, 'title': x.name, 'data': [f'{human_time()} 读取数据... ']} for x in hosts} response = {'outputs': outputs, 'status': req.status} if req.deploy.extend == '2': - outputs['local'] = {'id': 'local', 'data': []} + outputs['local'] = {'id': 'local', 'data': [f'{human_time()} 读取数据... ']} response['s_actions'] = json.loads(req.deploy.extend_obj.server_actions) response['h_actions'] = json.loads(req.deploy.extend_obj.host_actions) rds, key, counter = get_redis_connection(), f'{settings.REQUEST_KEY}:{r_id}', 0 diff --git a/spug_web/src/pages/deploy/request/Ext2Console.js b/spug_web/src/pages/deploy/request/Ext2Console.js index 651b2a7..95914d3 100644 --- a/spug_web/src/pages/deploy/request/Ext2Console.js +++ b/spug_web/src/pages/deploy/request/Ext2Console.js @@ -90,7 +90,7 @@ function Ext2Console(props) { store.showConsole(props.request, true)}/> + status={outputs.local.step === 100 ? 'success' : outputs.local.status === 'error' ? 'exception' : 'active'}/> {Object.values(outputs).filter(x => x.id !== 'local').map(item => ( - - {sActions.map((item, index) => ( - - ))} - +
+ + + + {sActions.map((item, index) => ( + + ))} + +
)}>
@@ -134,7 +137,7 @@ function Ext2Console(props) { key={index} header={
- {item.title}{item.step} + {item.title} {hActions.map((action, index) => (