mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
Revert "Ui/Sparklines: Remove img src before putting it into DOM"
This reverts commit a75796c64d397d37f1d41ae3d7e6bdf119b340d9.
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…
x
Reference in New Issue
Block a user