0
0
mirror of https://github.com/openwrt/luci.git synced 2025-02-06 20:29:53 +00:00
Paul Donald 8d13ea410d luci-base, luci-proto-*: rename getOpkgPackage -> getPackageName
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-12-15 20:13:56 +01:00

49 lines
929 B
JavaScript

'use strict';
'require form';
'require network';
'require tools.widgets as widgets';
return network.registerProtocol('unet', {
getI18n: function() {
return _('Unet');
},
getIfname: function() {
return this._ubus('l3_device') || this.sid;
},
getPackageName: function() {
return 'unetd';
},
isFloating: function() {
return true;
},
isVirtual: function() {
return true;
},
getDevices: function() {
return null;
},
containsDevice: function(ifname) {
return (network.getIfnameOf(ifname) == this.getIfname());
},
renderFormOptions: function(s) {
var o;
o = s.taboption('general', form.DummyValue, 'device', _('Name of the tunnel device'));
o.optional = false;
o = s.taboption('general', form.DummyValue, 'key', _('Local wireguard key'));
o.optional = false;
o = s.taboption('general', form.DummyValue, 'auth_key', _('Key used to sign network config'));
o.optional = false;
}
});