From b3923428e5c5c50b0952f75b011191ceb034bae6 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 25 Sep 2018 14:37:14 +0200 Subject: [PATCH] fix: [Flask] remove hardcoded url --- .../modules/dashboard/templates/index.html | 9 +-- .../sentiment_analysis_plot_tool.html | 4 +- .../sentiment_analysis_trending.html | 4 +- .../trendingcharts/templates/Trending.html | 5 +- .../templates/Moduletrending.html | 6 +- var/www/static/js/indexjavascript.js | 18 +++++- var/www/static/js/moduleTrending.js | 63 +++++++++++-------- var/www/static/js/sentiment_plot.js | 28 ++++++--- var/www/static/js/sentiment_trending.js | 16 ++++- var/www/static/js/trendingchart.js | 53 +++++++++------- 10 files changed, 136 insertions(+), 70 deletions(-) diff --git a/var/www/modules/dashboard/templates/index.html b/var/www/modules/dashboard/templates/index.html index e7331b6f..6d1bf12d 100644 --- a/var/www/modules/dashboard/templates/index.html +++ b/var/www/modules/dashboard/templates/index.html @@ -24,8 +24,7 @@ window.glob_tabvar = []; // Avoid undefined window.threshold_stucked_module = {{ threshold_stucked_module }} function update_values() { - $SCRIPT_ROOT = {{ request.script_root|tojson|safe }}; - $.getJSON($SCRIPT_ROOT+"/_stuff", + $.getJSON("{{ url_for('dashboard.stuff') }}", function(data) { window.glob_tabvar = data; }); @@ -189,14 +188,16 @@ - + - + diff --git a/var/www/modules/sentiment/templates/sentiment_analysis_trending.html b/var/www/modules/sentiment/templates/sentiment_analysis_trending.html index f0c12790..d1ed7c02 100644 --- a/var/www/modules/sentiment/templates/sentiment_analysis_trending.html +++ b/var/www/modules/sentiment/templates/sentiment_analysis_trending.html @@ -230,7 +230,9 @@ - + - +
diff --git a/var/www/modules/trendingmodules/templates/Moduletrending.html b/var/www/modules/trendingmodules/templates/Moduletrending.html index e7ac8232..5c24110a 100644 --- a/var/www/modules/trendingmodules/templates/Moduletrending.html +++ b/var/www/modules/trendingmodules/templates/Moduletrending.html @@ -34,10 +34,12 @@ - +