mirror of
https://github.com/openwrt/luci.git
synced 2025-12-22 01:44:35 +04:00
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>
This commit is contained in:
@@ -1,8 +1,42 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
'require form';
|
||||||
'require network';
|
'require network';
|
||||||
|
|
||||||
return network.registerProtocol('cni', {
|
return network.registerProtocol('cni', {
|
||||||
getI18n: function () {
|
getI18n: function () {
|
||||||
return _('CNI (Externally managed interface)');
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user