summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8d8dbfc)
and integrate it into the edit window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+ // 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.
// 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,
var viewerClass = me.showTaskViewer ? 'Viewer' : 'Progress';
var win = Ext.create('Proxmox.window.Task' + viewerClass, {
upid: upid,
listeners: {
destroy: function () {
me.close();
listeners: {
destroy: function () {
me.close();
extend: 'Ext.window.Window',
alias: 'widget.proxmoxTaskProgress',
extend: 'Ext.window.Window',
alias: 'widget.proxmoxTaskProgress',
+ taskDone: Ext.emptyFn,
+
initComponent: function() {
var me = this;
initComponent: function() {
var me = this;
me.close();
Ext.Msg.alert('Task failed', exitstatus);
}
me.close();
Ext.Msg.alert('Task failed', exitstatus);
}
+ me.taskDone(exitstatus == 'OK');
text: gettext('Details'),
handler: function() {
var win = Ext.create('Proxmox.window.TaskViewer', {
text: gettext('Details'),
handler: function() {
var win = Ext.create('Proxmox.window.TaskViewer', {
upid: me.upid
});
win.show();
upid: me.upid
});
win.show();
extraTitle: '', // string to prepend after the generic task title
extraTitle: '', // string to prepend after the generic task title
+ taskDone: Ext.emptyFn,
+
initComponent: function() {
var me = this;
initComponent: function() {
var me = this;
logView.requestUpdate(undefined, true);
logView.scrollToEnd = false;
statstore.stopUpdate();
logView.requestUpdate(undefined, true);
logView.scrollToEnd = false;
statstore.stopUpdate();
+ me.taskDone(statgrid.getObjectValue('exitstatus') == 'OK');
}
stop_btn1.setDisabled(status !== 'running');
}
stop_btn1.setDisabled(status !== 'running');