Browse Source

停止任务链接。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
ccd538d262
2 changed files with 9 additions and 7 deletions
  1. +1
    -1
      routers/routes/routes.go
  2. +8
    -6
      templates/repo/modelmanage/convertIndex.tmpl

+ 1
- 1
routers/routes/routes.go View File

@@ -366,7 +366,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/user", func() { m.Group("/user", func() {
m.Get("/login", user.SignIn) m.Get("/login", user.SignIn)
m.Get("/login/cloud_brain", user.SignInCloudBrain) m.Get("/login/cloud_brain", user.SignInCloudBrain)
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost) m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
m.Group("", func() { m.Group("", func() {
m.Combo("/login/openid"). m.Combo("/login/openid").


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

@@ -97,15 +97,17 @@
<div class="three wide column text center padding0"> <div class="three wide column text center padding0">
<div class="ui compact buttons" > <div class="ui compact buttons" >
<!-- 停止任务 --> <!-- 停止任务 -->
{{if .IsCanOper}}
<a id="ai-stop-{{.ID}}" href="{{$.RepoLink}}/modelmanage/convert_stop/{{.ID}}" class='ui basic model_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' >
<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' >
{{$.i18n.Tr "repo.stop"}} {{$.i18n.Tr "repo.stop"}}
</a> </a>
{{else}}
{{else}}
<a class="ui basic disabled button">{{$.i18n.Tr "repo.stop"}} </a> <a class="ui basic disabled button">{{$.i18n.Tr "repo.stop"}} </a>
{{end}}
{{end}}
</form>
<!-- 删除任务 --> <!-- 删除任务 -->
<form id="delForm-{{.ID}}" action="{{$.RepoLink}}/modelmanage/delete_model_convert/{{.ID}}" method="post"> <form id="delForm-{{.ID}}" action="{{$.RepoLink}}/modelmanage/delete_model_convert/{{.ID}}" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}


Loading…
Cancel
Save