From 01f84fcce1ff3f27b948fa8e248d7f72c7d7d9a6 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 21 Nov 2020 19:51:58 +0100 Subject: [PATCH] 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 --- www/window/DataStoreEdit.js | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js index 335b0e84..c2b2809f 100644 --- a/www/window/DataStoreEdit.js +++ b/www/window/DataStoreEdit.js @@ -14,66 +14,54 @@ Ext.define('PBS.panel.PruneInputPanel', { column1: [ { - xtype: 'proxmoxintegerfield', - fieldLabel: gettext('Keep Last'), + xtype: 'pbsPruneKeepInput', name: 'keep-last', + fieldLabel: gettext('keep-last'), cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, { - xtype: 'proxmoxintegerfield', - fieldLabel: gettext('Keep Daily'), + xtype: 'pbsPruneKeepInput', name: 'keep-daily', + fieldLabel: gettext('Keep Daily'), cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, { - xtype: 'proxmoxintegerfield', - fieldLabel: gettext('Keep Monthly'), + xtype: 'pbsPruneKeepInput', name: 'keep-monthly', + fieldLabel: gettext('Keep Monthly'), cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, ], column2: [ { - xtype: 'proxmoxintegerfield', + xtype: 'pbsPruneKeepInput', fieldLabel: gettext('Keep Hourly'), name: 'keep-hourly', cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, { - xtype: 'proxmoxintegerfield', - fieldLabel: gettext('Keep Weekly'), + xtype: 'pbsPruneKeepInput', name: 'keep-weekly', + fieldLabel: gettext('Keep Weekly'), cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, { - xtype: 'proxmoxintegerfield', - fieldLabel: gettext('Keep Yearly'), + xtype: 'pbsPruneKeepInput', name: 'keep-yearly', + fieldLabel: gettext('Keep Yearly'), cbind: { deleteEmpty: '{!isCreate}', }, - minValue: 1, - allowBlank: true, }, ],