diff --git a/templates/admin/cloudbrain/list.tmpl b/templates/admin/cloudbrain/list.tmpl index 521377838..eac862208 100644 --- a/templates/admin/cloudbrain/list.tmpl +++ b/templates/admin/cloudbrain/list.tmpl @@ -64,22 +64,29 @@
+ {{$JobID := '0'}} + {{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE" "BENCHMARK"}} + {{$JobID = .Cloudbrain.ID}} + {{else}} + {{$JobID = .JobID}} + {{end}} +
{{if or (eq .JobType "DEBUG") (eq .JobType "SNN4IMAGENET") (eq .JobType "BRAINSCORE")}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "INFERENCE"}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "TRAIN"}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "BENCHMARK"}} - - {{.JobName}} + + {{.DisplayJobName}} {{end}}
@@ -89,8 +96,8 @@
- - {{.Status}} + + {{.Status}}
@@ -99,7 +106,7 @@
- {{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}} + {{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}
@@ -124,14 +131,14 @@
{{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE"}}
-
+ {{$.CsrfTokenHtml}} {{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}} - + {{$.i18n.Tr "repo.debug"}} {{else}} - + {{$.i18n.Tr "repo.debug_again"}} {{end}} @@ -141,22 +148,22 @@
{{if eq .JobType "DEBUG" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE"}} - + {{$.CsrfTokenHtml}} - + {{$.i18n.Tr "repo.stop"}} {{else}} - + {{$.i18n.Tr "repo.stop"}} {{end}}
-
+ {{$.CsrfTokenHtml}} - + {{$.i18n.Tr "repo.delete"}}
@@ -169,20 +176,20 @@
{{if eq .JobType "DEBUG"}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "INFERENCE"}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "TRAIN"}} - - {{.JobName}} + + {{.DisplayJobName}} {{else if eq .JobType "BENCHMARK"}} - - {{.JobName}} + + {{.DisplayJobName}} {{end}}
@@ -192,8 +199,8 @@
- - {{.Status}} + + {{.Status}}
@@ -202,7 +209,7 @@
- {{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}} + {{if .TrainJobDuration}}{{.TrainJobDuration}}{{else}}--{{end}}
@@ -227,14 +234,14 @@
{{if eq .JobType "DEBUG"}}
-
+ {{$.CsrfTokenHtml}} {{if eq .Status "RUNNING" "WAITING" "CREATING" "STARTING"}} - + {{$.i18n.Tr "repo.debug"}} {{else}} - + {{$.i18n.Tr "repo.debug_again"}} {{end}} @@ -243,14 +250,14 @@ {{end}} - + {{$.CsrfTokenHtml}} - + {{$.i18n.Tr "repo.delete"}}
@@ -313,4 +320,5 @@ function getParams(){ }) } getParams() +console.log({{.Tasks}}) diff --git a/templates/repo/modelarts/inferencejob/index.tmpl b/templates/repo/modelarts/inferencejob/index.tmpl index 0e7755ff8..68ba3c831 100644 --- a/templates/repo/modelarts/inferencejob/index.tmpl +++ b/templates/repo/modelarts/inferencejob/index.tmpl @@ -174,7 +174,7 @@
{{$.CsrfTokenHtml}} {{if .CanDel}} - + {{$.i18n.Tr "repo.delete"}} {{else}} diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 2f0648690..ed94c0598 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -157,7 +157,7 @@
{{$.CsrfTokenHtml}} {{if .CanDel}} - + {{$.i18n.Tr "repo.delete"}} {{else}} diff --git a/web_src/js/features/cloudrbanin.js b/web_src/js/features/cloudrbanin.js index 3b2c9766a..2f5984b70 100644 --- a/web_src/js/features/cloudrbanin.js +++ b/web_src/js/features/cloudrbanin.js @@ -14,7 +14,7 @@ export default async function initCloudrain() { } // const diffResource = computeResource == "NPU" ? 'modelarts/notebook' : 'cloudbrain' $.get(`/api/v1/repos/${repoPath}/${ID}?version_name=${versionname}`, (data) => { - const ID = data.ID + const ID = data.ID || data.JobID const status = data.JobStatus const duration = data.JobDuration $('#duration-'+ID).text(duration) @@ -41,7 +41,7 @@ export default async function initCloudrain() { if(["RUNNING","WAITING"].includes(status)){ $('#ai-stop-'+ID).removeClass('disabled').addClass('blue') } - if(["CREATING","STOPPING","STARTING","STOPPED","FAILED","START_FAILED","SUCCEEDED"].includes(status)){ + if(["CREATING","STOPPING","STARTING","STOPPED","FAILED","START_FAILED","SUCCEEDED","COMPLETED"].includes(status)){ $('#ai-stop-'+ID).removeClass('blue').addClass('disabled') }