From 61bc034b8df9b5a54bc406bf35fbfd920b6e6804 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 10 Jun 2017 20:26:10 +0200 Subject: [PATCH] luci-app-statistics: support graph menu entries without corresponding labels Properly render menu items for plugin instances that do not have a corresponding label defined. This allows for registering new graph pages solely by dropping files into /usr/lib/lua/luci/statistics/rrdtool/definitions/ Signed-off-by: Jo-Philipp Wich --- .../luasrc/controller/luci_statistics/luci_statistics.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua index 1bc0714de8..443f20b0f4 100644 --- a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -88,7 +88,7 @@ function index() _entry( { "admin", "statistics", "collectd", section, plugin }, cbi("luci_statistics/" .. plugin ), - labels[plugin], j * 10 + labels[plugin] or plugin, j * 10 ) end -- 2.30.2