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