|
|
@@ -174,7 +174,7 @@ td, th { |
|
|
{{$.i18n.Tr "repo.modelarts.train_job"}} |
|
|
{{$.i18n.Tr "repo.modelarts.train_job"}} |
|
|
</a> |
|
|
</a> |
|
|
<div class="divider"> / </div> |
|
|
<div class="divider"> / </div> |
|
|
<div class="active section"></div> |
|
|
|
|
|
|
|
|
<div class="active section">{{.jobName}}</div> |
|
|
</div> |
|
|
</div> |
|
|
</h4> |
|
|
</h4> |
|
|
{{range $k ,$v := .version_list_task}} |
|
|
{{range $k ,$v := .version_list_task}} |
|
|
@@ -186,21 +186,36 @@ td, th { |
|
|
<span class="accordion-panel-title-content"> |
|
|
<span class="accordion-panel-title-content"> |
|
|
<span> |
|
|
<span> |
|
|
<div style="float: right;"> |
|
|
<div style="float: right;"> |
|
|
<a class="ti-action-menu-item {{if ne .Status "COMPLETED"}}disabled {{end}}">创建模型</a> |
|
|
|
|
|
<a class="ti-action-menu-item" href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/create_version?version_name={{.VersionName}}">修改</a> |
|
|
|
|
|
<a class="ti-action-menu-item {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED"}}disabled {{end}}" id="{{.VersionName}}-stop" onclick="stopVersion({{.VersionName}})">停止</a> |
|
|
|
|
|
<a class="ti-action-menu-item " href="{{$.Link}}/models?version_name={{.VersionName}}" target="_blank">模型下载</a> |
|
|
|
|
|
<a class="ti-action-menu-item" onclick="deleteVersion({{.VersionName}})" style="color: #FF4D4F;">删除</a> |
|
|
|
|
|
|
|
|
<!-- <a class="ti-action-menu-item {{if ne .Status "COMPLETED"}}disabled {{end}}">创建模型</a> --> |
|
|
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
|
|
{{if $.Permission.CanWrite $.UnitTypeCloudBrain}} |
|
|
|
|
|
<a class="ti-action-menu-item" href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/create_version?version_name={{.VersionName}}">{{$.i18n.Tr "repo.modelarts.modify"}}</a> |
|
|
|
|
|
{{else}} |
|
|
|
|
|
<a class="ti-action-menu-item disabled" href="{{$.RepoLink}}/modelarts/train-job/{{.JobID}}/create_version?version_name={{.VersionName}}">{{$.i18n.Tr "repo.modelarts.modify"}}</a> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
|
|
{{if $.Permission.CanWrite $.UnitTypeCloudBrain}} |
|
|
|
|
|
<a class="ti-action-menu-item {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED"}}disabled {{end}}" id="{{.VersionName}}-stop" onclick="stopVersion({{.VersionName}})">{{$.i18n.Tr "repo.stop"}}</a> |
|
|
|
|
|
{{else}} |
|
|
|
|
|
<a class="ti-action-menu-item disabled" id="{{.VersionName}}-stop" onclick="stopVersion({{.VersionName}})">{{$.i18n.Tr "repo.stop"}}</a> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
|
|
{{if $.Permission.CanWrite $.UnitTypeCloudBrain}} |
|
|
|
|
|
<a class="ti-action-menu-item" onclick="deleteVersion({{.VersionName}})" style="color: #FF4D4F;">{{$.i18n.Tr "repo.delete"}}</a> |
|
|
|
|
|
{{else}} |
|
|
|
|
|
<a class="ti-action-menu-item disabled" onclick="deleteVersion({{.VersionName}})" style="color: #FF4D4F;">{{$.i18n.Tr "repo.delete"}}</a> |
|
|
|
|
|
{{end}} |
|
|
</div> |
|
|
</div> |
|
|
<div class="ac-display-inblock title_text acc-margin-bottom"> |
|
|
<div class="ac-display-inblock title_text acc-margin-bottom"> |
|
|
|
|
|
|
|
|
<span class="cti-mgRight-sm">{{.Cloudbrain.CreatedUnix}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm"> 当前版本:{{.VersionName}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm"> 父版本:{{.PreVersionName}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm ac-text-normal title_text">状态: |
|
|
|
|
|
|
|
|
<span class="cti-mgRight-sm">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.current_version"}}:{{.VersionName}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm"> {{$.i18n.Tr "repo.modelarts.parent_version"}}:{{.PreVersionName}}</span> |
|
|
|
|
|
<span class="cti-mgRight-sm ac-text-normal title_text">{{$.i18n.Tr "repo.modelarts.status"}}: |
|
|
<span id="{{.VersionName}}-status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
<span id="{{.VersionName}}-status-span"><i id="icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span> |
|
|
</span> |
|
|
</span> |
|
|
<span class="ac-text-normal title_text">运行时间:</span> |
|
|
|
|
|
|
|
|
<span class="ac-text-normal title_text">{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}}:</span> |
|
|
<span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{.TrainJobDuration}}</span> |
|
|
<span class="cti-mgRight-sm uc-accordionTitle-black" id="{{.VersionName}}-duration-span">{{.TrainJobDuration}}</span> |
|
|
<span data-tooltip="刷新" style="cursor: pointer;" data-inverted="" onclick="refreshStatus({{.VersionName}})"><i class="redo icon redo-color"></i></span> |
|
|
<span data-tooltip="刷新" style="cursor: pointer;" data-inverted="" onclick="refreshStatus({{.VersionName}})"><i class="redo icon redo-color"></i></span> |
|
|
|
|
|
|
|
|
@@ -214,9 +229,9 @@ td, th { |
|
|
<div class="content-pad"> |
|
|
<div class="content-pad"> |
|
|
<div class="ui pointing secondary menu"> |
|
|
<div class="ui pointing secondary menu"> |
|
|
|
|
|
|
|
|
<a class="active item" data-tab="first{{$k}}">配置信息</a> |
|
|
|
|
|
<a class="item" data-tab="second{{$k}}" onclick="loadLog({{.VersionName}})">日志文件</a> |
|
|
|
|
|
<a class="item" data-tab="third{{$k}}" onclick="loadModelFile({{.VersionName}},'','','init')">模型下载</a> |
|
|
|
|
|
|
|
|
<a class="active item" data-tab="first{{$k}}">{{$.i18n.Tr "repo.modelarts.train_job.config"}}</a> |
|
|
|
|
|
<a class="item" data-tab="second{{$k}}" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> |
|
|
|
|
|
<a class="item" data-tab="third{{$k}}" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> |
|
|
</div> |
|
|
</div> |
|
|
<div class="ui tab active" data-tab="first{{$k}}"> |
|
|
<div class="ui tab active" data-tab="first{{$k}}"> |
|
|
<div style="padding-top: 10px;"> |
|
|
<div style="padding-top: 10px;"> |
|
|
@@ -227,7 +242,7 @@ td, th { |
|
|
<tbody class="ti-text-form"> |
|
|
<tbody class="ti-text-form"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
任务名称 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.cloudbrain_task"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -238,7 +253,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
状态 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.status"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -249,7 +264,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
运行版本 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.run_version"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -260,18 +275,18 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
开始时间 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.start_time"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
<div class="text-span text-span-w"> |
|
|
<div class="text-span text-span-w"> |
|
|
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span> |
|
|
|
|
|
|
|
|
<span style="font-size: 12px;" class="">{{TimeSinceUnix1 .Cloudbrain.CreatedUnix}}</span> |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
运行时间 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.dura_time"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -282,7 +297,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
规格 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.standard"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -293,7 +308,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
计算节点 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.compute_node"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -310,7 +325,7 @@ td, th { |
|
|
<tbody class="ti-text-form"> |
|
|
<tbody class="ti-text-form"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
AI引擎 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.AI_driver"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -332,7 +347,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
启动文件 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.start_file"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -343,7 +358,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
训练数据集 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.train_dataset"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -354,7 +369,7 @@ td, th { |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
运行参数 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.run_parameter"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
@@ -363,7 +378,7 @@ td, th { |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
|
|
|
|
|
|
<!-- <tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
训练输出位置 |
|
|
训练输出位置 |
|
|
</td> |
|
|
</td> |
|
|
@@ -373,15 +388,15 @@ td, th { |
|
|
{{.TrainUrl}} |
|
|
{{.TrainUrl}} |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
|
|
|
|
|
|
</tr> --> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<tr class="ti-no-ng-animate"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
<td class="ti-no-ng-animate ti-text-form-label text-width80"> |
|
|
描述 |
|
|
|
|
|
|
|
|
{{$.i18n.Tr "repo.modelarts.train_job.description"}} |
|
|
</td> |
|
|
</td> |
|
|
|
|
|
|
|
|
<td class="ti-text-form-content"> |
|
|
<td class="ti-text-form-content"> |
|
|
<div class="text-span text-span-w"> |
|
|
<div class="text-span text-span-w"> |
|
|
<!-- {{.TrainUrl}} --> |
|
|
|
|
|
|
|
|
{{.Cloudbrain.Description}} |
|
|
</div> |
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
@@ -460,7 +475,7 @@ td, th { |
|
|
{{template "base/footer" .}} |
|
|
{{template "base/footer" .}} |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
console.log({{.version_list_task}}) |
|
|
$('.menu .item').tab() |
|
|
$('.menu .item').tab() |
|
|
// $('.ui.style.accordion').accordion(); |
|
|
// $('.ui.style.accordion').accordion(); |
|
|
|
|
|
|
|
|
@@ -471,12 +486,12 @@ td, th { |
|
|
$('.secondary.menu .item').tab(); |
|
|
$('.secondary.menu .item').tab(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
var userName |
|
|
|
|
|
var repoPath |
|
|
|
|
|
var jobID |
|
|
|
|
|
|
|
|
let userName |
|
|
|
|
|
let repoPath |
|
|
|
|
|
let jobID |
|
|
$(document).ready(function(){ |
|
|
$(document).ready(function(){ |
|
|
var url = window.location.href; |
|
|
|
|
|
var urlArr = url.split('/') |
|
|
|
|
|
|
|
|
let url = window.location.href; |
|
|
|
|
|
let urlArr = url.split('/') |
|
|
userName = urlArr.slice(-5)[0] |
|
|
userName = urlArr.slice(-5)[0] |
|
|
repoPath = urlArr.slice(-4)[0] |
|
|
repoPath = urlArr.slice(-4)[0] |
|
|
jobID = urlArr.slice(-1)[0] |
|
|
jobID = urlArr.slice(-1)[0] |
|
|
@@ -489,11 +504,23 @@ td, th { |
|
|
e.cancelBubble = true; //ie兼容 |
|
|
e.cancelBubble = true; //ie兼容 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// var timeid = window.setInterval(refreshStatus(version_name), 30000); |
|
|
|
|
|
|
|
|
// let timeid = window.setInterval(refreshStatus(version_name), 30000); |
|
|
// document.ready(refreshStatus(version_name)) |
|
|
// document.ready(refreshStatus(version_name)) |
|
|
var timeid = window.setInterval(loadJobStatus, 30000); |
|
|
|
|
|
|
|
|
let timeid = window.setInterval(loadJobStatus, 30000); |
|
|
$(document).ready(loadJobStatus); |
|
|
$(document).ready(loadJobStatus); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function renderSize(value){ |
|
|
|
|
|
if(null==value||value==''){ |
|
|
|
|
|
return "0 Bytes"; |
|
|
|
|
|
} |
|
|
|
|
|
var unitArr = new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"); |
|
|
|
|
|
var index=0; |
|
|
|
|
|
var srcsize = parseFloat(value); |
|
|
|
|
|
index=Math.floor(Math.log(srcsize)/Math.log(1024)); |
|
|
|
|
|
var size =srcsize/Math.pow(1024,index); |
|
|
|
|
|
size=size.toFixed(2);//保留的小数位数 |
|
|
|
|
|
return size+unitArr[index]; |
|
|
|
|
|
} |
|
|
function loadJobStatus() { |
|
|
function loadJobStatus() { |
|
|
$(".ui.accordion.border-according").each((index, job) => { |
|
|
$(".ui.accordion.border-according").each((index, job) => { |
|
|
|
|
|
|
|
|
@@ -505,23 +532,17 @@ td, th { |
|
|
|| job.textContent.trim() == 'CANCELED' || job.textContent.trim() == 'LOST') { |
|
|
|| job.textContent.trim() == 'CANCELED' || job.textContent.trim() == 'LOST') { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let stopArray=["KILLED","FAILED","START_FAILED","KILLING","COMPLETED"] |
|
|
$.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}?version_name=${versionname}`, (data) => { |
|
|
$.get(`/api/v1/repos/${repoPath}/modelarts/train-job/${jobID}?version_name=${versionname}`, (data) => { |
|
|
// const jobID = data.JobID |
|
|
|
|
|
// const status = data.JobStatus |
|
|
|
|
|
// const duration = data.JobDuration |
|
|
|
|
|
$(`#${versionname}-duration-span`).text(data.JobDuration) |
|
|
$(`#${versionname}-duration-span`).text(data.JobDuration) |
|
|
$(`#${versionname}-status-span span`).text(data.JobStatus) |
|
|
$(`#${versionname}-status-span span`).text(data.JobStatus) |
|
|
$(`#${versionname}-status-span i`).attr("class",data.JobStatus) |
|
|
$(`#${versionname}-status-span i`).attr("class",data.JobStatus) |
|
|
// detail status and duration |
|
|
// detail status and duration |
|
|
$('#'+versionname+'-duration').text(data.JobDuration) |
|
|
$('#'+versionname+'-duration').text(data.JobDuration) |
|
|
$('#'+versionname+'-status').text(data.JobStatus) |
|
|
$('#'+versionname+'-status').text(data.JobStatus) |
|
|
// $('#duration-'+jobID).text(duration) |
|
|
|
|
|
// if (status != job.textContent.trim()) { |
|
|
|
|
|
// $('#' + jobID+'-icon').removeClass().addClass(status) |
|
|
|
|
|
// $('#' + jobID+ '-text').text(status) |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
if(stopArray.includes(data.JobStatus)){ |
|
|
|
|
|
$('#'+versionname+'-stop').addClass('disabled') |
|
|
|
|
|
} |
|
|
}).fail(function(err) { |
|
|
}).fail(function(err) { |
|
|
console.log(err); |
|
|
console.log(err); |
|
|
}); |
|
|
}); |
|
|
@@ -648,6 +669,7 @@ td, th { |
|
|
html += '<tbody>' |
|
|
html += '<tbody>' |
|
|
// html += "</tbody>" |
|
|
// html += "</tbody>" |
|
|
for(let i=0;i<data.Dirs.length;i++){ |
|
|
for(let i=0;i<data.Dirs.length;i++){ |
|
|
|
|
|
let dirs_size = renderSize(data.Dirs[i].Size) |
|
|
html += "<tr>" |
|
|
html += "<tr>" |
|
|
html += "<td class='name six wid'>" |
|
|
html += "<td class='name six wid'>" |
|
|
html += "<span class='truncate'>" |
|
|
html += "<span class='truncate'>" |
|
|
@@ -664,7 +686,7 @@ td, th { |
|
|
html += "</span>" |
|
|
html += "</span>" |
|
|
html += "</td>" |
|
|
html += "</td>" |
|
|
html += "<td class='message seven wide'>" |
|
|
html += "<td class='message seven wide'>" |
|
|
html += "<span class='truncate has-emoji'>" + data.Dirs[i].Size + "</span>" |
|
|
|
|
|
|
|
|
html += "<span class='truncate has-emoji'>"+ `${dirs_size}` + "</span>" |
|
|
html += "</td>" |
|
|
html += "</td>" |
|
|
|
|
|
|
|
|
html += "<td class='text right age three wide'>" |
|
|
html += "<td class='text right age three wide'>" |
|
|
@@ -683,13 +705,13 @@ td, th { |
|
|
} |
|
|
} |
|
|
// $(`.log{}`).scroll() |
|
|
// $(`.log{}`).scroll() |
|
|
function logScroll(version_name) { |
|
|
function logScroll(version_name) { |
|
|
var scrollTop = $(`#log${version_name}`)[0].scrollTop; // 滚动距离 |
|
|
|
|
|
var scrollHeight = $(`#log${version_name}`)[0].scrollHeight; // 文档高度 |
|
|
|
|
|
var divHeight = $(`#log${version_name}`).height(); // 可视区高度 |
|
|
|
|
|
|
|
|
let scrollTop = $(`#log${version_name}`)[0].scrollTop; // 滚动距离 |
|
|
|
|
|
let scrollHeight = $(`#log${version_name}`)[0].scrollHeight; // 文档高度 |
|
|
|
|
|
let divHeight = $(`#log${version_name}`).height(); // 可视区高度 |
|
|
// let version_name=$(this).find('input[name=version_name]').val() |
|
|
// let version_name=$(this).find('input[name=version_name]').val() |
|
|
console.log("scrollTo,scrollHeight,divHeight",scrollTop,scrollHeight,divHeight) |
|
|
console.log("scrollTo,scrollHeight,divHeight",scrollTop,scrollHeight,divHeight) |
|
|
if(parseInt(scrollTop) + divHeight + 18 == scrollHeight){ |
|
|
if(parseInt(scrollTop) + divHeight + 18 == scrollHeight){ |
|
|
var 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}&order=desc`, (data) => { |
|
|
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${end_line}&order=desc`, (data) => { |
|
|
if (data.Lines == 0){ |
|
|
if (data.Lines == 0){ |
|
|
$(`.message${version_name} #header`).text('您已翻阅至日志底部') |
|
|
$(`.message${version_name} #header`).text('您已翻阅至日志底部') |
|
|
@@ -706,7 +728,7 @@ td, th { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
if(scrollTop == 0){ |
|
|
if(scrollTop == 0){ |
|
|
var 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}&order=asc`, (data) => { |
|
|
$.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${start_line}&order=asc`, (data) => { |
|
|
if (data.Lines == 0){ |
|
|
if (data.Lines == 0){ |
|
|
$(`.message${version_name} #header`).text('您已翻阅至日志顶部') |
|
|
$(`.message${version_name} #header`).text('您已翻阅至日志顶部') |
|
|
|