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:
parent
e019fc5d60
commit
45ab2cd6be
1 changed files with 2 additions and 1 deletions
|
@ -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(), {});
|
||||||
|
|
Loading…
Reference in a new issue