diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-28 16:55:46 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-28 16:55:46 +0200 |
commit | f73fc3eac92175a0c12865d419aa6d212be3a215 (patch) | |
tree | e6f05842e204459b159e2e280a51aa579443f1eb /web | |
parent | e5323ecaf854924cdc6226a5db716d35ae347e9b (diff) |
front: A few more time travel tweaks
I can never get it all in a single commit.
But I compensate by some times putting multiple unrelated things in the
same commit.
Diffstat (limited to 'web')
-rw-r--r-- | web/index.html | 23 | ||||
-rw-r--r-- | web/js/nms-time.js | 2 |
2 files changed, 11 insertions, 14 deletions
diff --git a/web/index.html b/web/index.html index 593452b..ca97ad0 100644 --- a/web/index.html +++ b/web/index.html @@ -235,24 +235,21 @@ <div class="form-group"> <input type="text" class="form-control" placeholder="YYYY-MM-DDThh:mm:ss" id="nowPicker"> <div class="button-group"> - <button class="btn btn-primary" onclick="nmsTime.setNow(document.getElementById('nowPicker').dataset.iso);hideLayer('nowPickerBox');nmsTime.updateData();">Travel</button> - <button class="btn btn-danger" onclick="startNowPicker(Date.now());nms.playback.setNow(false);nms.playback.play();">Back to reality</button> + <button class="btn btn-primary" onclick="nmsTime.setNow(document.getElementById('nowPicker').dataset.iso);hideLayer('nowPickerBox');">Travel</button> + <button class="btn btn-danger" onclick="nmsTime.realTime();hideLayer('nowPickerBox');">Back to reality</button> <button class="btn btn-info" data-toggle="button" onclick="toggleLayer('nowPickerInfo');">Info</button> </div> </div> </div> <div id="nowPickerInfo" class="col-sm-12" style="display:none;"> - <p>Some features do not have time travel support (comment - spotting and DHCP map at the moment). We also lack - compatible SNMP data for the first day or so, so you'll - only have ping data for the first day of TG15.</p> - <p>It could take some time to load a specific point in time - for the first time. See "About performance" under the help - menu for more information.</p> - <p>You can also step backwards and forwards in time, stop - and start replay and go back to real time using keyboard - shortcuts. See the help menu for an overview of keyboard - shortcuts.</p> + <p>Time travel allows you to see the state of the network at a + given time, and even fast forward or rewind on the fly with + keyboard shortcuts (See the 'keyboard shortcuts' help + section).</p> + <p>Some features might not work perfectly with time travel, but + you should get a pretty good idea of what went on.</p> + <p>While we have more detailed data, time travel is limited to + five minute intervals by default for performance reasons.</p> </div> </div> </div> diff --git a/web/js/nms-time.js b/web/js/nms-time.js index e857956..315ac79 100644 --- a/web/js/nms-time.js +++ b/web/js/nms-time.js @@ -60,6 +60,7 @@ nmsTime.setNow = function(now) { newDate.setMilliseconds(0); newDate.setMinutes(newDate.getMinutes() - newDate.getMinutes()%5); nmsTime._now = newDate; + nmsTime._updateData(); } nmsTime._updateData = function() { @@ -135,7 +136,6 @@ nmsTime.togglePause = function() { } else { if (nmsTime.isRealTime()) { nmsTime.setNow(Date.now()); - nmsTime._updateData(); } else { nmsTime.startPlayback(nmsTime._speed ? nmsTime._speed : 5); } |