From f008690b00c05b81a60d2ef5fd7de5cb64206ce4 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 18 Apr 2022 10:46:12 +0800 Subject: [PATCH 1/3] fix issu --- templates/repo/modelarts/trainjob/show.tmpl | 34 ++++++++++++++++++++++++++++- web_src/less/openi.less | 17 +++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index 0b420c484..dea9b6aa0 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -420,7 +420,13 @@ td, th {
-
+
+ + + + + + @@ -879,4 +885,30 @@ td, th { }); } } + function scrollAnimation(dom, currentY, targetY, currentX) { + let needScrollTop = targetY - currentY; + let _currentY = currentY; + let context = this; + setTimeout(() => { + // 一次调用滑动帧数,每次调用会不一样 + //取总距离的十分之一 + const dist = Math.ceil(needScrollTop / 10); + _currentY += dist; + //移动一个十分之一 + + dom.scrollTo(currentX || 0, _currentY); + // 如果移动幅度小于十个像素,直接移动,否则递归调用,实现动画效果 + if (needScrollTop > 10 || needScrollTop < -10) { + context.scrollAnimation(dom, _currentY, targetY) + } else { + dom.scrollTo(_currentY, targetY) + } + }, 1) + } + function scrollTop(){ + let logContentDom = document.querySelector('.log'), context = this; + if(!logContentDom) + return + scrollAnimation(logContentDom, logContentDom.scrollTop, 0); + } diff --git a/web_src/less/openi.less b/web_src/less/openi.less index c195bac38..31a8932c0 100644 --- a/web_src/less/openi.less +++ b/web_src/less/openi.less @@ -250,6 +250,23 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;} .CREATING, .STOPPING, .DELETING, .STARTING, i.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;} i.COMPLETED,i.SUCCEEDED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;} +.icon-to-bottom{ + background:url("/img/icons.svg"); + background-position: -574px -208px; + width: 30px; + height: 30px; + display: inline-block; +} +.icon-to-top{ + background:url("/img/icons.svg"); + background-position: -540px -208px; + width: 30px; + height: 30px; + display: inline-block; +} + + + .text_over{ overflow: hidden; text-overflow: ellipsis; From bda8bed80bc8ff4c1e5f74e2dbe2fe6cf4fa3d98 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Wed, 20 Apr 2022 17:18:42 +0800 Subject: [PATCH 2/3] fix issue --- templates/admin/cloudbrain/list.tmpl | 2 +- templates/user/dashboard/cloudbrains.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/admin/cloudbrain/list.tmpl b/templates/admin/cloudbrain/list.tmpl index 35c08eeef..0c87d419a 100755 --- a/templates/admin/cloudbrain/list.tmpl +++ b/templates/admin/cloudbrain/list.tmpl @@ -164,7 +164,7 @@
{{$.CsrfTokenHtml}} - + {{$.i18n.Tr "repo.delete"}}
diff --git a/templates/user/dashboard/cloudbrains.tmpl b/templates/user/dashboard/cloudbrains.tmpl index ba8ec10f8..fb3e0f81b 100644 --- a/templates/user/dashboard/cloudbrains.tmpl +++ b/templates/user/dashboard/cloudbrains.tmpl @@ -149,7 +149,7 @@
{{$.CsrfTokenHtml}} - + {{$.i18n.Tr "repo.delete"}}
From 66690f51a9960d198b3681b05e052e979de6020d Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Wed, 20 Apr 2022 17:23:28 +0800 Subject: [PATCH 3/3] fix issue --- templates/repo/modelarts/trainjob/show.tmpl | 34 +---------------------------- web_src/less/openi.less | 17 --------------- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/templates/repo/modelarts/trainjob/show.tmpl b/templates/repo/modelarts/trainjob/show.tmpl index dea9b6aa0..0b420c484 100755 --- a/templates/repo/modelarts/trainjob/show.tmpl +++ b/templates/repo/modelarts/trainjob/show.tmpl @@ -420,13 +420,7 @@ td, th {
-
- - - - - - +
@@ -885,30 +879,4 @@ td, th { }); } } - function scrollAnimation(dom, currentY, targetY, currentX) { - let needScrollTop = targetY - currentY; - let _currentY = currentY; - let context = this; - setTimeout(() => { - // 一次调用滑动帧数,每次调用会不一样 - //取总距离的十分之一 - const dist = Math.ceil(needScrollTop / 10); - _currentY += dist; - //移动一个十分之一 - - dom.scrollTo(currentX || 0, _currentY); - // 如果移动幅度小于十个像素,直接移动,否则递归调用,实现动画效果 - if (needScrollTop > 10 || needScrollTop < -10) { - context.scrollAnimation(dom, _currentY, targetY) - } else { - dom.scrollTo(_currentY, targetY) - } - }, 1) - } - function scrollTop(){ - let logContentDom = document.querySelector('.log'), context = this; - if(!logContentDom) - return - scrollAnimation(logContentDom, logContentDom.scrollTop, 0); - } diff --git a/web_src/less/openi.less b/web_src/less/openi.less index 31a8932c0..c195bac38 100644 --- a/web_src/less/openi.less +++ b/web_src/less/openi.less @@ -250,23 +250,6 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;} .CREATING, .STOPPING, .DELETING, .STARTING, i.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;} i.COMPLETED,i.SUCCEEDED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -441px -52px;} -.icon-to-bottom{ - background:url("/img/icons.svg"); - background-position: -574px -208px; - width: 30px; - height: 30px; - display: inline-block; -} -.icon-to-top{ - background:url("/img/icons.svg"); - background-position: -540px -208px; - width: 30px; - height: 30px; - display: inline-block; -} - - - .text_over{ overflow: hidden; text-overflow: ellipsis;