luci-app-statistics: add new item callback for menu entry
[project/luci.git] / applications / luci-app-statistics / luasrc / statistics / rrdtool / definitions / sensors.lua
1 -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 module("luci.statistics.rrdtool.definitions.sensors", package.seeall)
5
6 function item()
7 return luci.i18n.translate("Sensors")
8 end
9
10 function rrdargs( graph, plugin, plugin_instance )
11
12 return {
13 {
14 per_instance = true,
15 title = "%H: %pi - %di",
16 vlabel = "\176C",
17 number_format = "%4.1lf\176C",
18 data = {
19 types = { "temperature" },
20 options = {
21 temperature__value = {
22 color = "ff0000",
23 title = "Temperature"
24 }
25 }
26 }
27 }
28 }
29 end