Commit 469f901e authored by Tristan Cavelier's avatar Tristan Cavelier

monitor2: fix status interface js error according to dom

Fixing almost random error: cannot get `parentNode` of null
parent 3a978a29
...@@ -80,7 +80,7 @@ md5sum = a18ab932e5e2e656995f47c7d4a7853a ...@@ -80,7 +80,7 @@ md5sum = a18ab932e5e2e656995f47c7d4a7853a
[monitor-web-monitor-js] [monitor-web-monitor-js]
<= monitor-download-base <= monitor-download-base
filename = monitor.js.in filename = monitor.js.in
md5sum = 8bc4b8368a752f90da2571866768e81f md5sum = 65799bea0e09147ef9cbcbb46fcb1c1d
[monitor-web-monitor-logout-cgi] [monitor-web-monitor-logout-cgi]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -152,8 +152,11 @@ ...@@ -152,8 +152,11 @@
"<p>Red square means the feature has a problem, green square means it is ok.</p>", "<p>Red square means the feature has a problem, green square means it is ok.</p>",
"<p>You can click on a feature below to get more precise information.</p>" "<p>You can click on a feature below to get more precise information.</p>"
].join("\n")), div = document.createElement("div"), tmp; ].join("\n")), div = document.createElement("div"), tmp;
[].forEach.call(element_list, function (element) { [].reduce.call(element_list, function (array, element) {
if (element.parentNode.parentNode) { return; } if (element.parentNode.parentNode) { return array; }
array.push(element);
return array;
}, []).forEach(function (element) {
root.appendChild(element); root.appendChild(element);
}); });
document.title = monitor_title; document.title = monitor_title;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment