diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-10-13 22:40:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-10-13 22:40:24 +0000 |
commit | a5b578d075d148ba572d7fbfb012792d58e5ff7f (patch) | |
tree | ef2a919ef0a6bddb0c4e929d2b968188d864da82 | |
parent | 0e53a6450c9f490150f386a45348b7c6c393d942 (diff) | |
download | luci2-ui-a5b578d075d148ba572d7fbfb012792d58e5ff7f.tar.gz |
luci2: fix interface type detection in LuCI2.ui.devicebadge()
-rw-r--r-- | luci2/htdocs/luci2/luci2.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index df127e1..84ebf84 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -2700,7 +2700,9 @@ function LuCI2() this.ui.devicebadge = AbstractWidget.extend({ render: function() { - var dev = this.options.l3_device || this.options.device || '?'; + var l2dev = this.options.l2_device || this.options.device; + var l3dev = this.options.l3_device; + var dev = l3dev || l2dev || '?'; var span = document.createElement('span'); span.className = 'ifacebadge'; @@ -2741,7 +2743,7 @@ function LuCI2() var type = 'ethernet'; var desc = _luci2.tr('Ethernet device'); - if (this.options.l3_device != this.options.device) + if (l3dev != l2dev) { type = 'tunnel'; desc = _luci2.tr('Tunnel interface'); |