From 4587f26476c10a48a74055e4ffaf745c970bae82 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Fri, 6 Jun 2014 14:41:57 +0200 Subject: [PATCH] Revert "Ui/Sparklines: Remove img src before putting it into DOM" This reverts commit a75796c64d397d37f1d41ae3d7e6bdf119b340d9. --- public/js/icinga/loader.js | 2 +- public/js/icinga/ui.js | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 338629136..3b92e5b2f 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -269,7 +269,7 @@ if (this.processRedirectHeader(req)) return; // div helps getting an XML tree - var $resp = $('
' + icinga.ui.removeImageSourceFromSparklines(req.responseText) + '
'); + var $resp = $('
' + req.responseText + '
'); var active = false; var rendered = false; var classes; diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 6902953ca..e76e2dba8 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -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;