diff options
author | Florian Eckert <fe@dev.tdt.de> | 2023-10-10 07:57:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 07:57:59 +0200 |
commit | 88d1893b9c21ce716d9bec4c40f6c9720becf220 (patch) | |
tree | ab98eea83bf9f94760e670b582ce0e7ac95108d2 | |
parent | 936d62302af37571b9b8408b4bf9d7a19d063dac (diff) | |
parent | 07eaf49b2abe113e34becb18bc0f077d6073be1f (diff) |
Merge pull request #6626 from oskarirauta/luci-cni-protocol
luci-proto-cni: protocol update
-rw-r--r-- | protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js | 34 |
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; } + }); |