diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 0a83ff6ef..e1dea3e1d 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -840,18 +840,30 @@ if (!! extraUpdates && req.getResponseHeader('X-Icinga-Redirect-Http') !== 'yes') { $.each(extraUpdates.split(','), function (idx, el) { var parts = el.trim().split(';'); - if (parts.length !== 2) { + var $target; + var url; + if (parts.length === 2) { + $target = $('#' + parts[0]); + if (! $target.length) { + _this.icinga.logger.warn('Invalid target ID. Cannot load extra URL', el); + return; + } + + url = parts[1]; + } else if (parts.length === 1) { + $target = $(parts[0]).closest(".container").not(req.$target); + if (! $target.length) { + _this.icinga.logger.warn('Invalid target ID. Cannot load extra URL', el); + return; + } + + url = $target.data('icingaUrl'); + } else { _this.icinga.logger.error('Invalid extra update', el); return; } - var $target = $('#' + parts[0]); - if (! $target.length) { - _this.icinga.logger.warn('Invalid target ID. Cannot load extra URL', el); - return; - } - - _this.loadUrl(parts[1], $target).addToHistory = false; + _this.loadUrl(url, $target).addToHistory = false; }); }