Remove the data if needed
This commit is contained in:
parent
01c427eea2
commit
1e5b5efc48
@ -216,8 +216,12 @@ function setAllGraphVisibility(visible) {
|
|||||||
historyPlot.draw();
|
historyPlot.draw();
|
||||||
|
|
||||||
// Update our localStorage
|
// Update our localStorage
|
||||||
|
if (visible) {
|
||||||
|
resetGraphControls();
|
||||||
|
} else {
|
||||||
saveGraphControls(Object.keys(displayedGraphData));
|
saveGraphControls(Object.keys(displayedGraphData));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleControlsDrawer() {
|
function toggleControlsDrawer() {
|
||||||
var div = $('#big-graph-controls-drawer');
|
var div = $('#big-graph-controls-drawer');
|
||||||
@ -470,6 +474,10 @@ $(document).ready(function() {
|
|||||||
historyPlot.draw();
|
historyPlot.draw();
|
||||||
|
|
||||||
// Update our localStorage
|
// Update our localStorage
|
||||||
|
if (Object.keys(hiddenGraphData).length === 0) {
|
||||||
|
resetGraphControls();
|
||||||
|
} else {
|
||||||
saveGraphControls(Object.keys(displayedGraphData));
|
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