diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index 6047de980..9a4150d8e 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -71,7 +71,7 @@ func DebugJobIndex(ctx *context.Context) { } else { ciTasks[i].CanDebug = false } - ciTasks[i].CanDel = cloudbrain.CanDeleteDebugJob(ctx, &task.Cloudbrain) + ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) ciTasks[i].Cloudbrain.ComputeResource = modelarts.GPUResource } if task.Cloudbrain.Type == models.TypeCloudBrainTwo { @@ -80,7 +80,7 @@ func DebugJobIndex(ctx *context.Context) { } else { ciTasks[i].CanDebug = false } - ciTasks[i].CanDel = cloudbrain.CanDeleteDebugJob(ctx, &task.Cloudbrain) + ciTasks[i].CanDel = cloudbrain.CanDeleteJob(ctx, &task.Cloudbrain) ciTasks[i].Cloudbrain.ComputeResource = modelarts.NPUResource } diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 936a5cfcf..641fefb79 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -368,19 +368,19 @@ {{else}} - {{$.i18n.Tr "repo.debug"}} + {{.CanDebug}}{{$.i18n.Tr "repo.debug"}} {{end}}
@@ -393,8 +393,8 @@ - {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} - {{$.i18n.Tr "repo.submit_image"}} + {{if .CanDel}} + {{$.i18n.Tr "repo.submit_image"}} {{else}} {{$.i18n.Tr "repo.submit_image"}} {{end}} @@ -404,7 +404,7 @@