Browse Source

Merge branch 'V20220718' into zouap_static

pull/2486/head
zouap 2 years ago
parent
commit
e3f45f3211
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      models/cloudbrain.go
  2. +1
    -1
      templates/repo/debugjob/index.tmpl

+ 1
- 1
models/cloudbrain.go View File

@@ -1802,7 +1802,7 @@ func GetBenchmarkCountByUserID(userID int64) (int, error) {


func GetWaitingCloudbrainCount(cloudbrainType int, computeResource string, jobTypes ...JobType) (int64, error) { func GetWaitingCloudbrainCount(cloudbrainType int, computeResource string, jobTypes ...JobType) (int64, error) {
sess := x.Where("status=? and type=?", JobWaiting, cloudbrainType) sess := x.Where("status=? and type=?", JobWaiting, cloudbrainType)
if len(jobTypes) >= 0 {
if len(jobTypes) > 0 {
sess.In("JobType", jobTypes) sess.In("JobType", jobTypes)
} }
if computeResource != "" { if computeResource != "" {


+ 1
- 1
templates/repo/debugjob/index.tmpl View File

@@ -405,7 +405,7 @@
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
{{if .CanDel}} {{if .CanDel}}
<a id="ai-delete-{{.Cloudbrain.ID}}" <a id="ai-delete-{{.Cloudbrain.ID}}"
class='ui basic ai_delete {{if eq .Status "STOPPED" "FAILED" "START_FAILED"}}blue {{else}}disabled {{end}}button'
class='ui basic ai_delete {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "SUCCEEDED"}}blue {{else}}disabled {{end}}button'
style="border-radius: .28571429rem;"> style="border-radius: .28571429rem;">
{{$.i18n.Tr "repo.delete"}} {{$.i18n.Tr "repo.delete"}}
</a> </a>


Loading…
Cancel
Save