Browse Source

fix issue

tags/v1.21.12.1
zhoupzh 4 years ago
parent
commit
158dc25c34
2 changed files with 6 additions and 3 deletions
  1. +5
    -2
      templates/repo/modelarts/trainjob/show.tmpl
  2. +1
    -1
      templates/repo/modelarts/trainjob/version_new.tmpl

+ 5
- 2
templates/repo/modelarts/trainjob/show.tmpl View File

@@ -474,6 +474,7 @@ td, th {

<script>
console.log({{.version_list_task}})
console.log({{.}})
$('.menu .item').tab()
// $('.ui.style.accordion').accordion();

@@ -709,11 +710,13 @@ td, th {
}
function logScroll(version_name) {
let container = document.querySelector(`#log${version_name}`)
let scrollTop = container.scrollTop
let scrollHeight = container.scrollHeight
let clientHeight = container.clientHeight
if(parseInt(scrollTop) + clientHeight == scrollHeight || parseInt(scrollTop) + clientHeight +1 == scrollHeight || parseInt(scrollTop) + clientHeight - 1 == scrollHeight){
let scrollLeft = container.scrollLeft
if((parseInt(scrollTop) + clientHeight == scrollHeight || parseInt(scrollTop) + clientHeight +1 == scrollHeight || parseInt(scrollTop) + clientHeight - 1 == scrollHeight) && (scrollLeft===0)){
let end_line = $(`#log${version_name} input[name=end_line]`).val()
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${end_line}&lines=50&order=desc`, (data) => {
if (data.Lines == 0){
@@ -736,7 +739,7 @@ td, th {
console.log(err);
});
}
if(scrollTop == 0){
if(scrollTop == 0 && scrollLeft==0){
let start_line = $(`#log${version_name} input[name=start_line]`).val()
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${start_line}&lines=50&order=asc`, (data) => {
if (data.Lines == 0){


+ 1
- 1
templates/repo/modelarts/trainjob/version_new.tmpl View File

@@ -346,7 +346,7 @@
{{template "base/footer" .}}

<script>
let url_href = location.pathname.split('create_version')[0]
let url_href = location.pathname.split('/create_version')[0]
let url_post = location.pathname
let version_name = location.search.split('?version_name=')[1]
$("#parents_version").val(version_name)


Loading…
Cancel
Save