Fix a javascript error on reporting page related to localization.

Localized float values (using comma separator) can't be parsed in javascript, causing browser error when rendering charts.
This commit disables localization of float values in template.

Change-Id: Ia00c7d67f03fa42961cb5cee577601505971ea0f
Signed-off-by: Vincent Alquier <vincent.alquier@fullsave.com>
This commit is contained in:
Vincent Alquier 2016-09-14 17:08:21 +02:00
parent 86ed62ce33
commit fd06863e63
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
{% load i18n %}
{% load l10n %}
{% load static %}
<script src='{% static "cloudkitty/js/d3.min.js" %}' type='text/javascript' charset='utf-8'></script>
<script src='{% static "cloudkitty/js/d3pie.min.js" %}' type='text/javascript' charset='utf-8'></script>
@ -55,7 +56,7 @@
"content": [
{% for service, data in repartition_data.items %}
{"label": "{{ service }}",
"value": {{ data.cumulated }}
"value": {{ data.cumulated|unlocalize }}
},
{% endfor %}
]}});
@ -86,7 +87,7 @@ var graph = new Rickshaw.Graph({
color: palette.color(),
name: "{{ service }}",
data: [
{% for timestamp, rating in data.hourly.items %}{x: {{ timestamp }}, y: {{ rating }}},{% endfor %}
{% for timestamp, rating in data.hourly.items %}{x: {{ timestamp }}, y: {{ rating|unlocalize }}},{% endfor %}
]
},
{% endfor %}