diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index e4d36c362..2cbc6734e 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -304,6 +304,11 @@ req.$target.attr('class', 'container'); // TODO: remove module-$name } + var cssreload = req.getResponseHeader('X-Icinga-CssReload'); + if (cssreload) { + this.icinga.ui.reloadCss(); + } + var title = req.getResponseHeader('X-Icinga-Title'); if (title && req.$target.closest('.dashboard').length === 0) { this.icinga.ui.setTitle(title); diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index f5b240562..a0118b880 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -76,6 +76,21 @@ return this; }, + reloadCss: function () { + var utils = this.icinga.utils; + $('link').each(function() { + if ($(this).attr('type').indexOf('css') > -1) { + $(this).attr( + 'href', + utils.addUrlParams( + $(this).attr('href'), + [ { name: 'id', value: new Date().getTime() } ] + ) + ); + } + }); + }, + enableTimeCounters: function () { this.timeCounterTimer = this.icinga.timer.register( this.refreshTimeSince,