ipstatistics.js 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Licensed to the public under the Apache License 2.0. */
  2. 'use strict';
  3. 'require baseclass';
  4. return baseclass.extend({
  5. title: _('IP-Statistics'),
  6. rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
  7. var traffic = {
  8. title: "%H: IPv4 and IPv6 Comparison",
  9. vlabel: "Bytes/s",
  10. number_format: "%5.1lf%sB/s",
  11. totals_format: "%5.1lf%sB",
  12. data: {
  13. sources: {
  14. ip_stats_octets: [ "ip4rx", "ip4tx", "ip6rx", "ip6tx" ]
  15. },
  16. options: {
  17. ip_stats_octets__ip4rx: {
  18. title: "IPv4 Bytes (RX)",
  19. total: true,
  20. color: "00ff00"
  21. },
  22. ip_stats_octets__ip4tx: {
  23. title: "IPv4 Bytes (TX)",
  24. flip : true,
  25. total: true,
  26. color: "0000ff"
  27. },
  28. ip_stats_octets__ip6rx: {
  29. title: "IPv6 Bytes (RX)",
  30. total: true,
  31. color: "ffff00"
  32. },
  33. ip_stats_octets__ip6tx: {
  34. title: "IPv6 Bytes (TX)",
  35. flip : true,
  36. total: true,
  37. color: "ff00ff"
  38. }
  39. }
  40. }
  41. };
  42. return [ traffic ]
  43. }
  44. });