js/notifications: fixed target=ignore notification

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
This commit is contained in:
Thomas Gelf 2014-05-27 10:54:44 +00:00
parent 40e45a2a39
commit 886c8b1231
1 changed files with 5 additions and 1 deletions

View File

@ -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