]>
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}',
60 onGetValues: function(values
) {
62 var mounts
= me
.mounts
;
63 me
.fstypes
.forEach(function(fs
) {
71 values
.mount
= mounts
.join(';');
74 var featuresstring
= PVE
.Parser
.printPropertyString(values
, undefined);
75 if (featuresstring
== '') {
76 return { 'delete': 'features' };
78 return { features
: featuresstring
};
81 setValues: function(values
) {
84 me
.viewModel
.set({ unprivileged
: values
.unprivileged
});
86 if (values
.features
) {
87 var res
= PVE
.Parser
.parsePropertyString(values
.features
);
90 res
.mount
.split(/[; ]/).forEach(function(item
) {
91 if (me
.fstypes
.indexOf(item
) === -1) {
98 this.callParent([res
]);
103 Ext
.define('PVE.lxc.FeaturesEdit', {
104 extend
: 'Proxmox.window.Edit',
105 xtype
: 'pveLxcFeaturesEdit',
107 subject
: gettext('Features'),
110 xtype
: 'pveLxcFeaturesInputPanel'
113 initComponent : function() {