]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/lxc/FeaturesEdit.js
1 Ext
.define('PVE.lxc.FeaturesInputPanel', {
2 extend
: 'Proxmox.panel.InputPanel',
3 xtype
: 'pveLxcFeaturesInputPanel',
5 // used to save the mounts fstypes until sending
8 fstypes
: ['nfs', 'cifs'],
16 privilegedOnly: function(get) {
17 return (get('unprivileged') ? gettext('privileged only') : '');
19 unprivilegedOnly: function(get) {
20 return (!get('unprivileged') ? gettext('unprivileged only') : '');
27 xtype
: 'proxmoxcheckbox',
28 fieldLabel
: gettext('keyctl'),
31 disabled
: '{!unprivileged}',
32 boxLabel
: '{unprivilegedOnly}'
36 xtype
: 'proxmoxcheckbox',
37 fieldLabel
: gettext('Nesting'),
41 xtype
: 'proxmoxcheckbox',
45 disabled
: '{unprivileged}',
46 boxLabel
: '{privilegedOnly}'
50 xtype
: 'proxmoxcheckbox',
54 disabled
: '{unprivileged}',
55 boxLabel
: '{privilegedOnly}'
59 xtype
: 'proxmoxcheckbox',
64 xtype
: 'proxmoxcheckbox',
66 fieldLabel
: gettext('Create Device Nodes'),
67 boxLabel
: gettext('Experimental'),
71 onGetValues: function(values
) {
73 var mounts
= me
.mounts
;
74 me
.fstypes
.forEach(function(fs
) {
82 values
.mount
= mounts
.join(';');
85 var featuresstring
= PVE
.Parser
.printPropertyString(values
, undefined);
86 if (featuresstring
== '') {
87 return { 'delete': 'features' };
89 return { features
: featuresstring
};
92 setValues: function(values
) {
95 me
.viewModel
.set('unprivileged', values
.unprivileged
);
97 if (values
.features
) {
98 var res
= PVE
.Parser
.parsePropertyString(values
.features
);
101 res
.mount
.split(/[; ]/).forEach(function(item
) {
102 if (me
.fstypes
.indexOf(item
) === -1) {
103 me
.mounts
.push(item
);
109 this.callParent([res
]);
113 initComponent: function() {
115 me
.mounts
= []; // reset state
120 Ext
.define('PVE.lxc.FeaturesEdit', {
121 extend
: 'Proxmox.window.Edit',
122 xtype
: 'pveLxcFeaturesEdit',
124 subject
: gettext('Features'),
129 xtype
: 'pveLxcFeaturesInputPanel'