Skip to content

Commit

Permalink
don't show process log request errors and also don't retry autorefres…
Browse files Browse the repository at this point in the history
…h when requests are failing
  • Loading branch information
mmoser committed Mar 18, 2019
1 parent c5bbc53 commit b27105f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ pimcore.plugin.processmanager.panel.monitoringItem = Class.create({

this.autoRefreshTask = {
run: function () {
this.store.reload();
this.store.reload({
callback: function (records, operation, success) {
// do not retry refreshing in an endless loop when requests are failing
if (!success) {
Ext.TaskManager.stop(this.autoRefreshTask);
}
}.bind(this)
});
}.bind(this),
interval: (this.refreshInterval * 1000)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ pimcore.plugin.processmanager = Class.create(pimcore.plugin.admin, {
cls: "pimcore_main_menu",
handler: this.showProcessManager.bind(this)
});

//ignore process manager process log request exceptions as otherwise annoying errors can pop up in the pimcore backend
Ext.Ajax.on({requestexception: function (conn, response, options) {
if(response.request.url.startsWith('/admin/elementsprocessmanager/monitoring-item/list') && options.action === "read") {
options.ignoreErrors = true;
}
}, priority: 1000});
}
if(extrasMenu){
extrasMenu.updateLayout();
Expand Down

0 comments on commit b27105f

Please sign in to comment.