Remove the data if needed
This commit is contained in:
parent
01c427eea2
commit
1e5b5efc48
@ -216,7 +216,11 @@ function setAllGraphVisibility(visible) {
|
|||||||
historyPlot.draw();
|
historyPlot.draw();
|
||||||
|
|
||||||
// Update our localStorage
|
// Update our localStorage
|
||||||
saveGraphControls(Object.keys(displayedGraphData));
|
if (visible) {
|
||||||
|
resetGraphControls();
|
||||||
|
} else {
|
||||||
|
saveGraphControls(Object.keys(displayedGraphData));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleControlsDrawer() {
|
function toggleControlsDrawer() {
|
||||||
@ -470,6 +474,10 @@ $(document).ready(function() {
|
|||||||
historyPlot.draw();
|
historyPlot.draw();
|
||||||
|
|
||||||
// Update our localStorage
|
// Update our localStorage
|
||||||
saveGraphControls(Object.keys(displayedGraphData));
|
if (Object.keys(hiddenGraphData).length === 0) {
|
||||||
|
resetGraphControls();
|
||||||
|
} else {
|
||||||
|
saveGraphControls(Object.keys(displayedGraphData));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -20,6 +20,12 @@ function loadGraphControls() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetGraphControls() {
|
||||||
|
if (typeof(localStorage) !== undefined) {
|
||||||
|
localStorage.removeItem('displayedServers');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getTimestamp(ms, timeOnly) {
|
function getTimestamp(ms, timeOnly) {
|
||||||
var date = new Date(0);
|
var date = new Date(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user