From 45ab2cd6be0cac32ec49364280bbfa2c43c17eda Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 20 Sep 2022 08:11:44 +0200 Subject: luci-mod-status: use network.getDSLModemType() This matches what luci-mod-network does for the DSL modem configuration. Since this is based on a common uci config, it may also prevent issues as fixed with 111c551c "luci-base: fix DSL feature detection" in the future. Signed-off-by: Andre Heider --- .../htdocs/luci-static/resources/view/status/include/50_dsl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/luci-mod-status/htdocs') diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js index ed47758f4f..b6f24b1aab 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js @@ -1,5 +1,6 @@ 'use strict'; 'require baseclass'; +'require network'; 'require rpc'; var callDSLMetrics = rpc.declare({ @@ -44,7 +45,7 @@ return baseclass.extend({ title: _('DSL'), load: function() { - if (!L.hasSystemFeature('dsl')) + if (!network.getDSLModemType()) return Promise.reject(); return L.resolveDefault(callDSLMetrics(), {}); -- cgit v1.2.3