Responses with not output (container: ignore) must of course be handled in JS
This commit is contained in:
parent
0fe493b007
commit
71aea4dfc7
|
@ -255,10 +255,22 @@
|
|||
active = $('[href].active', req.$target).attr('href');
|
||||
}
|
||||
|
||||
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
||||
if (notifications) {
|
||||
var parts = notifications.split(' ');
|
||||
this.createNotice(
|
||||
parts.shift(),
|
||||
parts.join(' ')
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
var target = req.getResponseHeader('X-Icinga-Container');
|
||||
var newBody = false;
|
||||
if (target) {
|
||||
if (target === 'ignore') {
|
||||
return;
|
||||
}
|
||||
req.$target = $('#' + target);
|
||||
newBody = true;
|
||||
}
|
||||
|
@ -288,15 +300,6 @@
|
|||
this.icinga.ui.setWindowId(windowId);
|
||||
}
|
||||
|
||||
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
||||
if (notifications) {
|
||||
var parts = notifications.split(' ');
|
||||
this.createNotice(
|
||||
parts.shift(),
|
||||
parts.join(' ')
|
||||
);
|
||||
}
|
||||
|
||||
// Remove 'impact' class if there was such
|
||||
if (req.$target.hasClass('impact')) {
|
||||
req.$target.removeClass('impact');
|
||||
|
@ -438,9 +441,11 @@
|
|||
if (persist) {
|
||||
c += ' persist';
|
||||
}
|
||||
return $(
|
||||
var $notice = $(
|
||||
'<li class="' + c + '">' + message + '</li>'
|
||||
).appendTo($('#notifications'));
|
||||
this.icinga.ui.fixControls();
|
||||
return $notice;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue