panel: add PruneInputPanel

over from PBS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-21 20:02:28 +01:00
parent 9b4b2e745b
commit 04eb02d970
2 changed files with 68 additions and 0 deletions

View File

@ -43,6 +43,7 @@ JSSRC= \
panel/LogView.js \
panel/JournalView.js \
panel/PermissionView.js \
panel/PruneKeepPanel.js \
panel/RRDChart.js \
panel/GaugeWidget.js \
window/Edit.js \

View File

@ -0,0 +1,67 @@
Ext.define('Proxmox.panel.PruneInputPanel', {
extend: 'Proxmox.panel.InputPanel',
xtype: 'pmxPruneInputPanel',
mixins: ['Proxmox.Mixin.CBind'],
// set on use for now
//onlineHelp: 'maintenance_pruning',
cbindData: function() {
let me = this;
me.isCreate = !!me.isCreate;
return {};
},
column1: [
{
xtype: 'pmxPruneKeepInput',
name: 'keep-last',
fieldLabel: gettext('keep-last'),
cbind: {
deleteEmpty: '{!isCreate}',
},
},
{
xtype: 'pmxPruneKeepInput',
name: 'keep-daily',
fieldLabel: gettext('Keep Daily'),
cbind: {
deleteEmpty: '{!isCreate}',
},
},
{
xtype: 'pmxPruneKeepInput',
name: 'keep-monthly',
fieldLabel: gettext('Keep Monthly'),
cbind: {
deleteEmpty: '{!isCreate}',
},
},
],
column2: [
{
xtype: 'pmxPruneKeepInput',
fieldLabel: gettext('Keep Hourly'),
name: 'keep-hourly',
cbind: {
deleteEmpty: '{!isCreate}',
},
},
{
xtype: 'pmxPruneKeepInput',
name: 'keep-weekly',
fieldLabel: gettext('Keep Weekly'),
cbind: {
deleteEmpty: '{!isCreate}',
},
},
{
xtype: 'pmxPruneKeepInput',
name: 'keep-yearly',
fieldLabel: gettext('Keep Yearly'),
cbind: {
deleteEmpty: '{!isCreate}',
},
},
],
});