mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
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');
|
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 target = req.getResponseHeader('X-Icinga-Container');
|
||||||
var newBody = false;
|
var newBody = false;
|
||||||
if (target) {
|
if (target) {
|
||||||
|
if (target === 'ignore') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
req.$target = $('#' + target);
|
req.$target = $('#' + target);
|
||||||
newBody = true;
|
newBody = true;
|
||||||
}
|
}
|
||||||
@ -288,15 +300,6 @@
|
|||||||
this.icinga.ui.setWindowId(windowId);
|
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
|
// Remove 'impact' class if there was such
|
||||||
if (req.$target.hasClass('impact')) {
|
if (req.$target.hasClass('impact')) {
|
||||||
req.$target.removeClass('impact');
|
req.$target.removeClass('impact');
|
||||||
@ -438,9 +441,11 @@
|
|||||||
if (persist) {
|
if (persist) {
|
||||||
c += ' persist';
|
c += ' persist';
|
||||||
}
|
}
|
||||||
return $(
|
var $notice = $(
|
||||||
'<li class="' + c + '">' + message + '</li>'
|
'<li class="' + c + '">' + message + '</li>'
|
||||||
).appendTo($('#notifications'));
|
).appendTo($('#notifications'));
|
||||||
|
this.icinga.ui.fixControls();
|
||||||
|
return $notice;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user