summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-cni
diff options
context:
space:
mode:
authorOskari Rauta <oskari.rauta@gmail.com>2023-10-08 17:58:48 +0300
committerOskari Rauta <oskari.rauta@gmail.com>2023-10-08 18:01:30 +0300
commit07eaf49b2abe113e34becb18bc0f077d6073be1f (patch)
treeab9528057ff4400c0d30be9738a386ebb34fbf6f /protocols/luci-proto-cni
parentd0dee6f205bf8a2dad48f76757830c64f443e915 (diff)
luci-proto-cni: protocol update
Updated luci support for updated netifd cni protocol 20231008: openwrt/packages#22341 maintainer: me build/test platform: x86_64, latest git Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
Diffstat (limited to 'protocols/luci-proto-cni')
-rw-r--r--protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js b/protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js
index 7e22398485..273067fd43 100644
--- a/protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js
+++ b/protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js
@@ -1,8 +1,42 @@
'use strict';
+'require form';
'require network';
return network.registerProtocol('cni', {
getI18n: function () {
return _('CNI (Externally managed interface)');
+ },
+
+ getOpkgPackage: function() {
+ return "cni-protocol";
+ },
+
+ isFloating: function() {
+ return true;
+ },
+
+ isVirtual: function() {
+ return true;
+ },
+
+ getDevices: function() {
+ return null;
+ },
+
+ renderFormOptions: function(s) {
+ var o;
+
+ o = s.taboption('general', form.Value, '_device', _('Device'));
+ o.ucioption = 'device';
+ o.optional = false;
+ o.rmempty = false;
+
+ o = s.taboption('general', form.Value, '_delay', _('Delay'), _('Afer making changes to network using CNI protocol, network must be manually restarted.'));
+ o.ucioption = 'delay';
+ o.placeholder = '10';
+ o.datatype = 'min(1)';
+ o.optional = true;
+ o.rmempty = true;
}
+
});