this is not a synchronous api call, so open a taskprogress window
and reload after the task is done

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/dc/ACMEClusterView.js | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/www/manager6/dc/ACMEClusterView.js 
b/www/manager6/dc/ACMEClusterView.js
index e73de7b7..74868cb7 100644
--- a/www/manager6/dc/ACMEClusterView.js
+++ b/www/manager6/dc/ACMEClusterView.js
@@ -54,6 +54,19 @@ Ext.define('PVE.dc.ACMEAccountView', {
            let view = me.getView();
            view.getStore().rstore.load();
        },
+
+       showTaskAndReload: function(options, success, response) {
+           let me = this;
+           if (!success) return;
+
+           let upid = response.result.data;
+           Ext.create('Proxmox.window.TaskProgress', {
+               upid,
+               taskDone: function() {
+                   me.reload();
+               },
+           }).show();
+       },
     },
 
     minHeight: 150,
@@ -84,7 +97,7 @@ Ext.define('PVE.dc.ACMEAccountView', {
        {
            xtype: 'proxmoxStdRemoveButton',
            baseurl: '/cluster/acme/account',
-           callback: 'reload',
+           callback: 'showTaskAndReload',
        },
     ],
 
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to