From d85498be5e70213d034837a9f19800bc3efe083f Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 22 Nov 2021 10:57:05 +0800 Subject: [PATCH] solve conflict --- options/locale/locale_zh-CN.ini | 3 + templates/repo/header.tmpl | 5 + templates/repo/modelarts/notebook/index.tmpl | 181 ------ templates/repo/modelarts/notebook/new.tmpl | 85 +-- templates/repo/modelarts/trainjob/index.tmpl | 178 ------ templates/repo/modelarts/trainjob/new.tmpl | 80 --- .../repo/modelarts/trainjob/version_new.tmpl | 81 --- templates/repo/modelmanage/index.tmpl | 517 +++++++++--------- web_src/less/openi.less | 180 ++++++ 9 files changed, 446 insertions(+), 864 deletions(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 03d9a03e7..4f8043e6f 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -781,6 +781,9 @@ datasets=数据集 datasets.desc=数据集功能 cloudbrain_helper=使用GPU/NPU资源,开启Notebook、模型训练任务等 +model_manager = 模型管理 + + debug=调试 stop=停止 delete=删除 diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index d5b911a79..85800311d 100755 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -137,6 +137,11 @@ {{svg "octicon-inbox" 16}} {{.i18n.Tr "datasets"}} {{end}} + {{if .Permission.CanRead $.UnitTypeDatasets}} + + {{svg "octicon-inbox" 16}} {{.i18n.Tr "repo.model_manager"}} + + {{end}} {{if .Permission.CanRead $.UnitTypeCloudBrain}} {{svg "octicon-server" 16}} {{.i18n.Tr "repo.cloudbrain"}} diff --git a/templates/repo/modelarts/notebook/index.tmpl b/templates/repo/modelarts/notebook/index.tmpl index 021394a07..512aff2a5 100755 --- a/templates/repo/modelarts/notebook/index.tmpl +++ b/templates/repo/modelarts/notebook/index.tmpl @@ -1,187 +1,6 @@ {{template "base/head" .}} - -
diff --git a/templates/repo/modelarts/notebook/new.tmpl b/templates/repo/modelarts/notebook/new.tmpl index 284d6d6c7..3a16cc102 100755 --- a/templates/repo/modelarts/notebook/new.tmpl +++ b/templates/repo/modelarts/notebook/new.tmpl @@ -1,89 +1,8 @@ {{template "base/head" .}}
diff --git a/templates/repo/modelarts/trainjob/index.tmpl b/templates/repo/modelarts/trainjob/index.tmpl index 6c989adef..51b2b95e3 100755 --- a/templates/repo/modelarts/trainjob/index.tmpl +++ b/templates/repo/modelarts/trainjob/index.tmpl @@ -2,184 +2,6 @@ {{template "base/head" .}} {{template "base/head" .}} - -
@@ -201,72 +20,49 @@
{{template "base/alert" .}} -
- -
- - - - 新建调试任务 -
- +
+
+ {{if .Permission.CanWrite $.UnitTypeCloudBrain}} + {{$.i18n.Tr "repo.modelarts.train_job.new_train"}}{{end}} +
- - - -
- - +
-
+
{{$.i18n.Tr "repo.cloudbrain_task"}}
-
- {{$.i18n.Tr "repo.cloudbrain_status_createtime"}} +
+ {{$.i18n.Tr "repo.modelarts.version_nums"}} +
+
+ {{$.i18n.Tr "repo.modelarts.version_nums"}} +
+
+ {{$.i18n.Tr "repo.modelarts.createtime"}}
-
- {{$.i18n.Tr "repo.cloudbrain_status_runtime"}} +
+ {{$.i18n.Tr "repo.modelarts.createtime"}}
-
+
+ {{$.i18n.Tr "repo.modelarts.computing_resources"}} +
+
+ {{$.i18n.Tr "repo.modelarts.createtime"}} +
+
{{$.i18n.Tr "repo.cloudbrain_creator"}}
-
- {{$.i18n.Tr "repo.cloudbrain_operate"}} +
+ {{$.i18n.Tr "repo.cloudbrain_operate"}}
@@ -280,57 +76,86 @@
-
- + - -
- - - - {{.Status}} + +
+ {{.VersionCount}} +
+ +
+ + {{.Status}} - - {{TimeSinceUnix .CreatedUnix $.Lang}}
- -
- - - + +
+ {{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}} +
+ + +
+ +
+ +
+ {{.ComputeResource}} +
+ +
+ {{if .User.Name}} + + {{else}} + + {{end}}
- - {{end}} {{template "base/paginate" .}} @@ -371,3 +196,173 @@
{{template "base/footer" .}} + + diff --git a/web_src/less/openi.less b/web_src/less/openi.less index e073dca0a..892d0adf4 100644 --- a/web_src/less/openi.less +++ b/web_src/less/openi.less @@ -316,4 +316,184 @@ display: block; margin-left: 4px !important; color: #3291F8; +} + + +.selectcloudbrain .active.item{ + color: #0087f5 !important; + border: 1px solid #0087f5; + margin: -1px; + background: #FFF !important; +} +#deletemodel { + width: 100%; + height: 100%; +} +/* 弹窗 */ + +#mask { + position: fixed; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + filter: alpha(opacity=60); + background-color: #777; + z-index: 1000; + display: none; + opacity: 0.8; + -moz-opacity: 0.5; + padding-top: 100px; + color: #000000 +} + +#loadingPage { + margin: 200px auto; + width: 50px; + height: 40px; + text-align: center; + font-size: 10px; + display: block; +} + +#loadingPage>div { + background-color: green; + height: 100%; + width: 6px; + display: inline-block; + -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; + animation: sk-stretchdelay 1.2s infinite ease-in-out; +} + +#loadingPage .rect2 { + -webkit-animation-delay: -1.1s; + animation-delay: -1.1s; +} + +#loadingPage .rect3 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; +} + +#loadingPage .rect4 { + -webkit-animation-delay: -0.9s; + animation-delay: -0.9s; +} + +#loadingPage .rect5 { + -webkit-animation-delay: -0.8s; + animation-delay: -0.8s; +} + +@-webkit-keyframes sk-stretchdelay { + 0%, + 40%, + 100% { + -webkit-transform: scaleY(0.4) + } + 20% { + -webkit-transform: scaleY(1.0) + } +} + +@keyframes sk-stretchdelay { + 0%, + 40%, + 100% { + transform: scaleY(0.4); + -webkit-transform: scaleY(0.4); + } + 20% { + transform: scaleY(1.0); + -webkit-transform: scaleY(1.0); + } +} +/* 消息框 */ + +.alert { + display: none; + position: fixed; + width: 100%; + z-index: 1001; + padding: 15px; + border: 1px solid transparent; + border-radius: 4px; + text-align: center; + font-weight: bold; +} + +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} + +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} + +.pusher { + width: calc(100% - 260px); + box-sizing: border-box; +} +/* 弹窗 (background) */ + +#imageModal { + display: none; + position: fixed; + z-index: 1; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.4); +} +/* 弹窗内容 */ + +.modal-content { + background-color: #fefefe; + margin: 15% auto; + padding: 20px; + border: 1px solid #888; + width: 30%; +} +/* 关闭按钮 */ + +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + +.dis { + margin-bottom: 20px; +} + +.disabled { + cursor: pointer; + pointer-events: none; } \ No newline at end of file