|
|
|
@@ -147,7 +147,7 @@ td, th { |
|
|
|
width: 100px; |
|
|
|
line-height: 30px; |
|
|
|
} |
|
|
|
.border-according{ |
|
|
|
.border-according-model{ |
|
|
|
border: 1px solid #dfe1e6; |
|
|
|
} |
|
|
|
.disabled { |
|
|
|
@@ -188,7 +188,7 @@ td, th { |
|
|
|
</div> |
|
|
|
</h4> |
|
|
|
{{with .task}} |
|
|
|
<div class="ui accordion border-according" id="accordion" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.CloudBrainTaskId}}" data-version="1"> |
|
|
|
<div class="ui accordion border-according-model" id="accordion" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.CloudBrainTaskId}}" data-version="1"> |
|
|
|
<input type="hidden" id="jobId_input" name="jobId_input" value="{{.CloudBrainTaskId}}"> |
|
|
|
<div class="active title padding0"> |
|
|
|
<div class="according-panel-heading"> |
|
|
|
@@ -649,17 +649,13 @@ td, th { |
|
|
|
size=size.toFixed(0);//保留的小数位数 |
|
|
|
return size+unitArr[index]; |
|
|
|
} |
|
|
|
|
|
|
|
function loadJobStatus() { |
|
|
|
$(".ui.accordion.border-according").each((index, job) => { |
|
|
|
$(".ui.accordion.border-according-model").each((index, job) => { |
|
|
|
const jobID = job.dataset.jobid; |
|
|
|
const repoPath = job.dataset.repopath; |
|
|
|
const versionname = job.dataset.version |
|
|
|
// ['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED'] |
|
|
|
// if (job.textContent.trim() == 'IMAGE_FAILED' || job.textContent.trim() == 'SUBMIT_FAILED' || job.textContent.trim() == 'DELETE_FAILED' |
|
|
|
// || job.textContent.trim() == 'KILLED' || job.textContent.trim() == 'COMPLETED' || job.textContent.trim() == 'FAILED' |
|
|
|
// || job.textContent.trim() == 'CANCELED' || job.textContent.trim() == 'LOST') { |
|
|
|
// return |
|
|
|
// } |
|
|
|
|
|
|
|
let status = $(`#status-span`).text() |
|
|
|
|
|
|
|
if(['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED','SUCCEEDED','STOPPED'].includes(status)){ |
|
|
|
@@ -679,18 +675,7 @@ td, th { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
function refreshStatus(version_name){ |
|
|
|
$.get(`/api/v1/repos/${userName}/${repoPath}/modelmanage/${taskID}?version_name=${versionname}`,(data)=>{ |
|
|
|
$(`#status-span span`).text(data.JobStatus) |
|
|
|
$(`#status-span i`).attr("class",data.JobStatus) |
|
|
|
$('#status').text(data.JobStatus) |
|
|
|
loadLog(version_name) |
|
|
|
}).fail(function(err) { |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
stopBubbling(arguments.callee.caller.arguments[0]) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function parseInfo(){ |
|
|
|
let jsonValue = document.getElementById("json_value").value; |
|
|
|
let jsonObj = JSON.parse(jsonValue); |
|
|
|
|