[pve-devel] [PATCH manager 1/1] ui: add ability to show and edit comments for backups
Dominik Csapak
d.csapak at proxmox.com
Fri Nov 13 10:38:52 CET 2020
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/grid/BackupView.js | 43 ++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index ec0b60b2..3f06889f 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -227,7 +227,48 @@ Ext.define('PVE.grid.BackupView', {
selModel: sm,
tbar: {
overflowHandler: 'scroller',
- items: [ backup_btn, restore_btn, delete_btn,config_btn, '->', storagesel, '-', vmidfilterCB, storagefilter ],
+ items: [
+ backup_btn,
+ restore_btn,
+ delete_btn,
+ config_btn,
+ {
+ xtype: 'proxmoxButton',
+ text: gettext('Edit Comment'),
+ disabled: true,
+ handler: function() {
+ let volid = sm.getSelection()[0].data.volid;
+ var storage = storagesel.getValue();
+ Ext.create('Proxmox.window.Edit', {
+ autoLoad: true,
+ width: 600,
+ height: 400,
+ resizable: true,
+ title: gettext('Comment'),
+ url: `/api2/extjs/nodes/${nodename}/storage/${storage}/content/${volid}`,
+ layout: 'fit',
+ items: [
+ {
+ xtype: 'textarea',
+ layout: 'fit',
+ name: 'comment',
+ height: '100%',
+ },
+ ],
+ listeners: {
+ destroy: function() {
+ reload();
+ },
+ },
+ }).show();
+ },
+ },
+ '->',
+ storagesel,
+ '-',
+ vmidfilterCB,
+ storagefilter
+ ],
},
columns: [
{
--
2.20.1
More information about the pve-devel
mailing list