Reload the grid list of backups after the backup task completion

This allows visual feedback for first time users doing a backup.
This commit is contained in:
Emmanuel Kasper 2017-01-05 15:33:37 +01:00 committed by Dietmar Maurer
parent 6a4edbd195
commit e83e60bfa1
2 changed files with 16 additions and 3 deletions

View File

@ -123,7 +123,12 @@ Ext.define('PVE.grid.BackupView', {
nodename: nodename,
vmid: vmid,
vmtype: vmtype,
storage: storagesel.getValue()
storage: storagesel.getValue(),
listeners : {
close: function() {
reload();
}
}
});
win.show();
}

View File

@ -76,13 +76,21 @@ Ext.define('PVE.window.Backup', {
Ext.Msg.alert('Error',response.htmlStatus);
},
success: function(response, options) {
// close later so we reload the grid
// after the task has completed
me.hide();
var upid = response.result.data;
var win = Ext.create('PVE.window.TaskViewer', {
upid: upid
upid: upid,
listeners: {
close: function() {
me.close();
}
}
});
win.show();
me.close();
}
});
}