[pbs-devel] [PATCH proxmox-backup] ui: proxmox-tape key restore
Markus Frank
m.frank at proxmox.com
Wed Apr 13 11:30:05 CEST 2022
"Restore Key With JSON" Button and Edit-Window with textarea and password
field.
Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
www/tape/EncryptionKeys.js | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/www/tape/EncryptionKeys.js b/www/tape/EncryptionKeys.js
index a4f91ccc..410052f7 100644
--- a/www/tape/EncryptionKeys.js
+++ b/www/tape/EncryptionKeys.js
@@ -57,6 +57,35 @@ Ext.define('PBS.TapeManagement.EncryptionPanel', {
}).show();
},
+ onRestoreKeyWithJson: function() {
+ Ext.create('Proxmox.window.Edit', {
+ title: gettext('Restore Key With JSON'),
+ isCreate: true,
+ submitText: gettext('Restore'),
+ method: 'POST',
+ url: `/api2/extjs/config`,
+ submitUrl: function(url) {
+ return `${url}/tape-encryption-keys`;
+ },
+ items: [
+ {
+ xtype: 'textarea',
+ fieldLabel: gettext('key-json'),
+ renderer: Ext.htmlEncode,
+ allowBlank: false,
+ name: 'key',
+ },
+ {
+ xtype: 'textfield',
+ inputType: 'password',
+ fieldLabel: gettext('Password'),
+ allowBlank: false,
+ name: 'password',
+ },
+ ],
+ }).show();
+ },
+
reload: function() {
this.getView().getStore().rstore.load();
},
@@ -114,6 +143,14 @@ Ext.define('PBS.TapeManagement.EncryptionPanel', {
handler: 'onRestoreKey',
selModel: false,
},
+ '-',
+ {
+ text: gettext('Restore Key With JSON'),
+ xtype: 'proxmoxButton',
+ handler: 'onRestoreKeyWithJson',
+ selModel: false,
+ },
+
],
columns: [
{
--
2.30.2
More information about the pbs-devel
mailing list