Revert "Ui/Sparklines: Remove img src before putting it into DOM"
This reverts commit a75796c64d
.
This commit is contained in:
parent
7c67a2ffff
commit
4587f26476
|
@ -269,7 +269,7 @@
|
|||
if (this.processRedirectHeader(req)) return;
|
||||
|
||||
// div helps getting an XML tree
|
||||
var $resp = $('<div>' + icinga.ui.removeImageSourceFromSparklines(req.responseText) + '</div>');
|
||||
var $resp = $('<div>' + req.responseText + '</div>');
|
||||
var active = false;
|
||||
var rendered = false;
|
||||
var classes;
|
||||
|
|
|
@ -657,22 +657,6 @@
|
|||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Find all svg charts and removes src attributes for sparklines
|
||||
*
|
||||
* @param {string} text
|
||||
* @returns {string}
|
||||
*/
|
||||
removeImageSourceFromSparklines: function(text) {
|
||||
var match, sourceMatch;
|
||||
var re = new RegExp(/(src=".+chart.php[^"]+")/g);
|
||||
var reSource = new RegExp(/src="([^"]+)"/);
|
||||
while ((match = re.exec(text))) {
|
||||
text = text.replace(match[0], '');
|
||||
}
|
||||
return text;
|
||||
},
|
||||
|
||||
initializeControls: function (parent) {
|
||||
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue