diff --git a/static/slaveDisplay.js b/static/slaveDisplay.js
index 615e5c50..d921105e 100644
--- a/static/slaveDisplay.js
+++ b/static/slaveDisplay.js
@@ -20,8 +20,9 @@ setTimeout(function() {
}
HTML += "
";
HTML += '
';
- HTML += "
ID: " + slaveData[key].unique + "
Last seen: "+seenDate+"
Port: "+slaveData[key].serverPort+"
Host: "+slaveData[key].mac+"
";
-
+ HTML += "
ID: " + slaveData[key].unique + "
Last seen: "+seenDate+"
IP: "+slaveData[key].publicIP +":"+ slaveData[key].serverPort+"
"
+ HTML += "
Host: "+slaveData[key].mac+"
";
+ HTML += "
";
HTML += "
";
}
}
@@ -97,7 +98,7 @@ function generateLineChartArray(data, nameKey) {
}
}
}
- chartData = sortByKey(chartData, "x")
+ chartData = sortByKey(chartData, "x");
let xyz = {};
xyz.name = nameKey;
xyz.type = "line";
@@ -141,6 +142,18 @@ function drawChart(selector, chartData) {
chart.render();
}
+function hideAllDatasets(chartID) {
+ if(chartsByID[chartID]) {
+ let chart = chartsByID[chartID];
+ for(let i = 0; i < chart.options.data.length; i++) {
+ chart.options.data[i].visible = false;
+ }
+ chart.render();
+ } else {
+ return false;
+ }
+}
+
// function to sort arrays of objects after a keys value
function sortByKey(array, key) {
return array.sort(function(a, b) {