Skip to content

Commit

Permalink
js/notifications: fixed target=ignore notification
Browse files Browse the repository at this point in the history
Ongoing error handling cleanup silently dropped notifications for
requests with "invalid" target (e.g. commands not redirecting after
submission - they should not exist, but they do).

This is redundant code, but that's ok for now - response handling will
be restructured.

fixes #6327
refs #6280
  • Loading branch information
Thomas-Gelf committed May 27, 2014
1 parent 40e45a2 commit 886c8b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/js/icinga/loader.js
Expand Up @@ -288,11 +288,15 @@

var notifications = req.getResponseHeader('X-Icinga-Notification');

//
var target = req.getResponseHeader('X-Icinga-Container');
var newBody = false;
if (target) {
if (target === 'ignore') {
var parts = notifications.split(' ');
this.createNotice(
parts.shift(),
parts.join(' ')
);
return;
}
// If we change the target, oncomplete will fail to clean up
Expand Down

0 comments on commit 886c8b1

Please sign in to comment.