From 082f58aabd7f4cc7a20b51c6c9991dcc29ae9e5c Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 2 Nov 2021 09:43:59 +0800 Subject: [PATCH 1/8] fix issue about yunnao --- templates/repo/cloudbrain/index.tmpl | 4 ++-- templates/repo/modelarts/notebook/index.tmpl | 4 ++-- templates/repo/modelarts/trainjob/index.tmpl | 4 ++-- templates/repo/modelarts/trainjob/new.tmpl | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 2201cd272..716d18235 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -254,8 +254,8 @@ Ascend NPU - - {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}} + {{if .Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}{{end}} diff --git a/templates/repo/modelarts/notebook/index.tmpl b/templates/repo/modelarts/notebook/index.tmpl index 194d0604a..0d78fb344 100755 --- a/templates/repo/modelarts/notebook/index.tmpl +++ b/templates/repo/modelarts/notebook/index.tmpl @@ -223,8 +223,8 @@ Ascend NPU - - {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}} + {{if .Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.modelarts.train_job.new_debug"}}{{end}} diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 5397110ff..30a46bf5c 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -246,8 +246,8 @@ Ascend NPU - - {{$.i18n.Tr "repo.modelarts.train_job.new_train"}} + {{if .Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.modelarts.train_job.new_train"}}{{end}} diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index 3e3e2fc2a..2121ded2d 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -165,7 +165,7 @@ -->
- +
+ {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.debug"}} + {{else}} + + {{$.i18n.Tr "repo.debug"}} + + {{end}}
{{$.CsrfTokenHtml}} + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.stop"}} + {{else}} + + {{$.i18n.Tr "repo.stop"}} + + {{end}}
@@ -376,16 +388,25 @@ + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.submit_image"}} - + {{else}} + {{$.i18n.Tr "repo.submit_image"}} + {{end}}
{{$.CsrfTokenHtml}} + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.delete"}} + {{else}} + + {{$.i18n.Tr "repo.delete"}} + + {{end}}
diff --git a/templates/repo/modelarts/notebook/index.tmpl b/templates/repo/modelarts/notebook/index.tmpl index 0d78fb344..d1beed6c2 100755 --- a/templates/repo/modelarts/notebook/index.tmpl +++ b/templates/repo/modelarts/notebook/index.tmpl @@ -309,15 +309,29 @@
+ --> + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.debug"}} + {{else}} + + {{$.i18n.Tr "repo.debug"}} + + {{end}} +
{{$.CsrfTokenHtml}} - + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.stop"}} + {{else}} + + {{$.i18n.Tr "repo.stop"}} + + {{end}} +
@@ -336,9 +350,15 @@
{{$.CsrfTokenHtml}} + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.delete"}} + {{else}} + + {{$.i18n.Tr "repo.delete"}} + + {{end}}
@@ -461,12 +481,16 @@ $('#model-delete-'+jobID).removeClass('red') $('#model-delete-'+jobID).addClass('disabled') } - if(status=="STOPPED" || status=="FAILED"){ + if(status=="STOPPED" || status=="FAILED" ){ $('#stop-model-debug-'+jobID).removeClass('blue') $('#stop-model-debug-'+jobID).addClass('disabled') $('#model-delete-'+jobID).removeClass('disabled') $('#model-delete-'+jobID).addClass('red') } + if(status=="START_FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('blue') + $('#stop-model-debug-'+jobID).addClass('disabled') + } }).fail(function(err) { console.log(err); }); diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 30a46bf5c..8a74c3f16 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -353,9 +353,15 @@ -->
{{$.CsrfTokenHtml}} - + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.stop"}} + {{else}} + + {{$.i18n.Tr "repo.stop"}} + + {{end}}
@@ -372,9 +378,15 @@
{{$.CsrfTokenHtml}} + {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} {{$.i18n.Tr "repo.delete"}} + {{else}} + + {{$.i18n.Tr "repo.delete"}} + + {{end}}
@@ -528,6 +540,10 @@ $('#model-delete-'+jobID).removeClass('disabled') $('#model-delete-'+jobID).addClass('red') } + if(status=="START_FAILED"){ + $('#stop-model-debug-'+jobID).removeClass('blue') + $('#stop-model-debug-'+jobID).addClass('disabled') + } }).fail(function(err) { console.log(err); }); diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index d00ce52b1..58a639ff5 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -26,7 +26,7 @@
From 38a1a277d86a8a9924db654ceb786f9a27eb0a31 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 2 Nov 2021 11:07:34 +0800 Subject: [PATCH 5/8] fix issue --- options/locale/locale_zh-CN.ini | 14 +++++++------- templates/repo/modelarts/trainjob/index.tmpl | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index d6ac9f870..336bc83da 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -797,12 +797,12 @@ modelarts.train_job.new=新建训练任务 modelarts.train_job.basic_info=基本信息 -modelarts.train_job.job_status=作业状态 -modelarts.train_job.job_name=作业名称 -modelarts.train_job.version=作业版本 +modelarts.train_job.job_status=任务状态 +modelarts.train_job.job_name=任务名称 +modelarts.train_job.version=任务版本 modelarts.train_job.start_time=开始时间 modelarts.train_job.dura_time=运行时长 -modelarts.train_job.description=作业描述 +modelarts.train_job.description=任务描述 modelarts.train_job.parameter_setting=参数设置 modelarts.train_job.parameter_setting_info=参数信息 modelarts.train_job.fast_parameter_setting=一键式参数配置 @@ -830,12 +830,12 @@ modelarts.train_job.query_whether_save_parameter=保存作业参数 modelarts.train_job.save_helper=保存当前作业的配置参数,后续您可以使用已保存的配置参数快速创建训练作业。 modelarts.train_job.common_frame=常用框架 modelarts.train_job.amount_of_compute_node=计算节点个数 -modelarts.train_job.job_parameter_name=作业参数名称 -modelarts.train_job.parameter_description=作业参数描述 +modelarts.train_job.job_parameter_name=任务参数名称 +modelarts.train_job.parameter_description=任务参数描述 modelarts.log=日志 modelarts.version_manage=版本管理 modelarts.back=返回 -modelarts.train_job_para_admin=作业参数管理 +modelarts.train_job_para_admin=任务参数管理 modelarts.train_job_para.edit=编辑 modelarts.train_job_para.connfirm=确定 diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 4e39920b8..f484b0329 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -291,7 +291,7 @@ {{$.i18n.Tr "repo.cloudbrain_creator"}}
- {{$.i18n.Tr "repo.cloudbrain_operate"}} + {{$.i18n.Tr "repo.cloudbrain_operate"}}
From f945b502728fa56a59136f132bb25a422eb97847 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 2 Nov 2021 12:08:58 +0800 Subject: [PATCH 6/8] fix issue --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + templates/repo/modelarts/notebook/index.tmpl | 14 ++++++++------ templates/repo/modelarts/trainjob/index.tmpl | 2 +- templates/repo/modelarts/trainjob/new.tmpl | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index e003f5c1a..7d1d7a3e0 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -792,6 +792,7 @@ modelarts.train_job.new_debug= New Debug Task modelarts.train_job.new_train=New Train Task modelarts.train_job.config=Configuration information modelarts.train_job.new=New train Task +modelarts.train_job.new_place=The description should not exceed 256 characters diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 336bc83da..81b4a8459 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -793,6 +793,7 @@ modelarts.train_job.new_debug=新建调试任务 modelarts.train_job.new_train=新建训练任务 modelarts.train_job.config=配置信息 modelarts.train_job.new=新建训练任务 +modelarts.train_job.new_place=描述字数不超过256个字符 diff --git a/templates/repo/modelarts/notebook/index.tmpl b/templates/repo/modelarts/notebook/index.tmpl index 01e2b6545..1ac984117 100755 --- a/templates/repo/modelarts/notebook/index.tmpl +++ b/templates/repo/modelarts/notebook/index.tmpl @@ -324,7 +324,7 @@
{{$.CsrfTokenHtml}} {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} - + {{$.i18n.Tr "repo.stop"}} {{else}} @@ -352,7 +352,7 @@ {{$.CsrfTokenHtml}} {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} - + {{$.i18n.Tr "repo.delete"}} {{else}} @@ -477,10 +477,10 @@ } if(status!=="STOPPED" || status!=="FAILED"){ - $('#stop-model-debug-'+jobID).removeClass('disabled') - $('#stop-model-debug-'+jobID).addClass('blue') - $('#model-delete-'+jobID).removeClass('red') - $('#model-delete-'+jobID).addClass('disabled') + // $('#stop-model-debug-'+jobID).removeClass('disabled') + // $('#stop-model-debug-'+jobID).addClass('blue') + // $('#model-delete-'+jobID).removeClass('red') + // $('#model-delete-'+jobID).addClass('disabled') } if(status=="STOPPED" || status=="FAILED" ){ $('#stop-model-debug-'+jobID).removeClass('blue') @@ -491,6 +491,8 @@ if(status=="START_FAILED"){ $('#stop-model-debug-'+jobID).removeClass('blue') $('#stop-model-debug-'+jobID).addClass('disabled') + $('#model-delete-'+jobID).removeClass('disabled') + $('#model-delete-'+jobID).addClass('red') } }).fail(function(err) { console.log(err); diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index f484b0329..4337d6de8 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -380,7 +380,7 @@ {{$.CsrfTokenHtml}} {{if $.Permission.CanWrite $.UnitTypeCloudBrain}} - + {{$.i18n.Tr "repo.delete"}} {{else}} diff --git a/templates/repo/modelarts/trainjob/new.tmpl b/templates/repo/modelarts/trainjob/new.tmpl index 2121ded2d..6e98158d9 100755 --- a/templates/repo/modelarts/trainjob/new.tmpl +++ b/templates/repo/modelarts/trainjob/new.tmpl @@ -165,7 +165,7 @@ -->
- +