luci-base: network.js: register "none" protocol
authorJo-Philipp Wich <jo@mein.io>
Sat, 14 Sep 2019 15:03:23 +0000 (17:03 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sat, 14 Sep 2019 15:04:02 +0000 (17:04 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/network.js

index 106139f267e4210614b92c113f04c040687b0a2b..525b7c9f199f00bd0470120cd376c5efef60e695 100644 (file)
@@ -175,6 +175,10 @@ function getProtocolHandlers(cache) {
                if (!L.isObject(protos))
                        throw !1;
 
+               /* Register "none" protocol */
+               if (!protos.hasOwnProperty('none'))
+                       Object.assign(protos, { none: { no_device: false } });
+
                /* Hack: emulate relayd protocol */
                if (!protos.hasOwnProperty('relay'))
                        Object.assign(protos, { relay: { no_device: true } });