mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Clean up and conform to coding guidelines
This commit is contained in:
parent
038fa29da8
commit
0c2afe3c3b
@ -424,7 +424,9 @@
|
|||||||
this.icinga.ui.reloadCss();
|
this.icinga.ui.reloadCss();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.getResponseHeader('X-Icinga-Redirect')) return;
|
if (req.getResponseHeader('X-Icinga-Redirect')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// div helps getting an XML tree
|
// div helps getting an XML tree
|
||||||
var $resp = $('<div>' + req.responseText + '</div>');
|
var $resp = $('<div>' + req.responseText + '</div>');
|
||||||
@ -515,8 +517,6 @@
|
|||||||
var $el = $(el);
|
var $el = $(el);
|
||||||
if ($el.hasClass('dashboard')) {
|
if ($el.hasClass('dashboard')) {
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
var url = $el.data('icingaUrl');
|
var url = $el.data('icingaUrl');
|
||||||
targets[i].data('icingaUrl', url);
|
targets[i].data('icingaUrl', url);
|
||||||
@ -533,28 +533,9 @@
|
|||||||
|
|
||||||
this.icinga.ui.initializeTriStates($resp);
|
this.icinga.ui.initializeTriStates($resp);
|
||||||
|
|
||||||
/* Should we try to fiddle with responses containing full HTML? */
|
if (rendered) {
|
||||||
/*
|
return;
|
||||||
if ($('body', $resp).length) {
|
|
||||||
req.responseText = $('script', $('body', $resp).html()).remove();
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/*
|
|
||||||
|
|
||||||
var containers = [];
|
|
||||||
|
|
||||||
$('.dashboard .container').each(function(idx, el) {
|
|
||||||
urls.push($(el).data('icingaUrl'));
|
|
||||||
});
|
|
||||||
console.log(urls);
|
|
||||||
$('.container[data-icinga-refresh]').each(function(idx, el) {
|
|
||||||
var $el = $(el);
|
|
||||||
self.loadUrl($el.data('icingaUrl'), $el).autorefresh = true;
|
|
||||||
el = null;
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (rendered) return;
|
|
||||||
|
|
||||||
// .html() removes outer div we added above
|
// .html() removes outer div we added above
|
||||||
this.renderContentToContainer($resp.html(), req.$target, req.action, req.autorefresh);
|
this.renderContentToContainer($resp.html(), req.$target, req.action, req.autorefresh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user