luci-app-mwan3: remove css from javascript in overview_status_interface
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
5362f69706
commit
dcb041e396
1 changed files with 5 additions and 8 deletions
|
@ -15,30 +15,27 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_
|
||||||
for ( var iface in status.interfaces)
|
for ( var iface in status.interfaces)
|
||||||
{
|
{
|
||||||
var state = '';
|
var state = '';
|
||||||
var css = '';
|
|
||||||
switch (status.interfaces[iface].status)
|
switch (status.interfaces[iface].status)
|
||||||
{
|
{
|
||||||
case 'online':
|
case 'online':
|
||||||
state = '<%:Online (tracking active)%>';
|
state = '<%:Online (tracking active)%>';
|
||||||
css = 'wanon';
|
|
||||||
break;
|
break;
|
||||||
case 'notMonitored':
|
case 'notMonitored':
|
||||||
state = '<%:Online (tracking off)%>';
|
state = '<%:Online (tracking off)%>';
|
||||||
css = 'wanon';
|
|
||||||
break;
|
break;
|
||||||
case 'offline':
|
case 'offline':
|
||||||
state = '<%:Offline%>';
|
state = '<%:Offline%>';
|
||||||
css = 'wanoff';
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
state = '<%:Disabled%>';
|
state = '<%:Disabled%>';
|
||||||
css = 'wanoff';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
statusview += String.format(
|
statusview += String.format(
|
||||||
'<span class="%s"><strong>%s</strong><br />%s</span>',
|
'<div><strong>Interface: </strong>%s</div>',
|
||||||
css,
|
iface
|
||||||
iface,
|
);
|
||||||
|
statusview += String.format(
|
||||||
|
'<div><strong>Status: </strong>%s</div></br></br>',
|
||||||
state
|
state
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue