Re: [PATCH proxmox-backup 12/20] ui: define and expose encryption key management menu item and windows

Dominik Csapak
2026-04-03T12:16:28Z

aside from what thomas found imo mostly ok

one comment inline

On 4/1/26 9:55 AM, Christian Ebner wrote:
[snip]
> diff --git a/www/config/EncryptionKeysView.js b/www/config/EncryptionKeysView.js
> new file mode 100644
> index 000000000..965dec47c
> --- /dev/null
> +++ b/www/config/EncryptionKeysView.js
> @@ -0,0 +1,143 @@
> +Ext.define('pbs-encryption-keys', {
> + extend: 'Ext.data.Model',
> + fields: ['id', 'fingerprint', 'created'],
> + idProperty: 'id',
> + proxy: {
> + type: 'proxmox',
> + url: '/api2/json/config/encryption-keys',
> + },
> +});
> +
> +Ext.define('PBS.config.EncryptionKeysView', {
> + extend: 'Ext.grid.GridPanel',
> + alias: 'widget.pbsEncryptionKeysView',
> +
> + title: gettext('Encryption Keys'),
> +
> + stateful: true,
> + stateId: 'grid-encryption-keys',
> +
> + controller: {
> + xclass: 'Ext.app.ViewController',
> +
> + addEncryptionKey: function () {
> + let me = this;
> + Ext.create('PBS.window.EncryptionKeysEdit', {
> + listeners: {
> + destroy: function () {
> + me.reload();
> + },
> + },
> + }).show();
> + },
> +
> + removeEncryptionKey: function () {
> + let me = this;
> + let view = me.getView();
> + let selection = view.getSelection();
> +
> + if (!selection || selection.length < 1) {
> + return;
> + }
> +
> + let keyID = selection[0].data.id;
> +
> + Ext.create('Proxmox.window.SafeDestroy', {
> + url: `/api2/json/config/encryption-keys/${keyID}`,

we should probably use '/api2/extjs' here, at least in my setup this
leads to an 'unknown error' popup when deleting a key