Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1845/head
zouap 3 years ago
parent
commit
4c307c9d8b
2 changed files with 50 additions and 24 deletions
  1. +26
    -0
      public/home/search.js
  2. +24
    -24
      templates/repo/cloudbrain/show.tmpl

+ 26
- 0
public/home/search.js View File

@@ -129,6 +129,32 @@ function search(){
} }
} }


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 +="<p>" +podEventArray[i]["reason"] + "</p>";
html +="<p>" +podEventArray[i]["message"] + "</p>";
html +="<p>" +podEventArray[i]["action"] + "</p>";
}
}
let extras= jsonObj["extras"];
if(extras != null){
html +="<p>" +extras["reason"] + "</p>";
html +="<p>" +extras["message"] + "</p>";
html +="<p>" +extras["action"] + "</p>";
}
document.getElementById("info_display").innerHTML=html;
}
}

function emptySearch(){ function emptySearch(){
initDiv(false); initDiv(false);
initPageInfo(); initPageInfo();


+ 24
- 24
templates/repo/cloudbrain/show.tmpl View File

@@ -168,31 +168,31 @@ td, th {
} }
</style> </style>
<script> <script>
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 +="<p>" +podEventArray[i]["reason"] + "</p>";
html +="<p>" +podEventArray[i]["message"] + "</p>";
html +="<p>" +podEventArray[i]["action"] + "</p>";
}
}
let extras= jsonObj["extras"];
if(extras != null){
html +="<p>" +extras["reason"] + "</p>";
html +="<p>" +extras["message"] + "</p>";
html +="<p>" +extras["action"] + "</p>";
}
document.getElementById("info_display").innerHTML=html;
}
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(var i=0; i < podEventArray.length;i++){
html +="<p>" +podEventArray[i]["reason"] + "</p>";
html +="<p>" +podEventArray[i]["message"] + "</p>";
html +="<p>" +podEventArray[i]["action"] + "</p>";
}
}
let extras= jsonObj["extras"];
if(extras != null){
html +="<p>" +extras["reason"] + "</p>";
html +="<p>" +extras["message"] + "</p>";
html +="<p>" +extras["action"] + "</p>";
}
document.getElementById("info_display").innerHTML=html;
} }
}
</script> </script>


<div id="mask"> <div id="mask">


Loading…
Cancel
Save