From: James Haggerty Date: Thu, 24 Oct 2024 01:17:21 +0000 (+1100) Subject: luci-app-statistics: render all graphs on refresh if no summary X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=4d75286519015f19e3878008b21fb7342ca5fae3;p=openwrt-luci.git luci-app-statistics: render all graphs on refresh if no summary Previously, if there would usually be a summary page for the data but this was not happening because there was only a single instance (e.g. a single wifi interface), the refresh would mistakenly request the summary rather than the existing data. i.e. graphs would mysteriously disappear on refresh. Signed-off-by: James Haggerty --- diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js index 4ac81ff826..479dcbcbbc 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js @@ -74,7 +74,7 @@ return view.extend({ 'data-tab-title': multiple ? title : null, 'data-plugin': plugin, 'data-plugin-instance': plugin_instance, - 'data-is-index': i ? null : true, + 'data-is-index': i || render_instances.length == 1 ? null : true, 'cbi-tab-active': function(ev) { activeInstance = ev.target.getAttribute('data-plugin-instance') } }, blobs.map(function(blob) { return E('img', {