diff --git a/templates/repo/cloudbrain/show.tmpl b/templates/repo/cloudbrain/show.tmpl index 6fbff5956..c22012d3b 100755 --- a/templates/repo/cloudbrain/show.tmpl +++ b/templates/repo/cloudbrain/show.tmpl @@ -226,7 +226,7 @@ td, th {
@@ -418,17 +418,6 @@ td, th {
-
-
- {{$.i18n.Tr "repo.cloudbrain.exitinfo"}} - -
-
-
- - {{$.result.JobStatus.AppExitDiagnostics}} - -
@@ -439,8 +428,9 @@ td, th {
- - {{$.result.JobStatus.AppExitDiagnostics}} + + +
@@ -499,17 +489,35 @@ td, th { jobName = urlArr.slice(-1)[0] }) - function loadLog(version_name){ - document.getElementById("mask").style.display = "block" - $.get(`/api/v1/repos/${userName}/${repoPath}/cloudbrain/${jobName}/log?version_name=${version_name}&lines=50&order=asc`, (data) => { - $('input[name=end_line]').val(data.EndLine) - $('input[name=start_line]').val(data.StartLine) - $(`#log_file${version_name}`).text(data.Content) - document.getElementById("mask").style.display = "none" - }).fail(function(err) { - console.log(err); - document.getElementById("mask").style.display = "none" - }); + function parseLog(){ + 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(int i=0; i < podEventArray.length;i++){ + html +="

" +podEventArray[i]["reason"] + "

"; + html +="

" +podEventArray[i]["message"] + "

"; + html +="

" +podEventArray[i]["action"] + "

"; + } + } + let extras= jsonObj["extras"]; + if(extras != null){ + html +="

" +extras["reason"] + "

"; + html +="

" +extras["message"] + "

"; + html +="

" +extras["action"] + "

"; + } + + document.getElementById("info_display").innerHTML=html; + } + + + } +