From 4ff4d374429d1291c257537973431fb13ac53e5c Mon Sep 17 00:00:00 2001 From: dushixiang Date: Sat, 21 May 2022 15:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E4=BB=BB=E5=8A=A1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/devops/Job.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/components/devops/Job.js b/web/src/components/devops/Job.js index 150cde0..600a47f 100644 --- a/web/src/components/devops/Job.js +++ b/web/src/components/devops/Job.js @@ -148,7 +148,15 @@ class Job extends Component { }); }; - showModal(title, obj = null) { + showModal = async (title, obj = null) => { + if (obj['id']) { + let result = await request.get(`/jobs/${obj['id']}`); + if (result.code !== 1) { + message.error(result.message); + return; + } + obj = result.data; + } if (obj['func'] === 'shell-job') { obj['shell'] = JSON.parse(obj['metadata'])['shell']; }