Commit 96a9946f authored by Dietmar Maurer's avatar Dietmar Maurer

ceph: show task progress

parent dd43568c
......@@ -3,6 +3,8 @@ Ext.define('PVE.CephCreateMon', {
alias: ['widget.pveCephCreateMon'],
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment