Browse Source

no show empty message

pull/2068/head
lewis 3 years ago
parent
commit
39f6a55e28
2 changed files with 24 additions and 14 deletions
  1. +10
    -6
      templates/repo/cloudbrain/show.tmpl
  2. +14
    -8
      templates/repo/cloudbrain/trainjob/show.tmpl

+ 10
- 6
templates/repo/cloudbrain/show.tmpl View File

@@ -516,17 +516,21 @@ td, th {
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>";
if (podEventArray[i]["reason"]!="") {
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>";
if (extras[i]["reason"]!="") {
html +="<p><b>[" +extras[i]["reason"] + "]</b></p>";
html +="<p>" +extras[i]["message"] + "</p>";
html +="<p>" +extras[i]["action"] + "</p>";
}
}
}
}


+ 14
- 8
templates/repo/cloudbrain/trainjob/show.tmpl View File

@@ -680,17 +680,21 @@ td, th {
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>";
if (podEventArray[i]["reason"]!="") {
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>";
if (extras[i]["reason"]!="") {
html +="<p><b>[" +extras[i]["reason"] + "]</b></p>";
html +="<p>" +extras[i]["message"] + "</p>";
html +="<p>" +extras[i]["action"] + "</p>";
}
}
}
}
@@ -700,8 +704,10 @@ td, th {
string = string.replace(/\n/g,"<br>");
string = string.replace(/(\r\n)|(\n)/g,'<br>');

html +="<p><b>[ExitDiagnostics]</b></p>";
html +="<p>" +string + "</p>";
if (string!=""){
html +="<p><b>[ExitDiagnostics]</b></p>";
html +="<p>" +string + "</p>";
}
document.getElementById("info_display").innerHTML=html;
}


Loading…
Cancel
Save