1 -- Licensed to the public under the Apache License 2.0.
3 module("luci.statistics.rrdtool.definitions.nut",package.seeall)
5 function rrdargs( graph, plugin, plugin_instance, dtype )
8 title = "%H: Voltages on UPS \"%pi\"",
10 number_format = "%5.1lfV",
13 voltage = { "battery", "input", "output" }
17 voltage_output = { color = "00e000", title = "Output voltage", noarea=true, overlay=true },
18 voltage_battery = { color = "0000ff", title = "Battery voltage", noarea=true, overlay=true },
19 voltage_input = { color = "ffb000", title = "Input voltage", noarea=true, overlay=true }
25 title = "%H: Current on UPS \"%pi\"",
27 number_format = "%5.3lfA",
30 current = { "battery", "output" }
34 current_output = { color = "00e000", title = "Output current", noarea=true, overlay=true },
35 current_battery = { color = "0000ff", title = "Battery current", noarea=true, overlay=true },
41 title = "%H: Battery charge on UPS \"%pi\"",
45 number_format = "%5.1lf%%",
51 percent_charge = { color = "00ff00", title = "Charge level" }
56 -- Note: This is in ISO8859-1 for rrdtool. Welcome to the 20th century.
58 title = "%H: Battery temperature on UPS \"%pi\"",
60 number_format = "%5.1lf\176C",
63 temperature = "battery"
67 temperature_battery = { color = "ffb000", title = "Battery temperature" }
73 title = "%H: Time left on UPS \"%pi\"",
75 number_format = "%.1lfm",
78 timeleft = { "battery" }
81 timeleft_battery = { color = "0000ff", title = "Time left", transform_rpn = "60,/" }
86 return { voltages, currents, percentage, temperature, timeleft }