loader.js: Introduce new header `X-Icinga-Location-Query`
This header is only used in case the response includes multipart content. It's meant to provide a new query string that replaces the one of the targeted container and the resulting change also replaces the current history entry.
This commit is contained in:
parent
70c3023f3c
commit
0b94489c7e
|
@ -762,6 +762,14 @@
|
|||
|
||||
var contentSeparator = req.getResponseHeader('X-Icinga-Multipart-Content');
|
||||
if (!! contentSeparator) {
|
||||
var locationQuery = req.getResponseHeader('X-Icinga-Location-Query');
|
||||
if (locationQuery !== null) {
|
||||
var a = this.icinga.utils.getUrlHelper();
|
||||
a.search = locationQuery ? '?' + locationQuery : '';
|
||||
req.$target.data('icingaUrl', a.href);
|
||||
this.icinga.history.replaceCurrentState();
|
||||
}
|
||||
|
||||
$.each(req.responseText.split(contentSeparator), function (idx, el) {
|
||||
var match = el.match(/for=(\S+)\s+(.*)/ms);
|
||||
if (!! match) {
|
||||
|
|
Loading…
Reference in New Issue