fix incorrect comment, make minidashboard silent if no data received
diff --git a/planetstack/core/static/page_analytics.js b/planetstack/core/static/page_analytics.js
index 0b1357b..d9e98e1 100644
--- a/planetstack/core/static/page_analytics.js
+++ b/planetstack/core/static/page_analytics.js
@@ -44,6 +44,11 @@
window.pageAnalyticsUrl = summaryData["dataSourceUrl"];
lastRow = summaryData.rows.length-1;
+ if (summaryData.rows.length <= 0) {
+ //console.log("no data received from page analytics ajax")
+ return;
+ }
+
setPageStatInt(".nodesLabel", ".nodesValue", "Node Count", "", summaryData.rows[lastRow]["count_hostname"]);
setPageStatInt(".cpuLabel", ".cpuValue", "Avg Load", "%", summaryData.rows[lastRow]["avg_cpu"]);
@@ -75,6 +80,12 @@
function updatePageBandwidthData(summaryData) {
window.pageBandwidthUrl = summaryData["dataSourceUrl"];
lastRow = summaryData.rows.length-1;
+
+ if (summaryData.rows.length <= 0) {
+ //console.log("no data received from page bandwidth ajax")
+ return;
+ }
+
setPageStatFloat(".bandwidthLabel", ".bandwidthValue", "Bandwidth", " Gbps", summaryData.rows[lastRow]["sum_computed_bytes_sent_div_elapsed"]*8.0/1024/1024/1024,2);
setPageStatFloat("#miniDashBandwidthLabel", "#miniDashBandwidth", "Bandwidth", " Gbps", summaryData.rows[lastRow]["sum_computed_bytes_sent_div_elapsed"]*8.0/1024/1024/1024,2);
}
diff --git a/planetstack/core/static/planetstack_graphs.js b/planetstack/core/static/planetstack_graphs.js
index 0c099a9..d8690ed 100644
--- a/planetstack/core/static/planetstack_graphs.js
+++ b/planetstack/core/static/planetstack_graphs.js
@@ -77,7 +77,7 @@
'Histogram':google.visualization.Histogram};
if (response.isError()) {
- #console.log("retry chart");
+ //console.log("retry chart");
setTimeout(function () { startQuery(container, dataSourceUrl, yColumn, xColumn, aggFunc, options) }, 5000);
return
}