From 6979d31df0da800ecf7039c5aaa0d19fbfe0e244 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 11:09:02 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show--bak.tmpl | 108 +++++ templates/repo/cloudbrain/show.tmpl | 559 +++++++++++++++++++---- 2 files changed, 569 insertions(+), 98 deletions(-) create mode 100644 templates/repo/cloudbrain/show--bak.tmpl diff --git a/templates/repo/cloudbrain/show--bak.tmpl b/templates/repo/cloudbrain/show--bak.tmpl new file mode 100644 index 0000000000..1e234e0945 --- /dev/null +++ b/templates/repo/cloudbrain/show--bak.tmpl @@ -0,0 +1,108 @@ +{{template "base/head" .}} +
+{{template "repo/header" .}} +
+
+ {{template "base/alert" .}} + +

+ +

+
+
+ {{with .task}} +

任务名称: {{.DisplayJobName}}

+ {{end}} +
+
+

任务结果:

+ {{with .taskRes}} + {{range .TaskStatuses}} + + + + + + + +
状态 {{.State}}
+ {{end}} + {{end}} +
+
+ {{with .result}} + + + + + + + + + + + + + + + + + + +
硬件信息
CPU {{.Resource.CPU}}
Memory {{.Resource.Memory}}
NvidiaComGpu {{.Resource.NvidiaComGpu}}
+ + + + + + + + + + + + + {{if not (eq $.task.StartTime 0)}} + + {{else}} + + + + {{if not (eq $.task.EndTime 0)}} + + {{else}} + + + + + + + + + + +
调试信息
平台 {{.Platform}}
开始时间 {{TimeSinceUnix1 $.task.StartTime}} + {{end}} +
结束时间 {{TimeSinceUnix1 $.task.EndTime}} + {{end}} +
ExitCode {{.JobStatus.AppExitCode}}
退出信息 {{.JobStatus.AppExitDiagnostics | nl2br}}
+ {{end}} +
+
+ +
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 1e234e0945..b6c99df856 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -1,108 +1,471 @@ {{template "base/head" .}} + +
+
+
+
+
+
+
+
+
{{template "repo/header" .}} -
-
- {{template "base/alert" .}} - +

- +

-
-
- {{with .task}} -

任务名称: {{.DisplayJobName}}

- {{end}} -
-
-

任务结果:

- {{with .taskRes}} - {{range .TaskStatuses}} - - - - - - - -
状态 {{.State}}
- {{end}} - {{end}} -
-
- {{with .result}} - - - - - - - - - - - - - - - - - - -
硬件信息
CPU {{.Resource.CPU}}
Memory {{.Resource.Memory}}
NvidiaComGpu {{.Resource.NvidiaComGpu}}
- - - - - - - - - - - - - {{if not (eq $.task.StartTime 0)}} - - {{else}} - - - - {{if not (eq $.task.EndTime 0)}} - - {{else}} - - - - - - - - - - -
调试信息
平台 {{.Platform}}
开始时间 {{TimeSinceUnix1 $.task.StartTime}} - {{end}} -
结束时间 {{TimeSinceUnix1 $.task.EndTime}} - {{end}} -
ExitCode {{.JobStatus.AppExitCode}}
退出信息 {{.JobStatus.AppExitDiagnostics | nl2br}}
- {{end}} -
+ +
+ +
+
+
+ + + +
+ + {{if not (eq .StartTime 0)}} + {{TimeSinceUnix1 .StartTime}} + {{else}} + {{TimeSinceUnix1 .CreatedUnix}} + {{end}} + + + {{$.i18n.Tr "repo.modelarts.status"}}: + {{.Status}} + + {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}: + {{$.duration}} + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{$.i18n.Tr "repo.cloudbrain_task"}} + +
+ {{.DisplayJobName}} +
+
+ {{$.i18n.Tr "repo.modelarts.status"}} + +
+ {{.Status}} +
+
+ {{$.i18n.Tr "repo.modelarts.train_job.start_time"}} + +
+ + {{if not (eq .StartTime 0)}} + {{TimeSinceUnix1 .StartTime}} + {{else}} + {{TimeSinceUnix1 .CreatedUnix}} + {{end}} + +
+
+ {{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} + +
+ {{$.duration}} +
+
+ 镜像 + +
+ {{.Image}} +
+
+ 类型 + +
+ {{$.BenchmarkTypeName}} +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 训练程序 + +
+ train.py +
+
+ 测试程序 + +
+ test.py +
+
+ {{$.i18n.Tr "repo.modelarts.train_job.description"}} + +
+ {{.Description}} +
+
+ {{$.i18n.Tr "repo.modelarts.train_job.standard"}} + +
+ {{$.resource_spec}} +
+
+ 创建者 + +
+ {{.User.Name}} +
+
+ 子类型 + +
+ {{$.BenchmarkChildTypeName}} +
+
+
+
+
+ +
+
+
+
+ +
+ + +

+                            
+ +
+ +
+ +
+
+ + {{template "base/paginate" .}} +
+ +
+
-
+ +
{{template "base/footer" .}} + + -- 2.34.1 From 876cb5ed4f9fa4418583558282604491a4c0c35a Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 14:32:27 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index b6c99df856..109fb195fe 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -186,10 +186,10 @@ td, th {
{{.displayJobName}}
- -
+ {{range $k ,$v := .version_list_task}} +
-
+
@@ -216,13 +216,13 @@ td, th {
-
+
-
+
@@ -388,7 +388,7 @@ td, th {
-
+
- - {{template "base/paginate" .}} + {{end}} {{template "base/paginate" .}}
-- 2.34.1 From 85ce0687f9a9c19325878422ba359b1230967147 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:11:26 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/benchmark/show.tmpl | 13 +++++----- templates/repo/cloudbrain/show.tmpl | 26 +++++++++---------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/templates/repo/cloudbrain/benchmark/show.tmpl b/templates/repo/cloudbrain/benchmark/show.tmpl index 109fb195fe..16e5a98f58 100755 --- a/templates/repo/cloudbrain/benchmark/show.tmpl +++ b/templates/repo/cloudbrain/benchmark/show.tmpl @@ -281,7 +281,7 @@ td, th { - 镜像 + {{.i18n.Tr "cloudbrain.mirror"}} @@ -292,7 +292,8 @@ td, th { - 类型 + {{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}} + @@ -313,7 +314,7 @@ td, th { - 训练程序 + {{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}} @@ -324,7 +325,7 @@ td, th { - 测试程序 + {{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}} @@ -360,7 +361,7 @@ td, th { - 创建者 + {{$.i18n.Tr "repo.cloudbrain_creator"}} @@ -371,7 +372,7 @@ td, th { - 子类型 + {{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 109fb195fe..948d43e971 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -179,8 +179,8 @@ td, th { {{.i18n.Tr "repo.cloudbrain"}}
/
- - {{$.i18n.Tr "repo.modelarts.evaluate_job"}} + + {{$.i18n.Tr "repo.modelarts.notebook"}}
/
{{.displayJobName}}
@@ -281,7 +281,7 @@ td, th { - 镜像 + {{.i18n.Tr "cloudbrain.mirror"}} @@ -292,12 +292,12 @@ td, th { - 类型 + {{$.i18n.Tr "repo.modelarts.train_job.dataset"}}
- {{$.BenchmarkTypeName}} + {{.DatasetName}}
@@ -313,30 +313,30 @@ td, th { - 训练程序 + 平台
- train.py + {{$.Platform}}
- 测试程序 + ExitCode
- test.py + {{$.JobStatus.AppExitCode}}
- {{$.i18n.Tr "repo.modelarts.train_job.description"}} + {{.i18n.Tr "cloudbrain.code_storage_path"}} @@ -360,7 +360,7 @@ td, th { - 创建者 + {{$.i18n.Tr "repo.cloudbrain_creator"}} @@ -371,12 +371,12 @@ td, th { - 子类型 + {{$.i18n.Tr "repo.cloudbrain.exitinfo"}}
- {{$.BenchmarkChildTypeName}} + {{$.JobStatus.AppExitDiagnostics | nl2br}}
-- 2.34.1 From 4afba2eae4d98188b6a5a4d461d977060f9f5d24 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:13:11 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 948d43e971..648fc0e3df 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -281,7 +281,7 @@ td, th { - {{.i18n.Tr "cloudbrain.mirror"}} + {{$.i18n.Tr "cloudbrain.mirror"}} @@ -336,7 +336,7 @@ td, th { - {{.i18n.Tr "cloudbrain.code_storage_path"}} + {{$.i18n.Tr "cloudbrain.code_storage_path"}} -- 2.34.1 From c1d6231a139a89b312cfac708800b7b780aa2676 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:18:56 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 648fc0e3df..082393ad0b 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -329,7 +329,7 @@ td, th {
- {{$.JobStatus.AppExitCode}} + {{$.result.JobStatus.AppExitCode}}
@@ -376,7 +376,7 @@ td, th {
- {{$.JobStatus.AppExitDiagnostics | nl2br}} + {{$.result.JobStatus.AppExitDiagnostics}}
-- 2.34.1 From 784c884d3922d91e3372ec30941f59668fcbdb40 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:25:44 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/cloudbrain.go | 11 +++++++++-- templates/repo/cloudbrain/show.tmpl | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 898f3844fe..33ce5debb4 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -2,11 +2,9 @@ package repo import ( "bufio" - "code.gitea.io/gitea/modules/timeutil" "encoding/json" "errors" "fmt" - "github.com/unknwon/i18n" "io" "net/http" "os" @@ -16,6 +14,9 @@ import ( "strings" "time" + "code.gitea.io/gitea/modules/timeutil" + "github.com/unknwon/i18n" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" @@ -510,6 +511,12 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo } } + attachment, err := models.GetAttachmentByUUID(task.Uuid) + if err == nil { + ctx.Data["datasetname"] = attachment.Name + } else { + ctx.Data["datasetname"] = "" + } ctx.Data["task"] = task ctx.Data["jobName"] = task.JobName diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 082393ad0b..54e721b08c 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -297,7 +297,7 @@ td, th {
- {{.DatasetName}} + {{$.datasetname}}
-- 2.34.1 From e5ce5bfb060bba1882c6fd0e044ec6b16f846b1f Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:33:15 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 54e721b08c..98b4e56baf 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -375,9 +375,9 @@ td, th { -
- {{$.result.JobStatus.AppExitDiagnostics}} -
+ + {{$.result.JobStatus.AppExitDiagnostics}} + -- 2.34.1 From 98a47aae216073e3fca60077f79f043acf605c5e Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:39:08 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 2 +- options/locale/locale_zh-CN.ini | 1 + templates/repo/cloudbrain/show.tmpl | 55 ++++++++--------------------- 3 files changed, 16 insertions(+), 42 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 09bb5015fe..bed7c46e09 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -911,7 +911,7 @@ language_other = Other datasets = Datasets datasets.desc = Enable Dataset cloudbrain_helper=Use GPU/NPU resources to open notebooks, model training tasks, etc. - +cloudbrain.exitinfo=Exit Information model_manager = Model model_noright=No right model_rename=Duplicate model name, please modify model name. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index d260653639..7bf28aa10b 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -958,6 +958,7 @@ cloudbrain_jobname_err=只能以小写字母或数字开头且只包含小写字 cloudbrain_query_fail=查询云脑任务失败。 cloudbrain.mirror_tag = 镜像标签 cloudbrain.mirror_description = 镜像描述 +cloudbrain.exitinfo=退出信息 record_begintime_get_err=无法获取统计开始时间。 parameter_is_wrong=输入参数错误,请检查输入参数。 diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 98b4e56baf..789f915d1b 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -290,19 +290,7 @@ td, th {
- - - {{$.i18n.Tr "repo.modelarts.train_job.dataset"}} - - - -
- {{$.datasetname}} -
- - - - +
@@ -336,12 +324,12 @@ td, th { - {{$.i18n.Tr "cloudbrain.code_storage_path"}} + {{$.i18n.Tr "repo.modelarts.train_job.dataset"}} -
- {{.Description}} +
+ {{$.datasetname}}
@@ -369,39 +357,24 @@ td, th {
- - - {{$.i18n.Tr "repo.cloudbrain.exitinfo"}} - - - - - {{$.result.JobStatus.AppExitDiagnostics}} - - - +
+
+
+ {{$.i18n.Tr "repo.cloudbrain.exitinfo"}} +
+
+ {{$.result.JobStatus.AppExitDiagnostics}} +
+
-
-
- -
- - -

-                            
- -
- -
+
-- 2.34.1 From 4390d617f8a6da4f3fd00a1f67a94db5c6b480c5 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 15:54:56 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 789f915d1b..b6294d2801 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -220,7 +220,6 @@ td, th {
@@ -364,11 +363,12 @@ td, th {
- {{$.i18n.Tr "repo.cloudbrain.exitinfo"}} + {{$.i18n.Tr "repo.cloudbrain.exitinfo"}} +
-
- {{$.result.JobStatus.AppExitDiagnostics}} -
+
+
+ {{$.result.JobStatus.AppExitDiagnostics}}
-- 2.34.1 From 05a9809f5f2e02e97deed819519510950303a0c0 Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 16:02:27 +0800 Subject: [PATCH 10/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index b6294d2801..b5baa7df8a 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -56,7 +56,7 @@ margin:10px 5px ; } .tab_2_content { - min-height: 360px; + min-height: 560px; margin-left: 10px; } .ac-grid { @@ -81,6 +81,13 @@ .ti-form>tbody, .ti-form>tbody>tr { vertical-align: inherit; } +.info_text { + padding-bottom: 20px; + padding-right: 20px; + color: #8a8e99; + font-size: 12px; +} + .ti-text-form-label { padding-bottom: 20px; @@ -368,7 +375,9 @@ td, th {
+ {{$.result.JobStatus.AppExitDiagnostics}} +
-- 2.34.1 From b4182391139a7b2ccc3c6a4fdcba1cb06c41b00e Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 2 Apr 2022 16:10:43 +0800 Subject: [PATCH 11/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index b5baa7df8a..b1dd6e661c 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -84,7 +84,6 @@ .info_text { padding-bottom: 20px; padding-right: 20px; - color: #8a8e99; font-size: 12px; } @@ -312,7 +311,7 @@ td, th {
- {{$.Platform}} + {{$.result.Platform}}
-- 2.34.1 From c9b78df4dac3c12e980947402455a72176982045 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 6 Apr 2022 11:06:15 +0800 Subject: [PATCH 12/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + routers/repo/cloudbrain.go | 3 +++ templates/repo/cloudbrain/show.tmpl | 38 +++++++++++++++++++++++++++-- 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index bed7c46e09..7c6e50892a 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -912,6 +912,7 @@ datasets = Datasets datasets.desc = Enable Dataset cloudbrain_helper=Use GPU/NPU resources to open notebooks, model training tasks, etc. cloudbrain.exitinfo=Exit Information +cloudbrain.platform=Platform model_manager = Model model_noright=No right model_rename=Duplicate model name, please modify model name. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 7bf28aa10b..5a70a0e6f8 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -959,6 +959,7 @@ cloudbrain_query_fail=查询云脑任务失败。 cloudbrain.mirror_tag = 镜像标签 cloudbrain.mirror_description = 镜像描述 cloudbrain.exitinfo=退出信息 +cloudbrain.platform=平台 record_begintime_get_err=无法获取统计开始时间。 parameter_is_wrong=输入参数错误,请检查输入参数。 diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 33ce5debb4..de6f97fc9a 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -525,6 +525,9 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo version_list_task = append(version_list_task, task) ctx.Data["version_list_task"] = version_list_task ctx.Data["debugListType"] = debugListType + ctx.Data["code_path"] = cloudbrain.CodeMountPath + ctx.Data["dataset_path"] = cloudbrain.DataSetMountPath + ctx.Data["model_path"] = cloudbrain.ModelMountPath ctx.Data["canDownload"] = cloudbrain.CanDeleteJob(ctx, task) ctx.HTML(200, tpName) } diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index b1dd6e661c..1eaede8fd2 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -295,6 +295,30 @@ td, th { + + + + {{$.i18n.Tr "cloudbrain.dataset_storage_path"}} + + + +
+ {{$.dataset_path}} +
+ + + + + + {{$.i18n.Tr ""cloudbrain.code_storage_path"}} + + + +
+ {{$.code_path}} +
+ + @@ -306,7 +330,7 @@ td, th { - 平台 + {{$.i18n.Tr "repo.cloudbrain.platform"}} @@ -362,7 +386,17 @@ td, th { - + + + {{$.i18n.Tr "cloudbrain.model_storage_path"}} + + + +
+ {{$.model_path}} +
+ + -- 2.34.1 From 19508fdf0ac84fc5e873e51c04251eb3d70cf79c Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 6 Apr 2022 11:08:16 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 1eaede8fd2..fb885562ea 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -310,7 +310,7 @@ td, th { - {{$.i18n.Tr ""cloudbrain.code_storage_path"}} + {{$.i18n.Tr "cloudbrain.code_storage_path"}} -- 2.34.1 From 4c8de8891d3bdd89ec6fb55f2a19055230f0b2cb Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 6 Apr 2022 14:45:13 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 2 +- templates/repo/cloudbrain/show.tmpl | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 7c6e50892a..94214a25c7 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -913,6 +913,7 @@ datasets.desc = Enable Dataset cloudbrain_helper=Use GPU/NPU resources to open notebooks, model training tasks, etc. cloudbrain.exitinfo=Exit Information cloudbrain.platform=Platform +cloudbrain.endtime=End Time model_manager = Model model_noright=No right model_rename=Duplicate model name, please modify model name. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 5a70a0e6f8..e93b05ffba 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -960,7 +960,7 @@ cloudbrain.mirror_tag = 镜像标签 cloudbrain.mirror_description = 镜像描述 cloudbrain.exitinfo=退出信息 cloudbrain.platform=平台 - +cloudbrain.endtime=结束时间 record_begintime_get_err=无法获取统计开始时间。 parameter_is_wrong=输入参数错误,请检查输入参数。 total_count_get_error=查询总页数失败。 diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index fb885562ea..d7aeb36d77 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -363,6 +363,22 @@ td, th { + + + {{$.i18n.Tr "repo.cloudbrain.endtime"}} + + + +
+ {{if not (eq .StartTime 0)}} + {{TimeSinceUnix1 .EndTime}} + {{else}} + -- + {{end}} +
+ + + {{$.i18n.Tr "repo.modelarts.train_job.standard"}} -- 2.34.1 From 842f60734497349649ee8b9015af7b9e4ace5fb2 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 6 Apr 2022 14:52:37 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- templates/repo/cloudbrain/show--bak.tmpl | 108 ----------------------- templates/repo/cloudbrain/show.tmpl | 20 ++--- 2 files changed, 10 insertions(+), 118 deletions(-) delete mode 100644 templates/repo/cloudbrain/show--bak.tmpl diff --git a/templates/repo/cloudbrain/show--bak.tmpl b/templates/repo/cloudbrain/show--bak.tmpl deleted file mode 100644 index 1e234e0945..0000000000 --- a/templates/repo/cloudbrain/show--bak.tmpl +++ /dev/null @@ -1,108 +0,0 @@ -{{template "base/head" .}} -
-{{template "repo/header" .}} -
-
- {{template "base/alert" .}} - -

- -

-
-
- {{with .task}} -

任务名称: {{.DisplayJobName}}

- {{end}} -
-
-

任务结果:

- {{with .taskRes}} - {{range .TaskStatuses}} - - - - - - - -
状态 {{.State}}
- {{end}} - {{end}} -
-
- {{with .result}} - - - - - - - - - - - - - - - - - - -
硬件信息
CPU {{.Resource.CPU}}
Memory {{.Resource.Memory}}
NvidiaComGpu {{.Resource.NvidiaComGpu}}
- - - - - - - - - - - - - {{if not (eq $.task.StartTime 0)}} - - {{else}} - - - - {{if not (eq $.task.EndTime 0)}} - - {{else}} - - - - - - - - - - -
调试信息
平台 {{.Platform}}
开始时间 {{TimeSinceUnix1 $.task.StartTime}} - {{end}} -
结束时间 {{TimeSinceUnix1 $.task.EndTime}} - {{end}} -
ExitCode {{.JobStatus.AppExitCode}}
退出信息 {{.JobStatus.AppExitDiagnostics | nl2br}}
- {{end}} -
-
- -
-
-
-{{template "base/footer" .}} diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index d7aeb36d77..895a5c14f5 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -350,35 +350,35 @@ td, th { - - {{$.i18n.Tr "repo.modelarts.train_job.dataset"}} + {{$.i18n.Tr "repo.cloudbrain.endtime"}}
- {{$.datasetname}} + {{if not (eq .StartTime 0)}} + {{TimeSinceUnix1 .EndTime}} + {{else}} + -- + {{end}}
- - {{$.i18n.Tr "repo.cloudbrain.endtime"}} + {{$.i18n.Tr "repo.modelarts.train_job.dataset"}}
- {{if not (eq .StartTime 0)}} - {{TimeSinceUnix1 .EndTime}} - {{else}} - -- - {{end}} + {{$.datasetname}}
+ + {{$.i18n.Tr "repo.modelarts.train_job.standard"}} -- 2.34.1