ui: datastore content: use our keep field for group pruning

sets some defaults and provides the clear trigger, so less code and
slightly nicer UX.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-21 19:51:58 +01:00
parent 08b3823025
commit 01f84fcce1
1 changed files with 11 additions and 23 deletions

View File

@ -14,66 +14,54 @@ Ext.define('PBS.panel.PruneInputPanel', {
column1: [ column1: [
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Last'),
name: 'keep-last', name: 'keep-last',
fieldLabel: gettext('keep-last'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Daily'),
name: 'keep-daily', name: 'keep-daily',
fieldLabel: gettext('Keep Daily'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Monthly'),
name: 'keep-monthly', name: 'keep-monthly',
fieldLabel: gettext('Keep Monthly'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
], ],
column2: [ column2: [
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Hourly'), fieldLabel: gettext('Keep Hourly'),
name: 'keep-hourly', name: 'keep-hourly',
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Weekly'),
name: 'keep-weekly', name: 'keep-weekly',
fieldLabel: gettext('Keep Weekly'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
{ {
xtype: 'proxmoxintegerfield', xtype: 'pbsPruneKeepInput',
fieldLabel: gettext('Keep Yearly'),
name: 'keep-yearly', name: 'keep-yearly',
fieldLabel: gettext('Keep Yearly'),
cbind: { cbind: {
deleteEmpty: '{!isCreate}', deleteEmpty: '{!isCreate}',
}, },
minValue: 1,
allowBlank: true,
}, },
], ],