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 b1afc9ac3b
commit b1d307d3f5

View file

@ -88,7 +88,7 @@ function index()
_entry( _entry(
{ "admin", "statistics", "collectd", section, plugin }, { "admin", "statistics", "collectd", section, plugin },
cbi("luci_statistics/" .. plugin ), cbi("luci_statistics/" .. plugin ),
labels[plugin], j * 10 labels[plugin] or plugin, j * 10
) )
end end