Skip to content
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ the containers with the new dependencies by running `docker-compose build` befor
## Useful commands ##

To pre-compile nunjucks templates:
`nunjucks-precompile quarry/web/static/templates/ > quarry/web/static/templates/compiled.js`
`npm run build`

See also commands listed in the mainters documentation:
https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Quarry
Expand Down
4 changes: 2 additions & 2 deletions helm-quarry/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
web:
repository: 'quay.io/wikimedia-quarry/quarry'
tag: pr-86 # web tag managed by github actions
tag: pr-88 # web tag managed by github actions
resources:
requests:
memory: "300Mi"
Expand All @@ -11,7 +11,7 @@ web:

worker:
repository: 'quay.io/wikimedia-quarry/quarry'
tag: pr-86 # worker tag managed by github actions
tag: pr-88 # worker tag managed by github actions
resources:
requests:
memory: "400Mi"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"private": true,
"scripts": {
"test": "eslint quarry/web/static/js/"
"test": "eslint quarry/web/static/js/",
"build": "nunjucks-precompile quarry/web/static/templates/ > quarry/web/static/templates/compiled.js"
},
"devDependencies": {
"eslint": "5.6.0",
Expand Down
19 changes: 9 additions & 10 deletions quarry/web/static/templates/compiled.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["query-resultset.html"] = (function() {
function root(env, context, frame, runtime, cb) {
var lineno = 0;
var colno = 0;
var lineno = null;
var colno = null;
var output = "";
try {
var parentTemplate = null;
Expand All @@ -21,15 +21,14 @@ output += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "ro
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 ";
frame = frame.push();
var t_3 = {"tsv": "TSV","json": "JSON","json-lines": "JSON Lines","csv": "CSV","wikitable": "Wikitable","html": "HTML"};
if(t_3) {t_3 = runtime.fromIterator(t_3);
var t_1;
if(t_3) {var t_1;
if(runtime.isArray(t_3)) {
var t_2 = t_3.length;
for(t_1=0; t_1 < t_3.length; t_1++) {
var t_4 = t_3[t_1][0];
frame.set("[object Object]", t_3[t_1][0]);
var t_5 = t_3[t_1][1];
frame.set("[object Object]", t_3[t_1][1]);
var t_4 = t_3[t_1][0]
frame.set("format", t_3[t_1][0]);
var t_5 = t_3[t_1][1]
frame.set("formatname", t_3[t_1][1]);
frame.set("loop.index", t_1 + 1);
frame.set("loop.index0", t_1);
frame.set("loop.revindex", t_2 - t_1);
Expand Down Expand Up @@ -112,8 +111,8 @@ root: root
})();
(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["query-status.html"] = (function() {
function root(env, context, frame, runtime, cb) {
var lineno = 0;
var colno = 0;
var lineno = null;
var colno = null;
var output = "";
try {
var parentTemplate = null;
Expand Down