From 0e123467f96e70b0a68a80e9cb80275cdc1994be Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 21 Dec 2021 17:25:46 +0800 Subject: [PATCH] fix issue --- templates/repo/debugjob/index.tmpl | 32 ++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/templates/repo/debugjob/index.tmpl b/templates/repo/debugjob/index.tmpl index ba76fa11f..14395e2e0 100755 --- a/templates/repo/debugjob/index.tmpl +++ b/templates/repo/debugjob/index.tmpl @@ -337,18 +337,23 @@ -
+ {{$.CsrfTokenHtml}} {{if .CanDel}} - - {{$.i18n.Tr "repo.stop"}} - + {{if eq .ComputeResource "CPU/GPU" }} + + {{$.i18n.Tr "repo.stop"}} + + {{else}} + + {{$.i18n.Tr "repo.stop"}} + + {{end}} {{else}} - + {{$.i18n.Tr "repo.stop"}} {{end}} -
@@ -514,6 +519,21 @@ document.getElementById(`debugAgainForm-${JobID}`).submit(); } + } + function stopDebug(JobID,stopUrl){ + $.ajax({ + type:"POST", + url:stopUrl, + data:$('#stopForm-'+JobID).serialize(), + success:function(res){ + console.log(res) + }, + error :function(res){ + console.log(res) + + } + }) + } // 加载任务状态 var timeid = window.setInterval(loadJobStatus, 15000);