From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/4] ui: tape/PoolEdit: add selector for encryption keys
Date: Thu, 4 Feb 2021 13:56:30 +0100 [thread overview]
Message-ID: <20210204125632.16787-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210204125632.16787-1-d.csapak@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/Makefile | 1 +
www/tape/form/KeySelector.js | 38 ++++++++++++++++++++++++++++++++++++
www/tape/window/PoolEdit.js | 11 +++++++++++
3 files changed, 50 insertions(+)
create mode 100644 www/tape/form/KeySelector.js
diff --git a/www/Makefile b/www/Makefile
index 7ee79f8a..8391e68f 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -15,6 +15,7 @@ TAPE_UI_FILES= \
tape/form/PoolSelector.js \
tape/form/RetentionSelector.js \
tape/form/TapeDevicePathSelector.js \
+ tape/form/KeySelector.js \
tape/window/ChangerEdit.js \
tape/window/DriveEdit.js \
tape/window/EncryptionEdit.js \
diff --git a/www/tape/form/KeySelector.js b/www/tape/form/KeySelector.js
new file mode 100644
index 00000000..8a461a7b
--- /dev/null
+++ b/www/tape/form/KeySelector.js
@@ -0,0 +1,38 @@
+Ext.define('PBS.form.TapeKeySelector', {
+ extend: 'Proxmox.form.ComboGrid',
+ alias: 'widget.pbsTapeKeySelector',
+
+ allowBlank: false,
+ displayField: 'hint',
+ valueField: 'fingerprint',
+ value: null,
+ multiSelect: false,
+
+
+ store: {
+ proxy: {
+ type: 'proxmox',
+ url: '/api2/json/config/tape-encryption-keys',
+ },
+ autoLoad: true,
+ sorter: 'hint',
+ },
+
+ listConfig: {
+ columns: [
+ {
+ text: gettext('Hint'),
+ dataIndex: 'hint',
+ sortable: true,
+ flex: 1,
+ renderer: Ext.String.htmlEncode,
+ },
+ {
+ text: gettext('Fingerprint'),
+ sortable: true,
+ dataIndex: 'fingerprint',
+ flex: 5,
+ },
+ ],
+ },
+});
diff --git a/www/tape/window/PoolEdit.js b/www/tape/window/PoolEdit.js
index 4ab13530..6f91d25e 100644
--- a/www/tape/window/PoolEdit.js
+++ b/www/tape/window/PoolEdit.js
@@ -52,6 +52,17 @@ Ext.define('PBS.TapeManagement.PoolEditWindow', {
deleteEmpty: '{!isCreate}',
},
},
+ {
+ fieldLabel: gettext('Encryption Key'),
+ xtype: 'pbsTapeKeySelector',
+ name: 'encrypt',
+ allowBlank: true,
+ skipEmptyText: true,
+ autoSelect: false,
+ cbind: {
+ deleteEmpty: '{!isCreate}',
+ },
+ },
],
});
--
2.20.1
next prev parent reply other threads:[~2021-02-04 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 12:56 [pbs-devel] [PATCH proxmox-backup 1/4] ui: tape: add EncryptionPanel to add/remove " Dominik Csapak
2021-02-04 12:56 ` Dominik Csapak [this message]
2021-02-04 12:56 ` [pbs-devel] [PATCH proxmox-backup 3/4] ui: tape/PoolConfig: add flex to columns Dominik Csapak
2021-02-04 12:56 ` [pbs-devel] [PATCH proxmox-backup 4/4] ui: tape/ChangerStatus: add 'is labeled' column for tapes Dominik Csapak
2021-02-04 16:43 ` [pbs-devel] applied: [PATCH proxmox-backup 1/4] ui: tape: add EncryptionPanel to add/remove encryption keys Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210204125632.16787-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal