From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1430361215 for ; Tue, 20 Oct 2020 11:10:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0764AC4CD for ; Tue, 20 Oct 2020 11:10:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 9AEDCC458 for ; Tue, 20 Oct 2020 11:10:39 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4747245E42 for ; Tue, 20 Oct 2020 11:10:39 +0200 (CEST) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Date: Tue, 20 Oct 2020 11:10:09 +0200 Message-Id: <20201020091012.82723-8-h.laimer@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201020091012.82723-1-h.laimer@proxmox.com> References: <20201020091012.82723-1-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH v4 proxmox-backup 07/10] ui: add verification job edit window X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2020 09:10:42 -0000 Signed-off-by: Hannes Laimer --- www/Makefile | 1 + www/window/VerifyJobEdit.js | 93 +++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 www/window/VerifyJobEdit.js diff --git a/www/Makefile b/www/Makefile index a6c46718..e04af930 100644 --- a/www/Makefile +++ b/www/Makefile @@ -20,6 +20,7 @@ JSSRC= \ config/DataStoreConfig.js \ window/UserEdit.js \ window/UserPassword.js \ + window/VerifyJobEdit.js \ window/RemoteEdit.js \ window/SyncJobEdit.js \ window/ACLEdit.js \ diff --git a/www/window/VerifyJobEdit.js b/www/window/VerifyJobEdit.js new file mode 100644 index 00000000..9d29eba7 --- /dev/null +++ b/www/window/VerifyJobEdit.js @@ -0,0 +1,93 @@ +Ext.define('PBS.window.VerifyJobEdit', { + extend: 'Proxmox.window.Edit', + alias: 'widget.pbsVerifyJobEdit', + mixins: ['Proxmox.Mixin.CBind'], + + userid: undefined, + + onlineHelp: 'verifyjobs', + + isAdd: true, + + subject: gettext('VerifyJob'), + + fieldDefaults: { labelWidth: 120 }, + + cbindData: function(initialConfig) { + let me = this; + + let baseurl = '/api2/extjs/config/verify'; + let id = initialConfig.id; + + me.isCreate = !id; + me.url = id ? `${baseurl}/${id}` : baseurl; + me.method = id ? 'PUT' : 'POST'; + me.autoLoad = !!id; + return { }; + }, + + items: { + xtype: 'inputpanel', + column1: [ + { + fieldLabel: gettext('Verify Job ID'), + xtype: 'pmxDisplayEditField', + name: 'id', + renderer: Ext.htmlEncode, + allowBlank: false, + minLength: 4, + cbind: { + editable: '{isCreate}', + }, + }, + { + fieldLabel: gettext('Datastore'), + xtype: 'pbsDataStoreSelector', + allowBlank: false, + name: 'store', + }, + { + xtype: 'proxmoxintegerfield', + fieldLabel: gettext('Days valid'), + minValue: 1, + value: '', + allowBlank: true, + name: 'outdated-after', + emptyText: gettext('no expiration'), + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + ], + + column2: [ + { + fieldLabel: gettext('Ignore verified'), + xtype: 'proxmoxcheckbox', + name: 'ignore-verified', + uncheckedValue: false, + value: true, + }, + { + fieldLabel: gettext('Schedule'), + xtype: 'pbsCalendarEvent', + name: 'schedule', + emptyText: gettext('none'), + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + ], + + columnB: [ + { + fieldLabel: gettext('Comment'), + xtype: 'proxmoxtextfield', + name: 'comment', + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, + ], + }, +}); -- 2.20.1