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 <jow@openwrt.org>
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