luci-mod-status: use network.getDSLModemType()
authorAndre Heider <a.heider@gmail.com>
Tue, 20 Sep 2022 06:11:44 +0000 (08:11 +0200)
committerAndre Heider <a.heider@gmail.com>
Fri, 21 Oct 2022 07:08:13 +0000 (09:08 +0200)
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 <a.heider@gmail.com>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js

index ed47758f4fd0a7df91ccb2cd0727964bdc72e701..b6f24b1aabebfbd548bc8afab1b6950d811011da 100644 (file)
@@ -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(), {});