3f33951bb0
Change to agent now being a property_string, and including fstrim_cloned_disks. Co-Authored-By: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
45 lines
1023 B
JavaScript
45 lines
1023 B
JavaScript
Ext.define('PVE.form.AgentFeatureSelector', {
|
|
extend: 'Proxmox.panel.InputPanel',
|
|
alias: ['widget.pveAgentFeatureSelector'],
|
|
|
|
initComponent: function() {
|
|
var me = this;
|
|
me.items= [
|
|
{
|
|
xtype: 'proxmoxcheckbox',
|
|
boxLabel: gettext('Qemu Agent'),
|
|
name: 'enabled',
|
|
uncheckedValue: 0,
|
|
listeners: {
|
|
change: function(f, value, old) {
|
|
var gtcb = me.down('proxmoxcheckbox[name=fstrim_cloned_disks]');
|
|
if (value) {
|
|
gtcb.setDisabled(false);
|
|
} else {
|
|
gtcb.setDisabled(true);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
xtype: 'proxmoxcheckbox',
|
|
boxLabel: gettext('Run guest-trim after clone disk'),
|
|
name: 'fstrim_cloned_disks',
|
|
disabled: true
|
|
}
|
|
];
|
|
me.callParent();
|
|
},
|
|
|
|
onGetValues: function(values) {
|
|
var agentstr = PVE.Parser.printPropertyString(values, 'enabled');
|
|
return { agent: agentstr };
|
|
},
|
|
|
|
setValues: function(values) {
|
|
var agent = values.agent || '';
|
|
var res = PVE.Parser.parsePropertyString(agent, 'enabled');
|
|
this.callParent([res]);
|
|
}
|
|
});
|