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 <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2022-09-20 08:11:44 +02:00
parent e019fc5d60
commit 45ab2cd6be

View file

@ -1,5 +1,6 @@
'use strict'; 'use strict';
'require baseclass'; 'require baseclass';
'require network';
'require rpc'; 'require rpc';
var callDSLMetrics = rpc.declare({ var callDSLMetrics = rpc.declare({
@ -44,7 +45,7 @@ return baseclass.extend({
title: _('DSL'), title: _('DSL'),
load: function() { load: function() {
if (!L.hasSystemFeature('dsl')) if (!network.getDSLModemType())
return Promise.reject(); return Promise.reject();
return L.resolveDefault(callDSLMetrics(), {}); return L.resolveDefault(callDSLMetrics(), {});