luci-app-statistics: improve diagram generation, add missing title

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
pull/505/head
Jo-Philipp Wich 2015-10-03 15:30:59 +02:00
parent 96b031bbad
commit c10a7380bf
1 changed files with 23 additions and 9 deletions

View File

@ -22,11 +22,13 @@ function rrdargs( graph, plugin, plugin_instance )
-- special options for single data lines -- special options for single data lines
options = { options = {
if_octets__tx = { if_octets__tx = {
title = "Bytes (TX)",
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
color = "00ff00" -- tx is green color = "00ff00" -- tx is green
}, },
if_octets__rx = { if_octets__rx = {
title = "Bytes (RX)",
flip = true, -- flip rx line flip = true, -- flip rx line
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
color = "0000ff" -- rx is blue color = "0000ff" -- rx is blue
@ -59,6 +61,7 @@ function rrdargs( graph, plugin, plugin_instance )
options = { options = {
-- processed packets (tx DS) -- processed packets (tx DS)
if_packets__tx = { if_packets__tx = {
title = "Total (TX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
color = "00ff00" -- processed tx is green color = "00ff00" -- processed tx is green
@ -66,6 +69,7 @@ function rrdargs( graph, plugin, plugin_instance )
-- processed packets (rx DS) -- processed packets (rx DS)
if_packets__rx = { if_packets__rx = {
title = "Total (RX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
flip = true, -- flip rx line flip = true, -- flip rx line
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
@ -74,6 +78,7 @@ function rrdargs( graph, plugin, plugin_instance )
-- dropped packets (tx DS) -- dropped packets (tx DS)
if_dropped__tx = { if_dropped__tx = {
title = "Dropped (TX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
color = "660055" -- dropped tx is ... dunno ;) color = "660055" -- dropped tx is ... dunno ;)
@ -81,14 +86,16 @@ function rrdargs( graph, plugin, plugin_instance )
-- dropped packets (rx DS) -- dropped packets (rx DS)
if_dropped__rx = { if_dropped__rx = {
title = "Dropped (RX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
flip = true, -- flip rx line flip = true, -- flip rx line
total = true, -- report total amount of bytes total = true, -- report total amount of bytes
color = "440066" -- dropped rx is violett color = "ff00ff" -- dropped rx is violett
}, },
-- packet errors (tx DS) -- packet errors (tx DS)
if_errors__tx = { if_errors__tx = {
title = "Errors (TX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
total = true, -- report total amount of packets total = true, -- report total amount of packets
color = "ff5500" -- tx errors are orange color = "ff5500" -- tx errors are orange
@ -96,6 +103,7 @@ function rrdargs( graph, plugin, plugin_instance )
-- packet errors (rx DS) -- packet errors (rx DS)
if_errors__rx = { if_errors__rx = {
title = "Errors (RX)",
overlay = true, -- don't summarize overlay = true, -- don't summarize
flip = true, -- flip rx line flip = true, -- flip rx line
total = true, -- report total amount of packets total = true, -- report total amount of packets
@ -122,6 +130,7 @@ function rrdargs( graph, plugin, plugin_instance )
options = { options = {
-- multicast packets -- multicast packets
if_multicast = { if_multicast = {
title = "Packets",
total = true, -- report total amount of packets total = true, -- report total amount of packets
color = "0000ff" -- multicast is blue color = "0000ff" -- multicast is blue
} }
@ -146,6 +155,7 @@ function rrdargs( graph, plugin, plugin_instance )
options = { options = {
-- collision rate -- collision rate
if_collisions = { if_collisions = {
title = "Collisions",
total = true, -- report total amount of packets total = true, -- report total amount of packets
color = "ff0000" -- collsions are red color = "ff0000" -- collsions are red
} }
@ -173,15 +183,19 @@ function rrdargs( graph, plugin, plugin_instance )
}, },
-- special options for single data lines -- special options for single data lines
options = { -- XXX: fixme (define colors...) options = {
if_tx_errors = { if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" },
total = true if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" },
}, if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" },
if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" },
if_rx_errors = { if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" },
flip = true, if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" },
total = true if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" },
} if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" },
if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" },
if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" }
} }
} }
} }