[pve-devel] [PATCH manager] close #584: ui qemu: changed remove disk to asynchron call
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Oct 17 12:27:15 CEST 2018
On 10/17/18 12:06 PM, Tim Marx wrote:
> Signed-off-by: Tim Marx <t.marx at proxmox.com>
> ---
> www/manager6/qemu/HardwareView.js | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
> index a1bccc3c..605ceffe 100644
> --- a/www/manager6/qemu/HardwareView.js
> +++ b/www/manager6/qemu/HardwareView.js
> @@ -376,16 +376,25 @@ Ext.define('PVE.qemu.HardwareView', {
> Proxmox.Utils.API2Request({
> url: '/api2/extjs/' + baseurl,
> waitMsgTarget: me,
> - method: 'PUT',
> + method: 'POST',
> params: {
> 'delete': rec.data.key
> },
> - callback: function() {
> - reload();
> - },
> failure: function (response, opts) {
> Ext.Msg.alert('Error', response.htmlStatus);
> - }
> + },
> + success: function(response, options) {
> + var upid = response.result.data;
> + var win = Ext.create('Proxmox.window.TaskProgress', {
> + upid: upid,
> + listeners: {
> + destroy: function () {
> + me.reload();
> + }
> + }
> + });
> + win.show();
> + },
> });
> },
> listeners: {
>
this makes *all* remove operations through a POST and with a task log window.
But you state that you want to change the remove disk (or being more specific,
the destroy an unused disk) function.
I'd guess that we do not want this on all -delete methods?
More information about the pve-devel
mailing list