| @@ -838,13 +838,12 @@ td, th { | |||||
| } | } | ||||
| function logScroll(version_name) { | function logScroll(version_name) { | ||||
| let container = document.querySelector(`#log${version_name}`) | let container = document.querySelector(`#log${version_name}`) | ||||
| let scrollTop = container.scrollTop | let scrollTop = container.scrollTop | ||||
| let scrollHeight = container.scrollHeight | let scrollHeight = container.scrollHeight | ||||
| let clientHeight = container.clientHeight | let clientHeight = container.clientHeight | ||||
| let scrollLeft = container.scrollLeft | let scrollLeft = container.scrollLeft | ||||
| if(((parseInt(scrollTop) + clientHeight == scrollHeight || parseInt(scrollTop) + clientHeight +1 == scrollHeight || parseInt(scrollTop) + clientHeight - 1 == scrollHeight)) && parseInt(scrollTop)!==0){ | |||||
| if(((parseInt(scrollTop) + clientHeight == scrollHeight || parseInt(scrollTop) + clientHeight +1 == scrollHeight || parseInt(scrollTop) + clientHeight - 1 == scrollHeight)) && parseInt(scrollTop)!==0 && scrollLeft==0){ | |||||
| let end_line = $(`#log${version_name} input[name=end_line]`).val() | 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) => { | $.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){ | if (data.Lines == 0){ | ||||
| @@ -867,8 +866,7 @@ td, th { | |||||
| console.log(err); | console.log(err); | ||||
| }); | }); | ||||
| } | } | ||||
| if([1,2,3,4,5].includes(scrollTop) && scrollLeft==0){ | |||||
| if([0,1,2,3,4,5,6,7,8,9,10].includes(scrollTop) && scrollLeft==0){ | |||||
| let start_line = $(`#log${version_name} input[name=start_line]`).val() | 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) => { | $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${start_line}&lines=50&order=asc`, (data) => { | ||||