summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-external/htdocs/luci-static/resources/protocol/external.js
blob: 06bd5f3f6699964933fee7179cb8b0ddb8637712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
'require form';
'require network';

return network.registerProtocol('external', {
	getI18n: function () {
		return _('Externally managed interface');
	},

	getOpkgPackage: function() {
		return "external-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 external protocol, network must be manually restarted.'));
		o.ucioption = 'delay';
		o.placeholder = '10';
		o.datatype = 'min(1)';
		o.optional = true;
		o.rmempty = true;

		o = s.taboption('general', form.Value, '_searchdomain', _('Search domain'));
		o.ucioption = 'searchdomain'
		o.optional = true;
		o.rmempty = true;
	}

});