| @@ -100,7 +100,7 @@ | |||||
| <form id="stopForm-{{.ID}}" style="margin-left:-1px;" action="{{$.RepoLink}}/modelmanage/convert_stop/{{.ID}}" method="post"> | <form id="stopForm-{{.ID}}" style="margin-left:-1px;" action="{{$.RepoLink}}/modelmanage/convert_stop/{{.ID}}" method="post"> | ||||
| {{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
| {{if .IsCanOper}} | {{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"}} | {{$.i18n.Tr "repo.stop"}} | ||||
| </a> | </a> | ||||
| {{else}} | {{else}} | ||||
| @@ -309,6 +309,11 @@ | |||||
| }) | }) | ||||
| }) | }) | ||||
| function stopTask(id){ | |||||
| console.log("stop form stopForm-" + id); | |||||
| document.getElementById("stopForm-" + id).submit(); | |||||
| } | |||||
| function createModelName(){ | function createModelName(){ | ||||
| let repoName = location.pathname.split('/')[2] | let repoName = location.pathname.split('/')[2] | ||||
| let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4) | let modelName = repoName + '_modelConvert_' + Math.random().toString(36).substr(2, 4) | ||||