mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 05:03:52 +00:00
panel: disks: more static task window creation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
94791efabb
commit
4957686b0d
@ -99,18 +99,15 @@ Ext.define('Proxmox.DiskList', {
|
|||||||
waitMsgTarget: view,
|
waitMsgTarget: view,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
params: { disk: rec.data.name },
|
params: { disk: rec.data.name },
|
||||||
failure: function(response, options) {
|
failure: response => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
|
||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
|
||||||
},
|
|
||||||
success: function(response, options) {
|
success: function(response, options) {
|
||||||
var upid = response.result.data;
|
Ext.create('Proxmox.window.TaskProgress', {
|
||||||
var win = Ext.create('Proxmox.window.TaskProgress', {
|
upid: response.result.data,
|
||||||
upid: upid,
|
|
||||||
taskDone: function() {
|
taskDone: function() {
|
||||||
me.reload();
|
me.reload();
|
||||||
},
|
},
|
||||||
|
autoShow: true,
|
||||||
});
|
});
|
||||||
win.show();
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -127,18 +124,15 @@ Ext.define('Proxmox.DiskList', {
|
|||||||
waitMsgTarget: view,
|
waitMsgTarget: view,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
params: { disk: rec.data.name },
|
params: { disk: rec.data.name },
|
||||||
failure: function(response, options) {
|
failure: response => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
|
||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
|
||||||
},
|
|
||||||
success: function(response, options) {
|
success: function(response, options) {
|
||||||
var upid = response.result.data;
|
Ext.create('Proxmox.window.TaskProgress', {
|
||||||
var win = Ext.create('Proxmox.window.TaskProgress', {
|
upid: response.result.data,
|
||||||
upid: upid,
|
|
||||||
taskDone: function() {
|
taskDone: function() {
|
||||||
me.reload();
|
me.reload();
|
||||||
},
|
},
|
||||||
|
autoShow: true,
|
||||||
});
|
});
|
||||||
win.show();
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user