|
|
@@ -214,8 +214,9 @@ td, th { |
|
|
|
<div class="content-pad"> |
|
|
|
<div class="ui pointing secondary menu" style="border-bottom: 1px solid rgba(34,36,38,.15);"> |
|
|
|
<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> |
|
|
|
<a class="item" data-tab="second{{$k}}" onclick="javascript:parseInfo()">{{$.i18n.Tr "repo.cloudbrain.runinfo"}}</a> |
|
|
|
<a class="item" data-tab="third{{$k}}" onclick="loadLog({{.VersionName}})">{{$.i18n.Tr "repo.modelarts.log"}}</a> |
|
|
|
<a class="item" data-tab="four{{$k}}" onclick="loadModelFile({{.VersionName}},'','','init')">{{$.i18n.Tr "repo.model_download"}}</a> |
|
|
|
</div> |
|
|
|
<div class="ui tab active" data-tab="first{{$k}}"> |
|
|
|
<div style="padding-top: 10px;"> |
|
|
@@ -376,11 +377,29 @@ td, th { |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ui tab" data-tab="second{{$k}}"> |
|
|
|
<div> |
|
|
|
<div class="ui message message{{.VersionName}}" style="display: none;"> |
|
|
|
<div id="header"></div> |
|
|
|
</div> |
|
|
|
<div class="ui attached log" id="log{{.VersionName}}" style="height: 390px !important; overflow: auto;"> |
|
|
|
<input type="hidden" id="json_value" value="{{$.result.JobStatus.AppExitDiagnostics}}"> |
|
|
|
<input type="hidden" id="ExitDiagnostics" value="{{$.ExitDiagnostics}}"> |
|
|
|
<span id="info_display" class="info_text"> |
|
|
|
|
|
|
|
</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ui tab" data-tab="third{{$k}}"> |
|
|
|
<div> |
|
|
|
<div class="ui message message{{.VersionName}}" style="display: none;"> |
|
|
|
<div id="header"></div> |
|
|
|
</div> |
|
|
|
<div class="ui attached log" id="log{{.VersionName}}" style="height: 300px !important; overflow: auto;"> |
|
|
|
<input type="hidden" name="end_line" value> |
|
|
|
<input type="hidden" name="start_line" value> |
|
|
@@ -391,7 +410,7 @@ td, th { |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ui tab" data-tab="third{{$k}}"> |
|
|
|
<div class="ui tab" data-tab="four{{$k}}"> |
|
|
|
<input type="hidden" name="model{{.VersionName}}" value="-1"> |
|
|
|
<input type="hidden" name="modelback{{.VersionName}}" value="-1"> |
|
|
|
<div class='ui breadcrumb model_file_bread' id='file_breadcrumb{{.VersionName}}'> |
|
|
@@ -609,10 +628,10 @@ td, th { |
|
|
|
// } |
|
|
|
let status = $(`#${versionname}-status-span`).text() |
|
|
|
|
|
|
|
if(['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED','SUCCEEDED'].includes(status)){ |
|
|
|
if(['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED','SUCCEEDED','STOPPED'].includes(status)){ |
|
|
|
return |
|
|
|
} |
|
|
|
let stopArray=["KILLED","FAILED","START_FAILED","KILLING","COMPLETED","SUCCEEDED"] |
|
|
|
let stopArray=["KILLED","FAILED","START_FAILED","KILLING","COMPLETED","SUCCEEDED","STOPPED"] |
|
|
|
$.get(`/api/v1/repos/${repoPath}/cloudbrain/${taskID}?version_name=${versionname}`, (data) => { |
|
|
|
//$(`#${versionname}-duration-span`).text(data.JobDuration) |
|
|
|
$(`#${versionname}-status-span span`).text(data.JobStatus) |
|
|
@@ -649,5 +668,42 @@ td, th { |
|
|
|
}); |
|
|
|
stopBubbling(arguments.callee.caller.arguments[0]) |
|
|
|
} |
|
|
|
|
|
|
|
function parseInfo(){ |
|
|
|
let jsonValue = document.getElementById("json_value").value; |
|
|
|
let jsonObj = JSON.parse(jsonValue); |
|
|
|
let podRoleName = jsonObj["podRoleName"]; |
|
|
|
let html = ""; |
|
|
|
if (podRoleName != null){ |
|
|
|
let task0 = podRoleName["task1-0"]; |
|
|
|
let podEvents = jsonObj["podEvents"]; |
|
|
|
let podEventArray = podEvents[task0]; |
|
|
|
if(podEventArray != null){ |
|
|
|
for(var i=0; i < podEventArray.length;i++){ |
|
|
|
html +="<p><b>[" +podEventArray[i]["reason"] + "]</b></p>"; |
|
|
|
html +="<p>" +podEventArray[i]["message"] + "</p>"; |
|
|
|
html +="<p>" +podEventArray[i]["action"] + "</p>"; |
|
|
|
} |
|
|
|
} |
|
|
|
let extras= jsonObj["extras"]; |
|
|
|
if(extras != null){ |
|
|
|
for(var i=0; i < extras.length;i++){ |
|
|
|
html +="<p><b>[" +extras[i]["reason"] + "]</b></p>"; |
|
|
|
html +="<p>" +extras[i]["message"] + "</p>"; |
|
|
|
html +="<p>" +extras[i]["action"] + "</p>"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let string = document.getElementById("ExitDiagnostics").value; |
|
|
|
string = string.replace(/\r\n/g,"<br>") |
|
|
|
string = string.replace(/\n/g,"<br>"); |
|
|
|
string = string.replace(/(\r\n)|(\n)/g,'<br>'); |
|
|
|
|
|
|
|
html +="<p><b>[ExitDiagnostics]</b></p>"; |
|
|
|
html +="<p>" +string + "</p>"; |
|
|
|
|
|
|
|
document.getElementById("info_display").innerHTML=html; |
|
|
|
} |
|
|
|
|
|
|
|
</script> |