]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/lxc/FeaturesEdit.js
1 /*jslint confusion: true*/
2 Ext
.define('PVE.lxc.FeaturesInputPanel', {
3 extend
: 'Proxmox.panel.InputPanel',
4 xtype
: 'pveLxcFeaturesInputPanel',
6 // used to save the mounts fstypes until sending
9 fstypes
: ['nfs', 'cifs'],
17 privilegedOnly: function(get) {
18 return (get('unprivileged') ? gettext('privileged only') : '');
20 unprivilegedOnly: function(get) {
21 return (!get('unprivileged') ? gettext('unprivileged only') : '');
28 xtype
: 'proxmoxcheckbox',
29 fieldLabel
: gettext('keyctl'),
32 disabled
: '{!unprivileged}',
33 boxLabel
: '{unprivilegedOnly}'
37 xtype
: 'proxmoxcheckbox',
38 fieldLabel
: gettext('Nesting'),
42 xtype
: 'proxmoxcheckbox',
46 disabled
: '{unprivileged}',
47 boxLabel
: '{privilegedOnly}'
51 xtype
: 'proxmoxcheckbox',
55 disabled
: '{unprivileged}',
56 boxLabel
: '{privilegedOnly}'
60 xtype
: 'proxmoxcheckbox',
65 xtype
: 'proxmoxcheckbox',
67 fieldLabel
: gettext('Create Device Nodes'),
68 boxLabel
: gettext('Experimental'),
72 onGetValues: function(values
) {
74 var mounts
= me
.mounts
;
75 me
.fstypes
.forEach(function(fs
) {
83 values
.mount
= mounts
.join(';');
86 var featuresstring
= PVE
.Parser
.printPropertyString(values
, undefined);
87 if (featuresstring
== '') {
88 return { 'delete': 'features' };
90 return { features
: featuresstring
};
93 setValues: function(values
) {
96 me
.viewModel
.set('unprivileged', values
.unprivileged
);
98 if (values
.features
) {
99 var res
= PVE
.Parser
.parsePropertyString(values
.features
);
102 res
.mount
.split(/[; ]/).forEach(function(item
) {
103 if (me
.fstypes
.indexOf(item
) === -1) {
104 me
.mounts
.push(item
);
110 this.callParent([res
]);
115 Ext
.define('PVE.lxc.FeaturesEdit', {
116 extend
: 'Proxmox.window.Edit',
117 xtype
: 'pveLxcFeaturesEdit',
119 subject
: gettext('Features'),
124 xtype
: 'pveLxcFeaturesInputPanel'