ceph: show task progress
This commit is contained in:
parent
2bc255f127
commit
93a1f20f14
@ -4,6 +4,8 @@ Ext.define('PVE.CephCreateMon', {
|
||||
|
||||
subject: 'Ceph Monitor',
|
||||
|
||||
showProgress: true,
|
||||
|
||||
setNode: function(nodename) {
|
||||
var me = this;
|
||||
|
||||
@ -83,6 +85,11 @@ Ext.define('PVE.node.CephMonList', {
|
||||
url: "/nodes/" + rec.data.host + "/ceph/" + cmd,
|
||||
method: 'POST',
|
||||
params: { service: "mon." + rec.data.name },
|
||||
success: function(response, options) {
|
||||
var upid = response.result.data;
|
||||
var win = Ext.create('PVE.window.TaskProgress', { upid: upid });
|
||||
win.show();
|
||||
},
|
||||
failure: function(response, opts) {
|
||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||
}
|
||||
@ -133,6 +140,11 @@ Ext.define('PVE.node.CephMonList', {
|
||||
url: "/nodes/" + rec.data.host + "/ceph/mon/" +
|
||||
rec.data.name,
|
||||
method: 'DELETE',
|
||||
success: function(response, options) {
|
||||
var upid = response.result.data;
|
||||
var win = Ext.create('PVE.window.TaskProgress', { upid: upid });
|
||||
win.show();
|
||||
},
|
||||
failure: function(response, opts) {
|
||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ Ext.define('PVE.CephCreateOsd', {
|
||||
|
||||
subject: 'Ceph OSD',
|
||||
|
||||
showProgress: true,
|
||||
|
||||
initComponent : function() {
|
||||
/*jslint confusion: true */
|
||||
var me = this;
|
||||
@ -51,6 +53,8 @@ Ext.define('PVE.CephRemoveOsd', {
|
||||
|
||||
isRemove: true,
|
||||
|
||||
showProgress: true,
|
||||
|
||||
initComponent : function() {
|
||||
/*jslint confusion: true */
|
||||
var me = this;
|
||||
@ -145,7 +149,12 @@ Ext.define('PVE.node.CephOsdTree', {
|
||||
params: { service: rec.data.name },
|
||||
waitMsgTarget: me,
|
||||
method: 'POST',
|
||||
success: reload,
|
||||
success: function(response, options) {
|
||||
var upid = response.result.data;
|
||||
var win = Ext.create('PVE.window.TaskProgress', { upid: upid });
|
||||
win.show();
|
||||
me.mon(win, 'close', reload, me);
|
||||
},
|
||||
failure: function(response, opts) {
|
||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ Ext.define('PVE.window.Edit', {
|
||||
|
||||
backgroundDelay: 0,
|
||||
|
||||
showProgress: false,
|
||||
|
||||
isValid: function() {
|
||||
var me = this;
|
||||
|
||||
@ -110,7 +112,8 @@ Ext.define('PVE.window.Edit', {
|
||||
},
|
||||
success: function(response, options) {
|
||||
me.close();
|
||||
if (me.backgroundDelay && response.result.data) {
|
||||
if ((me.backgroundDelay || me.showProgress) &&
|
||||
response.result.data) {
|
||||
var upid = response.result.data;
|
||||
var win = Ext.create('PVE.window.TaskProgress', {
|
||||
upid: upid
|
||||
|
Loading…
Reference in New Issue
Block a user