From ff11922c355dfa781bcde437b2a2061abec4ded5 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 27 Nov 2019 09:45:29 +0000 Subject: [PATCH] Improve WDQS report. --- templates/query_list.html | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/templates/query_list.html b/templates/query_list.html index 0c61f47..a744d89 100644 --- a/templates/query_list.html +++ b/templates/query_list.html @@ -20,7 +20,7 @@
when
rows
time
-
options
+
{% for obj in q %}
@@ -35,7 +35,11 @@
- {{ obj.row_count if obj.row_count is not none else '' }} + {% if obj.row_count is not none %} + {{ obj.row_count }} + {% elif obj.bad %} + error + {% endif %}
@@ -48,7 +52,10 @@
- show/hide SPARQL | + view SPARQL | + {% if obj.bad %} + view error | + {% endif %} view in WDQS
@@ -64,7 +71,7 @@ -
+
{% if obj.status_code != 200 %}
status code: {{ obj.status_code }}
@@ -85,11 +92,23 @@ $('.sparql').hide(); $('.error').hide(); - $('.toggle').click(function() { + $('.toggle-sparql').click(function(event) { + event.preventDefault(); + var query_id = $(this).data('id'); $('#query_' + query_id).toggle(); }); + $('.toggle-error').click(function(event) { + event.preventDefault(); + + var query_id = $(this).data('id'); + + $('#error_' + query_id).toggle(); + }); + + + {% endblock %}