luci-base: network.js: register "none" protocol

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-14 17:03:23 +02:00
parent 4eeded7051
commit 7c9d1a259c

View file

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