diff options
author | Florian Eckert <fe@dev.tdt.de> | 2019-03-07 14:50:17 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2019-03-07 15:16:55 +0100 |
commit | cd1e8cc6b94ef9aed2199d69f54c94d0c0919605 (patch) | |
tree | 0d2c4a6808ce09e51489153f865e39c0b7defa00 /applications | |
parent | 82c2a97314e5a569042056233475d1f97c1278ad (diff) |
luci-app-statistics: add new item callback for menu entry
Add the item callback function to the rrdtool definitions.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'applications')
27 files changed, 108 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua index 37055f5861..637b5f9592 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.apcups",package.seeall) +function item() + return luci.i18n.translate("APC UPS") +end + function rrdargs( graph, plugin, plugin_instance ) local lu = require("luci.util") diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua index 5212b736e2..d99dab0f01 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.conntrack",package.seeall) +function item() + return luci.i18n.translate("Conntrack") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua index 6826e12adb..f9473e4406 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua @@ -2,6 +2,10 @@ module("luci.statistics.rrdtool.definitions.contextswitch",package.seeall) +function item() + return luci.i18n.translate("Context Switches") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua index ae0c0ce778..226c84ee96 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.cpu",package.seeall) +function item() + return luci.i18n.translate("Processor") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua index 25a72d2285..08aab04b85 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua @@ -2,6 +2,10 @@ module("luci.statistics.rrdtool.definitions.cpufreq",package.seeall) +function item() + return luci.i18n.translate("CPU Frequency") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua index 2bbdfb08fb..4fde243ca9 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.curl", package.seeall) +function item() + return luci.i18n.translate("cUrl") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua index 7a69e85ee5..fb732991ba 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.df", package.seeall) +function item() + return luci.i18n.translate("Disk Space Usage") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) local df_complex = { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua index b6f7d6d5f8..29597ff989 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.disk", package.seeall) +function item() + return luci.i18n.translate("Disk Usage") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua index cf96d8fbe1..0ff4c76858 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.dns", package.seeall) +function item() + return luci.i18n.translate("DNS") +end + function rrdargs( graph, plugin, plugin_instance ) local traffic = { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua index 3d30a70afb..01eb33f9b4 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.entropy", package.seeall) +function item() + return luci.i18n.translate("Entropy") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua index 6ca65e539f..a4d4eefd53 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.interface", package.seeall) +function item() + return luci.i18n.translate("Interfaces") +end + function rrdargs( graph, plugin, plugin_instance ) -- diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua index 9790e0e3d2..7218bfd441 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.iptables", package.seeall) +function item() + return luci.i18n.translate("Firewall") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua index f61d0da646..56b4547b94 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.irq", package.seeall) +function item() + return luci.i18n.translate("Interrupts") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua index 194afd6fc0..53f4c7a40c 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.iwinfo", package.seeall) +function item() + return luci.i18n.translate("Wireless") +end + function rrdargs( graph, plugin, plugin_instance ) -- diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua index ce762dab46..b06c8c4148 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.load", package.seeall) +function item() + return luci.i18n.translate("System Load") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua index 53d559c599..b05d31dc02 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua @@ -11,6 +11,10 @@ You may obtain a copy of the License at module("luci.statistics.rrdtool.definitions.memory",package.seeall) +function item() + return luci.i18n.translate("Memory") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua index f485048538..bdd3f2eb44 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.netlink", package.seeall) +function item() + return luci.i18n.translate("Netlink") +end + function rrdargs( graph, plugin, plugin_instance ) -- diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua index dd93196902..84ca4951f9 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua @@ -2,6 +2,10 @@ module("luci.statistics.rrdtool.definitions.nut",package.seeall) +function item() + return luci.i18n.translate("UPS") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) local voltages = { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua index 481557bb7f..52bfbdf4f7 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.olsrd", package.seeall) +function item() + return luci.i18n.translate("OLSRd") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) local g = { } diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua index 876e871d1d..d16dbac908 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.openvpn", package.seeall) +function item() + return luci.i18n.translate("OpenVPN") +end + function rrdargs( graph, plugin, plugin_instance ) local inst = plugin_instance:gsub("^openvpn%.(.+)%.status$", "%1") diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua index 5b575bfff2..c3645e408c 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.ping", package.seeall) +function item() + return luci.i18n.translate("Ping") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua index 010ac1cd2e..4303824f34 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.processes", package.seeall) +function item() + return luci.i18n.translate("Processes") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) if plugin_instance == "" then diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua index b3119234a4..6e09a7b9f0 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.sensors", package.seeall) +function item() + return luci.i18n.translate("Sensors") +end + function rrdargs( graph, plugin, plugin_instance ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua index 1a192ae6a6..5af998cfb5 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.splash_leases", package.seeall) +function item() + return luci.i18n.translate("Splash Leases") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua index 7e7ed238f4..2d762f7a4c 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua @@ -3,6 +3,10 @@ module("luci.statistics.rrdtool.definitions.tcpconns", package.seeall) +function item() + return luci.i18n.translate("TCP Connections") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua index 532246465e..4a555a6054 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua @@ -2,6 +2,10 @@ module("luci.statistics.rrdtool.definitions.thermal",package.seeall) +function item() + return luci.i18n.translate("Thermal") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua index a50e78491f..8d7d42bc6b 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua @@ -11,6 +11,10 @@ You may obtain a copy of the License at module("luci.statistics.rrdtool.definitions.uptime", package.seeall) +function item() + return luci.i18n.translate("Uptime") +end + function rrdargs( graph, plugin, plugin_instance, dtype ) return { |