luci-mod-network: display the mesh ID in wireless overview if applicable

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-30 12:40:12 +02:00
parent 948ca3712f
commit 17800040f2

View file

@ -89,6 +89,7 @@ function render_network_status(radioNet) {
channel = radioNet.getChannel(), channel = radioNet.getChannel(),
disabled = (radioNet.get('disabled') == '1' || uci.get('wireless', radioNet.getWifiDeviceName(), 'disabled') == '1'), disabled = (radioNet.get('disabled') == '1' || uci.get('wireless', radioNet.getWifiDeviceName(), 'disabled') == '1'),
is_assoc = (bssid && bssid != '00:00:00:00:00:00' && channel && mode != 'Unknown' && !disabled), is_assoc = (bssid && bssid != '00:00:00:00:00:00' && channel && mode != 'Unknown' && !disabled),
is_mesh = (radioNet.getMode() == 'mesh'),
changecount = count_changes(radioNet.getName()), changecount = count_changes(radioNet.getName()),
status_text = null; status_text = null;
@ -101,7 +102,7 @@ function render_network_status(radioNet) {
status_text = E('em', disabled ? _('Wireless is disabled') : _('Wireless is not associated')); status_text = E('em', disabled ? _('Wireless is disabled') : _('Wireless is not associated'));
return L.itemlist(E('div'), [ return L.itemlist(E('div'), [
_('SSID'), radioNet.getSSID() || '?', is_mesh ? _('Mesh ID') : _('SSID'), (is_mesh ? radioNet.getMeshID() : radioNet.getSSID()) || '?',
_('Mode'), mode, _('Mode'), mode,
_('BSSID'), (!changecount && is_assoc) ? bssid : null, _('BSSID'), (!changecount && is_assoc) ? bssid : null,
_('Encryption'), (!changecount && is_assoc) ? radioNet.getActiveEncryption() || _('None') : null, _('Encryption'), (!changecount && is_assoc) ? radioNet.getActiveEncryption() || _('None') : null,