Skip to content

Commit

Permalink
add graph name to the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Feb 5, 2020
1 parent 89d8103 commit d65e23a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<html><body><pre>
{% endif %}
{% if error %}
alert('{{ error|escapejs }}');
alert('{{ graph_title }} error: \n{{ error|escapejs }}');
{% elif values %}
function loadChartScript(){
{% load_chart chart_type values chart_container extra %}
Expand Down
1 change: 1 addition & 0 deletions admin_tools_stats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def get_context_data(self, *args, interval=None, graph_key=None, **kwargs):
if 'debug' in self.request.GET:
raise e
context['error'] = str(e)
context['graph_title'] = dashboard_stats.graph_title
logger.exception(e)
return context
criteria = dashboard_stats.get_multi_series_criteria(self.request.GET)
Expand Down

0 comments on commit d65e23a

Please sign in to comment.