changeset 6601:6f6ee1cfe2d6

statistics: fix invalid js after 33b71a130b16
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 03 May 2017 03:41:11 +0200
parents a1f8bf0428c5
children 2cf6d49b6073
files kallithea/controllers/summary.py kallithea/templates/summary/statistics.html
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/summary.py	Sat Apr 15 01:56:27 2017 +0200
+++ b/kallithea/controllers/summary.py	Wed May 03 03:41:11 2017 +0200
@@ -192,8 +192,8 @@
         if stats and stats.languages:
             c.no_data = False is c.db_repo.enable_statistics
             lang_stats_d = json.loads(stats.languages)
-            c.commit_data = stats.commit_activity
-            c.overview_data = stats.commit_activity_combined
+            c.commit_data = json.loads(stats.commit_activity)
+            c.overview_data = json.loads(stats.commit_activity_combined)
 
             lang_stats = ((x, {"count": y,
                                "desc": LANGUAGES_EXTENSIONS_MAP.get(x)})
--- a/kallithea/templates/summary/statistics.html	Sat Apr 15 01:56:27 2017 +0200
+++ b/kallithea/templates/summary/statistics.html	Wed May 03 03:41:11 2017 +0200
@@ -444,7 +444,8 @@
     // user choices on overview
     YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
 }
-    SummaryPlot(${h.jshtml(c.ts_min)}, ${h.jshtml(c.ts_max)}, ${h.js(c.commit_data)}, ${h.js(c.overview_data)});
+
+SummaryPlot(${h.js(c.ts_min)}, ${h.js(c.ts_max)}, ${h.js(c.commit_data)}, ${h.js(c.overview_data)});
 </script>
 
 </%def>