Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions quarry/web/static/templates/compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ output += "\n ";
}
output += "\n (";
output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "rowcount"), env.opts.autoescape);
output += " rows)\n </div>\n <div class='col-md-4'>\n <div class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-info btn-xs dropdown-toggle\" data-toggle=\"dropdown\">\n Download data <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\" role=\"menu\">\n ";
output += " ";
if(runtime.contextOrFrameLookup(context, frame, "rowcount") == 1) {
output += "row";
;
}
else {
output += "rows";
;
}
output += ")\n </div>\n <div class='col-md-4'>\n <div class=\"btn-group pull-right\">\n <button type=\"button\" class=\"btn btn-info btn-xs dropdown-toggle\" data-toggle=\"dropdown\">\n Download data <span class=\"caret\"></span>\n </button>\n <ul class=\"dropdown-menu\" role=\"menu\">\n ";
frame = frame.push();
var t_3 = {"tsv": "TSV","json": "JSON","json-lines": "JSON Lines","csv": "CSV","wikitable": "Wikitable","html": "HTML"};
if(t_3) {var t_1;
Expand Down Expand Up @@ -117,34 +126,34 @@ var output = "";
try {
var parentTemplate = null;
if(runtime.contextOrFrameLookup(context, frame, "status") == "failed") {
output += "\n<strong>Error</strong>\n<pre>";
output += "\r\n<strong>Error</strong>\r\n<pre>";
output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"error"), env.opts.autoescape);
output += "</pre>\n";
output += "</pre>\r\n";
;
}
else {
if(runtime.contextOrFrameLookup(context, frame, "status") == "killed") {
output += "\nThis query took longer than 30 minutes to execute and was killed.\n";
output += "\r\nThis query took longer than 30 minutes to execute and was killed.\r\n";
;
}
else {
if(runtime.contextOrFrameLookup(context, frame, "status") == "queued") {
output += "\nThis query is waiting to be executed\n";
output += "\r\nThis query is waiting to be executed\r\n";
;
}
else {
if(runtime.contextOrFrameLookup(context, frame, "status") == "stopped") {
output += "\nThis query was stopped\n";
output += "\r\nThis query was stopped\r\n";
;
}
else {
if(runtime.contextOrFrameLookup(context, frame, "status") == "running") {
output += "\nThis query is currently executing...\n";
output += "\r\nThis query is currently executing...\r\n";
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"connection_id")) {
output += "\n<button id=\"show-explain\" type=\"button\" class=\"btn btn-default btn-xs\">Explain</button>\n";
output += "\r\n<button id=\"show-explain\" type=\"button\" class=\"btn btn-default btn-xs\">Explain</button>\r\n";
;
}
output += "\n";
output += "\r\n";
;
}
;
Expand All @@ -155,14 +164,14 @@ output += "\n";
}
;
}
output += "\n";
output += "\r\n";
if(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"replag")) {
output += "\n<div class=\"alert alert-warning\">\n <h4 class=\"alert-heading\">Replication lag</h4>\n <p class=\"mb-0\">The database on which this query was executed has a <a href=\"https://replag.toolforge.org/\">synchronization delay</a> with the wiki.\n This can be caused by maintenance or a database incident, and should be resolved soon.<br>\n Modifications that were made in the last <b>";
output += "\r\n<div class=\"alert alert-warning\">\r\n <h4 class=\"alert-heading\">Replication lag</h4>\r\n <p class=\"mb-0\">The database on which this query was executed has a <a href=\"https://replag.toolforge.org/\">synchronization delay</a> with the wiki.\r\n This can be caused by maintenance or a database incident, and should be resolved soon.<br>\r\n Modifications that were made in the last <b>";
output += runtime.suppressValue(runtime.memberLookup((runtime.contextOrFrameLookup(context, frame, "extra")),"replag"), env.opts.autoescape);
output += "</b> on the wiki are not taken into account in the results below.<br>\n</div>\n";
output += "</b> on the wiki are not taken into account in the results below.<br>\r\n</div>\r\n";
;
}
output += "\n";
output += "\r\n";
if(parentTemplate) {
parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);
} else {
Expand Down
2 changes: 1 addition & 1 deletion quarry/web/static/templates/query-resultset.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% else %}
Resultset {{ resultset_number }}
{% endif %}
({{rowcount}} rows)
({{rowcount}} {% if rowcount == 1 %}row{% else %}rows{% endif %})
</div>
<div class='col-md-4'>
<div class="btn-group pull-right">
Expand Down
Loading