From 04eb02d970080fd7cccf8bcf8b3292ce69532389 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 21 Nov 2020 20:02:28 +0100 Subject: [PATCH] panel: add PruneInputPanel over from PBS Signed-off-by: Thomas Lamprecht --- src/Makefile | 1 + src/panel/PruneKeepPanel.js | 67 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/panel/PruneKeepPanel.js diff --git a/src/Makefile b/src/Makefile index c703c0c..fbc2627 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 \ diff --git a/src/panel/PruneKeepPanel.js b/src/panel/PruneKeepPanel.js new file mode 100644 index 0000000..441276e --- /dev/null +++ b/src/panel/PruneKeepPanel.js @@ -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}', + }, + }, + ], +}); -- 2.39.2