1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/luci-app-macvlan/htdocs/luci-static/resources/view/network/macvlan.js
2020-03-11 19:55:16 +01:00

35 lines
672 B
JavaScript

'use strict';
'require rpc';
'require form';
'require tools.widgets as widgets';
return L.view.extend({
callHostHints: rpc.declare({
object: 'luci-rpc',
method: 'getHostHints',
expect: { '': {} }
}),
load: function() {
return this.callHostHints();
},
render: function(hosts) {
var m, s, o;
m = new form.Map('macvlan', _('Macvlan'));
s = m.section(form.GridSection, 'macvlan', _('Interfaces'));
s.addremove = true;
s.anonymous = true;
o = s.option(form.Value, 'name', _('Name'));
o.datatype = 'uciname';
o.rmempty = false;
o = s.option(widgets.DeviceSelect, 'ifname', _('Interface'));
o.rmempty = false;
return m.render();
}
});