Browse Source

Merge pull request 'succeeded状态云脑1任务,停止按钮应置灰' (#1244) from fix-1220 into V20220110

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1244
Reviewed-by: wangjr <wangjr@pcl.ac.cn>
pull/1247/head
zhoupzh 3 years ago
parent
commit
bd0e656b17
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      templates/repo/debugjob/index.tmpl
  2. +1
    -1
      web_src/less/openi.less

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

@@ -348,11 +348,11 @@
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
{{if .CanDel}} {{if .CanDel}}
{{if eq .ComputeResource "CPU/GPU" }} {{if eq .ComputeResource "CPU/GPU" }}
<a id="stop-model-debug-{{.JobID}}" class='ui basic {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING"}}disabled {{else}}blue {{end}}button' onclick='stopDebug("{{.JobID}}","{{$.RepoLink}}/cloudbrain/{{.JobID}}/stop")'>
<a id="stop-model-debug-{{.JobID}}" class='ui basic {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' onclick='stopDebug("{{.JobID}}","{{$.RepoLink}}/cloudbrain/{{.JobID}}/stop")'>
{{$.i18n.Tr "repo.stop"}} {{$.i18n.Tr "repo.stop"}}
</a> </a>
{{else}} {{else}}
<a id="stop-model-debug-{{.JobID}}" class='ui basic {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING"}}disabled {{else}}blue {{end}}button' onclick='stopDebug("{{.JobID}}","{{$.RepoLink}}/modelarts/notebook/{{.JobID}}/stop")'>
<a id="stop-model-debug-{{.JobID}}" class='ui basic {{if eq .Status "STOPPED" "FAILED" "START_FAILED" "STOPPING" "CREATING" "STARTING" "SUCCEEDED"}}disabled {{else}}blue {{end}}button' onclick='stopDebug("{{.JobID}}","{{$.RepoLink}}/modelarts/notebook/{{.JobID}}/stop")'>
{{$.i18n.Tr "repo.stop"}} {{$.i18n.Tr "repo.stop"}}
</a> </a>
{{end}} {{end}}
@@ -637,7 +637,7 @@
if(["RUNNING","WAITING"].includes(status)){ if(["RUNNING","WAITING"].includes(status)){
$('#stop-model-debug-'+jobID).removeClass('disabled').addClass('blue') $('#stop-model-debug-'+jobID).removeClass('disabled').addClass('blue')
} }
if(["CREATING","STOPPING","STARTING","STOPPED","FAILED","START_FAILED"].includes(status)){
if(["CREATING","STOPPING","STARTING","STOPPED","FAILED","START_FAILED","SUCCEEDED"].includes(status)){
$('#stop-model-debug-'+jobID).removeClass('blue').addClass('disabled') $('#stop-model-debug-'+jobID).removeClass('blue').addClass('disabled')
} }
if(status==="STOPPED" || status==="FAILED"|| status==="START_FAILED"){ if(status==="STOPPED" || status==="FAILED"|| status==="START_FAILED"){


+ 1
- 1
web_src/less/openi.less View File

@@ -234,7 +234,7 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;}
.icon-unbind{background-position: -568px -52px;} .icon-unbind{background-position: -568px -52px;}
.CREATING, .STOPPING, .DELETING, .STARTING, .WAITING ,.INIT,.KILLING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;} .CREATING, .STOPPING, .DELETING, .STARTING, .WAITING ,.INIT,.KILLING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;}


.COMPLETED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;}
i.COMPLETED,i.SUCCEEDED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;}
.text_over{ .text_over{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;


Loading…
Cancel
Save