[Git][NTPsec/ntpsec][master] ntpviz: Only show keys in Peer Offist/Jitter is 6 or fewer.

Gary E. Miller gitlab at mg.gitlab.com
Thu Oct 6 00:23:18 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
5f82a4b6 by Gary E. Miller at 2016-10-05T17:21:50-07:00
ntpviz: Only show keys in Peer Offist/Jitter is 6 or fewer.

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -627,11 +627,17 @@ at 0s.</p>
 <p>RMS Jitter is field 8 in the peerstats log file.</p>
 """
 
+        if 6 >= len(peerlist):
+            set_key = "set key top right box"
+        else:
+            # too many keys to show
+            set_key = "set key off"
+
         plot_template = NTPViz.Common + """\
 set title "%(sitename)s: %(title)s"
 set ylabel ""
 set ytics format "%%1.1f %(unit)s" nomirror
-set key top right box
+%(set_key)s
 plot \
 """ % locals()
         plot_template += percentages



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5f82a4b61d0b8bfea7724835ffdb7e0071a9c3f7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161006/33be488e/attachment.html>


More information about the vc mailing list