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 <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2017-06-10 20:26:10 +02:00
parent 7f6fc1681f
commit 61bc034b8d

View file

@ -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