Remove the data if needed
This commit is contained in:
parent
01c427eea2
commit
1e5b5efc48
@ -216,7 +216,11 @@ function setAllGraphVisibility(visible) {
|
||||
historyPlot.draw();
|
||||
|
||||
// Update our localStorage
|
||||
saveGraphControls(Object.keys(displayedGraphData));
|
||||
if (visible) {
|
||||
resetGraphControls();
|
||||
} else {
|
||||
saveGraphControls(Object.keys(displayedGraphData));
|
||||
}
|
||||
}
|
||||
|
||||
function toggleControlsDrawer() {
|
||||
@ -470,6 +474,10 @@ $(document).ready(function() {
|
||||
historyPlot.draw();
|
||||
|
||||
// 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) {
|
||||
var date = new Date(0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user