Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2507 Reviewed-by: wangj <wangj@noreply.localhost>pull/2526/head
@@ -3,13 +3,13 @@ | |||||
{{$gpuQueue := 0}} | {{$gpuQueue := 0}} | ||||
{{range $k,$v :=.gpu_types}} | {{range $k,$v :=.gpu_types}} | ||||
{{if eq $k 0}} | {{if eq $k 0}} | ||||
{{ $queue := $v.Queue }} | |||||
{{ $queue = $v.Queue }} | |||||
{{ end }} | {{ end }} | ||||
{{ end }} | {{ end }} | ||||
{{ range $k,$v :=.QueuesDetail }} | {{ range $k,$v :=.QueuesDetail }} | ||||
{{if eq $k $queue}} | {{if eq $k $queue}} | ||||
{{$gpuQueue :=$v}} | |||||
{{$gpuQueue =$v}} | |||||
{{ end }} | {{ end }} | ||||
{{ end }} | {{ end }} | ||||
<i | <i | ||||
@@ -386,7 +386,7 @@ | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
{{if .CanDel}} | {{if .CanDel}} | ||||
<a id="ai-stop-{{.Cloudbrain.ID}}" | <a id="ai-stop-{{.Cloudbrain.ID}}" | ||||
class='ui basic ai_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' | |||||
class='ui basic ai_stop {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED" "CREATE_FAILED"}}disabled {{else}}blue {{end}}button' | |||||
data-repopath="{{$.RepoLink}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/stop" | data-repopath="{{$.RepoLink}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}/{{.Cloudbrain.ID}}/stop" | ||||
data-jobid="{{.Cloudbrain.ID}}"> | data-jobid="{{.Cloudbrain.ID}}"> | ||||
{{$.i18n.Tr "repo.stop"}} | {{$.i18n.Tr "repo.stop"}} | ||||
@@ -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" "SUCCEEDED"}}blue {{else}}disabled {{end}}button' | |||||
class='ui basic ai_delete {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "SUCCEEDED" "CREATE_FAILED"}}blue {{else}}disabled {{end}}button' | |||||
style="border-radius: .28571429rem;"> | style="border-radius: .28571429rem;"> | ||||
{{$.i18n.Tr "repo.delete"}} | {{$.i18n.Tr "repo.delete"}} | ||||
</a> | </a> | ||||
@@ -123,6 +123,7 @@ export default async function initCloudrain() { | |||||
"KILLED", | "KILLED", | ||||
"COMPLETED", | "COMPLETED", | ||||
"SUCCEEDED", | "SUCCEEDED", | ||||
"CREATE_FAILED" | |||||
].includes(status) | ].includes(status) | ||||
) { | ) { | ||||
$("#ai-delete-" + ID) | $("#ai-delete-" + ID) | ||||
@@ -166,6 +167,7 @@ export default async function initCloudrain() { | |||||
"START_FAILED", | "START_FAILED", | ||||
"SUCCEEDED", | "SUCCEEDED", | ||||
"STOPPED", | "STOPPED", | ||||
"CREATE_FAILED", | |||||
].includes(status) | ].includes(status) | ||||
) { | ) { | ||||
return; | return; | ||||
@@ -177,6 +179,7 @@ export default async function initCloudrain() { | |||||
"KILLING", | "KILLING", | ||||
"COMPLETED", | "COMPLETED", | ||||
"SUCCEEDED", | "SUCCEEDED", | ||||
"CREATE_FAILED", | |||||
"STOPPED", | "STOPPED", | ||||
]; | ]; | ||||
$.get( | $.get( | ||||
@@ -385,6 +388,7 @@ export default async function initCloudrain() { | |||||
"KILLED", | "KILLED", | ||||
"COMPLETED", | "COMPLETED", | ||||
"SUCCEEDED", | "SUCCEEDED", | ||||
"CREATE_FAILED", | |||||
].includes(data.JobStatus) | ].includes(data.JobStatus) | ||||
) { | ) { | ||||
$("#ai-delete-" + ID) | $("#ai-delete-" + ID) | ||||