diff --git a/grafonnet/template.libsonnet b/grafonnet/template.libsonnet index f46f282f..afc22cdf 100644 --- a/grafonnet/template.libsonnet +++ b/grafonnet/template.libsonnet @@ -12,6 +12,7 @@ refresh='never', includeAll=false, multi=false, + sort=0, ):: { allValue: allValues, @@ -26,7 +27,7 @@ query: query, refresh: $.refresh(refresh), regex: regex, - sort: 0, + sort: sort, tagValuesQuery: tagValuesQuery, tags: [], tagsQuery: '', diff --git a/tests/template/query.jsonnet b/tests/template/query.jsonnet index 8e8e8792..6147ecc7 100644 --- a/tests/template/query.jsonnet +++ b/tests/template/query.jsonnet @@ -14,6 +14,7 @@ local template = grafana.template; current='bar', hide='value', includeAll=true, + sort=2, multi=true, ), refresh: [ diff --git a/tests/template/query_compiled.json b/tests/template/query_compiled.json index 4b3df81f..bb4d6ad4 100644 --- a/tests/template/query_compiled.json +++ b/tests/template/query_compiled.json @@ -15,7 +15,7 @@ "query": "newtest-query", "refresh": 0, "regex": "([a-z+])", - "sort": 0, + "sort": 2, "tagValuesQuery": "tvquery", "tags": [ ], "tagsQuery": "",