showTaskViewer: false,
+ // gets called if we have a progress bar or taskview and it detected that
+ // the task finished. function(success)
+ taskDone: Ext.emptyFn,
+
// assign a reference from docs, to add a help button docked to the
// bottom of the window. If undefined we magically fall back to the
// onlineHelp of our first item, if set.
var viewerClass = me.showTaskViewer ? 'Viewer' : 'Progress';
var win = Ext.create('Proxmox.window.Task' + viewerClass, {
upid: upid,
+ taskDone: me.taskDone,
listeners: {
destroy: function () {
me.close();
extend: 'Ext.window.Window',
alias: 'widget.proxmoxTaskProgress',
+ taskDone: Ext.emptyFn,
+
initComponent: function() {
var me = this;
me.close();
Ext.Msg.alert('Task failed', exitstatus);
}
+ me.taskDone(exitstatus == 'OK');
}
});
text: gettext('Details'),
handler: function() {
var win = Ext.create('Proxmox.window.TaskViewer', {
+ taskDone: me.taskDone,
upid: me.upid
});
win.show();
extraTitle: '', // string to prepend after the generic task title
+ taskDone: Ext.emptyFn,
+
initComponent: function() {
var me = this;
logView.requestUpdate(undefined, true);
logView.scrollToEnd = false;
statstore.stopUpdate();
+ me.taskDone(statgrid.getObjectValue('exitstatus') == 'OK');
}
stop_btn1.setDisabled(status !== 'running');