@cryptotaxi247 / netdata-1 / commits / 47aa4c954

restore the scroll position of the dashboard when restoring snapshots

Costa Tsaousis (ktsaou) committed Nov 14, 2017 at 15:26 UTC 47aa4c954bcd6359d41e4ad97f068d0f9478ba4a
1 file changed +6
web/index.html
+6
@@ -2858,6 +2858,11 @@
2858 document.getElementById('sidebar').innerHTML = '';
2859 NETDATA.globalReset();
2860
2861 + if(typeof tmpSnapshotData.hash !== 'undefined')
2862 + urlOptions.hash = tmpSnapshotData.hash;
2863 + else
2864 + urlOptions.hash = '#';
2865 +
2866 netdataSnapshotData = tmpSnapshotData;
2867 initializeDynamicDashboard(netdataSnapshotData.url);
2868
@@ -3044,6 +3049,7 @@
3049 data_points: 0,
3050 url: document.location.origin.toString() + document.location.search.toString(),
3051 comments: document.getElementById('saveSnapshotComments').value.toString(),
3052 + hash: urlOptions.hash,
3053 charts: options.data,
3054 data: {}
3055 };