1 /* Licensed to the public under the Apache License 2.0. */
5 return L.Class.extend({
6 title: _('Interfaces'),
8 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
14 /* draw this diagram for each plugin instance */
16 title: "%H: Transfer on %pi",
19 /* diagram data description */
21 /* defined sources for data types, if omitted assume a single DS named "value" (optional) */
23 if_octets: [ "tx", "rx" ]
26 /* special options for single data lines */
29 total: true, /* report total amount of bytes */
30 color: "00ff00", /* tx is green */
35 flip : true, /* flip rx line */
36 total: true, /* report total amount of bytes */
37 color: "0000ff", /* rx is blue */
49 /* draw this diagram for each plugin instance */
51 title: "%H: Packets on %pi",
54 /* diagram data description */
57 types: [ "if_packets", "if_errors" ],
59 /* defined sources for data types */
61 if_packets: [ "tx", "rx" ],
62 if_errors : [ "tx", "rx" ]
65 /* special options for single data lines */
67 /* processed packets (tx DS) */
70 overlay: true, /* don't summarize */
71 total : true, /* report total amount of bytes */
72 color : "00ff00", /* processed tx is green */
73 title : "Processed (TX)"
76 /* processed packets (rx DS) */
79 overlay: true, /* don't summarize */
80 flip : true, /* flip rx line */
81 total : true, /* report total amount of bytes */
82 color : "0000ff", /* processed rx is blue */
83 title : "Processed (RX)"
86 /* packet errors (tx DS) */
89 overlay: true, /* don't summarize */
90 total : true, /* report total amount of packets */
91 color : "ff5500", /* tx errors are orange */
95 /* packet errors (rx DS) */
98 overlay: true, /* don't summarize */
99 flip : true, /* flip rx line */
100 total : true, /* report total amount of packets */
101 color : "ff0000", /* rx errors are red */
102 title : "Errors (RX)"
108 return [ traffic, packets ];