Browse Source

停止任务链接。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
47a58d7170
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      templates/repo/modelmanage/convertIndex.tmpl

+ 6
- 1
templates/repo/modelmanage/convertIndex.tmpl View File

@@ -100,7 +100,7 @@
<form id="stopForm-{{.ID}}" style="margin-left:-1px;" action="{{$.RepoLink}}/modelmanage/convert_stop/{{.ID}}" method="post">
{{$.CsrfTokenHtml}}
{{if .IsCanOper}}
<a id="ai-stop-{{.ID}}" href="javascript:document.stopForm-{{.ID}}.submit();" class='ui basic model_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' >
<a id="ai-stop-{{.ID}}" href="javascript:stopTask({{.ID}});" class='ui basic model_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' >
{{$.i18n.Tr "repo.stop"}}
</a>
{{else}}
@@ -309,6 +309,11 @@
})
})

function stopTask(id){
console.log("stop form stopForm-" + id);
document.getElementById("stopForm-" + id).submit();
}

function createModelName(){
let repoName = location.pathname.split('/')[2]
let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4)


Loading…
Cancel
Save