luci-app-statistics: add new item callback for menu entry
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 7 Mar 2019 13:50:17 +0000 (14:50 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 7 Mar 2019 14:16:55 +0000 (15:16 +0100)
Add the item callback function to the rrdtool definitions.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
27 files changed:
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/contextswitch.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpu.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/cpufreq.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/df.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/dns.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/entropy.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iptables.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/irq.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/load.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/memory.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/openvpn.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/thermal.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua

index 37055f5861576f42f339e68843263bcf6c984fde..637b5f959230104fce2f22fee246f50af5b43579 100644 (file)
@@ -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")
index 5212b736e2f2d929b7ff365f72ff604e056ac1a1..d99dab0f014a9bc7b8c50797c3a7b3e842210077 100644 (file)
@@ -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 {
index 6826e12adb56a33304e52e8d870e4309ad489e14..f9473e44061b3824044b30e0a2a2f2583a55b972 100644 (file)
@@ -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 {
index ae0c0ce7782bcb2d2d6a81331b39696eec5ccb30..226c84ee962171f66ae833cf12074142eceac483 100644 (file)
@@ -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 {
index 25a72d22855182cc69bf1ce8f32fc9188f910958..08aab04b8549fbbd0a68c758533d5fdb111e00b3 100644 (file)
@@ -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 {
index 2bbdfb08fb662ec313d17c69c6412667c3a005db..4fde243ca9d48d08655fffc1f01f8576366db493 100644 (file)
@@ -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 {
index 7a69e85ee585c4df4f4ade28e754bd2e7c28d25b..fb732991baafbf6bd7b812aa9bd35e15d672ac32 100644 (file)
@@ -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 = {
index b6f7d6d5f8185fbdbfd32a2413273dd9861e2abe..29597ff989c1b95770d48ac3fe9e6cff59a260da 100644 (file)
@@ -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 {
index cf96d8fbe192b36273c71f45abbcb07723e1f8af..0ff4c76858e09f24bccbe0755a0c5034bccf0978 100644 (file)
@@ -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 = {
index 3d30a70afbd6740a0cde50cac495626c949e6926..01eb33f9b43af8acc74fd8998ae2a424bb338fbc 100644 (file)
@@ -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 {
index 6ca65e539f0aa7f9faa272610135c66b9c1f9ece..a4d4eefd53cf95959cc98a65ffc6eebdf97fd387 100644 (file)
@@ -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 )
 
        --
index 9790e0e3d27f2fd14aade7697f12efe9b8b86991..7218bfd4418599b368d971c52f2faaa4a9f73ae1 100644 (file)
@@ -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 {
index f61d0da6464a52f3fe8023a954345d0af78e35be..56b4547b949f3cadfaa4e04249e78a6a473c8319 100644 (file)
@@ -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 {
index 194afd6fc0f9c4e9f2500667f1bfdc0b332be4c3..53f4c7a40c1dfb44b75e9c8fdca938f60fba43dd 100644 (file)
@@ -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 )
 
        --
index ce762dab468665abf22815cd57dfa5a8c5277079..b06c8c41486b1b96dd37f1a8100b514d5b79bd86 100644 (file)
@@ -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 {
index 53d559c599fc74b6943cb388fa3c46f8d3877f4f..b05d31dc02281d52e99e6a9acdb0366e21285263 100644 (file)
@@ -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 {
index f485048538a2daaef14aef4da38874a6c130bc9b..bdd3f2eb443d4d7827216a637c25134e6559047a 100644 (file)
@@ -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 )
 
        --
index dd931969027c058ae08d2acea05774f36c569fdb..84ca4951f959ec7aa50323b6ad5b062e417d043b 100644 (file)
@@ -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 = {
index 481557bb7fbf5fefa5245a9c47f567c6c8e281ce..52bfbdf4f76c063e73373b7cc4cae0b7a59a5950 100644 (file)
@@ -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 = { }
 
index 876e871d1d51a22bfe3af5fbeae4f606bab2b3b9..d16dbac9083102a9d1637675413093c5b089aff3 100644 (file)
@@ -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")
 
index 5b575bfff268c394537c811213c0cee3d3e08d86..c3645e408cde2a7b9834befbeb7f6dba3fa75267 100644 (file)
@@ -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 {
index 010ac1cd2ed324f150c361624d724fb2ad5763c9..4303824f34153fb04386e7347f70d39304f9766b 100644 (file)
@@ -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
index b3119234a42467b229e1215c3367ee275610bb20..6e09a7b9f097054449711c638f6a7991f81a91b7 100644 (file)
@@ -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 {
index 1a192ae6a6070964ac57783b870f5ceeeee83129..5af998cfb59f0b4fd8010c12c0117bbd1c429ae7 100644 (file)
@@ -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 {
index 7e7ed238f4cd69edeeaca1005874eed40723f9ff..2d762f7a4cfb37d34cbb191121b309a2e2075e75 100644 (file)
@@ -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 {
index 532246465e0305d6c568b150159e2394ddb61465..4a555a60546ee5e3dae4d6652d6ba380c148efee 100644 (file)
@@ -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 {
index a50e78491fa3ac60ab170a5b85782a4d09db6416..8d7d42bc6bbf178dee27fc270989382d1ddc8a93 100644 (file)
@@ -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 {