chrony.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Licensed to the public under the Apache License 2.0. */
  2. 'use strict';
  3. 'require baseclass';
  4. 'require uci';
  5. return baseclass.extend({
  6. title: _('Chrony'),
  7. rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
  8. var offset = {
  9. title: "%H: Chrony - time offset",
  10. vlabel: "Time offset (ms)",
  11. number_format: "%9.3lf ms",
  12. data: {
  13. types: [ "time_offset" ],
  14. options: {
  15. time_offset_chrony: {
  16. noarea: true,
  17. overlay: true,
  18. color: "ff0000",
  19. title: "%di",
  20. transform_rpn: "1000,*"
  21. },
  22. time_offset: {
  23. noarea: true,
  24. overlay: true,
  25. title: "%di",
  26. transform_rpn: "1000,*"
  27. }
  28. }
  29. }
  30. };
  31. var stratum = {
  32. title: "%H: Chrony - clock stratum",
  33. vlabel: "Clock stratum",
  34. number_format: "%3.1lf%S",
  35. data: {
  36. types: [ "clock_stratum" ],
  37. options: {
  38. clock_stratum_chrony: {
  39. noarea: true,
  40. overlay: true,
  41. color: "ff0000",
  42. title: "%di"
  43. },
  44. clock_stratum: {
  45. noarea: true,
  46. overlay: true,
  47. title: "%di"
  48. }
  49. }
  50. }
  51. };
  52. return [ offset, stratum ];
  53. }
  54. });