From 886c8b12315b6060d51ba268383cbdde6eb867a7 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 27 May 2014 10:54:44 +0000 Subject: [PATCH] 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 --- public/js/icinga/loader.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index d3343c75cf..d88e5adcc2 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -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