-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6626 from oskarirauta/luci-cni-protocol
luci-proto-cni: protocol update
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
protocols/luci-proto-cni/htdocs/luci-static/resources/protocol/cni.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
}); |