From f21eb789e196ad565b106b4ec8091790e8e2737f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 3 Oct 2015 11:40:09 +0200 Subject: [PATCH] luci-app-statistics: only render index view for more than one instance If a plugin produces only one instance, e.g. netlink with just one interface configured, then the controller will register no detail views which would normally show all graphs but the index pacage of a given plugin will still display the collapsed view without any possibility to reach the full listing. Fix the problem by only rendering a linked index view when more than one instance is present. 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 49eab5acd4..f0120083a5 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 @@ -170,7 +170,7 @@ function statistics_render() if #instances == 0 then --instances = { graph.tree:plugin_instances( plugin )[1] } instances = graph.tree:plugin_instances( plugin ) - is_index = true + is_index = (#instances > 1) -- index instance requested elseif instances[1] == "-" then -- 2.30.2