mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update luci-base and luci-mod-admin-full to latest upstream version
This commit is contained in:
parent
e00cf0f4f0
commit
6b6c7e6d7a
75 changed files with 3309 additions and 2564 deletions
|
@ -6,29 +6,18 @@
|
|||
{
|
||||
if (ifc && (ifc = ifc[0]))
|
||||
{
|
||||
var html = '';
|
||||
var s = document.getElementById('<%=self.option%>-ifc-status'),
|
||||
img = s.querySelector('img'),
|
||||
info = s.querySelector('span'),
|
||||
html = '<strong><%:Device%>:</strong> %h<br />'.format(ifc.ifname);
|
||||
|
||||
var s = document.getElementById('<%=self.option%>-ifc-signal');
|
||||
if (s)
|
||||
s.innerHTML = String.format(
|
||||
'<img src="<%=resource%>/icons/%s%s.png" style="width:16px; height:16px" />' +
|
||||
'<br /><small>%s</small>',
|
||||
ifc.type, ifc.is_up ? '' : '_disabled',
|
||||
ifc.name
|
||||
);
|
||||
|
||||
var d = document.getElementById('<%=self.option%>-ifc-description');
|
||||
if (d && ifc.ifname)
|
||||
if (ifc.ifname)
|
||||
{
|
||||
if (ifc.is_up)
|
||||
{
|
||||
html += String.format('<strong><%:Uptime%>:</strong> %t<br />', ifc.uptime);
|
||||
}
|
||||
|
||||
if (ifc.macaddr)
|
||||
{
|
||||
html += String.format('<strong><%:MAC-Address%>:</strong> %s<br />', ifc.macaddr);
|
||||
}
|
||||
|
||||
html += String.format(
|
||||
'<strong><%:RX%></strong>: %.2mB (%d <%:Pkts.%>)<br />' +
|
||||
|
@ -38,50 +27,40 @@
|
|||
);
|
||||
|
||||
if (ifc.ipaddrs && ifc.ipaddrs.length)
|
||||
{
|
||||
for (var i = 0; i < ifc.ipaddrs.length; i++)
|
||||
html += String.format(
|
||||
'<strong><%:IPv4%>:</strong> %s<br />',
|
||||
ifc.ipaddrs[i]
|
||||
);
|
||||
}
|
||||
|
||||
if (ifc.ip6addrs && ifc.ip6addrs.length)
|
||||
{
|
||||
for (var i = 0; i < ifc.ip6addrs.length; i++)
|
||||
html += String.format(
|
||||
'<strong><%:IPv6%>:</strong> %s<br />',
|
||||
ifc.ip6addrs[i]
|
||||
);
|
||||
}
|
||||
|
||||
if (ifc.ip6prefix)
|
||||
{
|
||||
html += String.format('<strong><%:IPv6-PD%>:</strong> %s<br />', ifc.ip6prefix);
|
||||
}
|
||||
|
||||
d.innerHTML = html;
|
||||
if (ifc.ip6prefix)
|
||||
html += String.format('<strong><%:IPv6-PD%>:</strong> %s<br />', ifc.ip6prefix);
|
||||
|
||||
info.innerHTML = html;
|
||||
}
|
||||
else if (d)
|
||||
else
|
||||
{
|
||||
d.innerHTML = '<em><%:Interface not present or not connected yet.%></em>';
|
||||
info.innerHTML = '<em><%:Interface not present or not connected yet.%></em>';
|
||||
}
|
||||
|
||||
img.src = '<%=resource%>/icons/%s%s.png'.format(ifc.type, ifc.is_up ? '' : '_disabled');
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
|
||||
<div class="table">
|
||||
<div class="tr cbi-section-table">
|
||||
<div class="td"></div>
|
||||
<div class="td cbi-value-field" style="min-width:16px; padding:3px; text-align:center" id="<%=self.option%>-ifc-signal">
|
||||
<img src="<%=resource%>/icons/ethernet_disabled.png" style="width:16px; height:16px" /><br />
|
||||
<small>?</small>
|
||||
</div>
|
||||
<div class="td cbi-value-field" style="vertical-align:middle; text-align:left; padding:3px" id="<%=self.option%>-ifc-description">
|
||||
<em><%:Collecting data...%></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="ifacebadge large" id="<%=self.option%>-ifc-status">
|
||||
<img src="<%=resource%>/icons/ethernet_disabled.png" />
|
||||
<span>
|
||||
<em><%:Collecting data...%></em>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<%+cbi/valuefooter%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue