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:
parent
40e45a2a39
commit
886c8b1231
|
@ -288,11 +288,15 @@
|
||||||
|
|
||||||
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
||||||
|
|
||||||
//
|
|
||||||
var target = req.getResponseHeader('X-Icinga-Container');
|
var target = req.getResponseHeader('X-Icinga-Container');
|
||||||
var newBody = false;
|
var newBody = false;
|
||||||
if (target) {
|
if (target) {
|
||||||
if (target === 'ignore') {
|
if (target === 'ignore') {
|
||||||
|
var parts = notifications.split(' ');
|
||||||
|
this.createNotice(
|
||||||
|
parts.shift(),
|
||||||
|
parts.join(' ')
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If we change the target, oncomplete will fail to clean up
|
// If we change the target, oncomplete will fail to clean up
|
||||||
|
|
Loading…
Reference in New Issue