luci-app-statistics: only render index view for more than one instance
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 3 Oct 2015 09:40:09 +0000 (11:40 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 3 Oct 2015 09:41:41 +0000 (11:41 +0200)
commitf21eb789e196ad565b106b4ec8091790e8e2737f
tree386e28b24347e135b308f29224c8fe97ee21f26e
parentaf9f09310446b226d25622d6fc63787e49d80e78
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 <jow@openwrt.org>
applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua