Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Add 'sort' parameter to query template.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz committed Oct 13, 2018
1 parent 64147da commit 7c5e0bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion grafonnet/template.libsonnet
Expand Up @@ -12,6 +12,7 @@
refresh='never',
includeAll=false,
multi=false,
sort=0,
)::
{
allValue: allValues,
Expand All @@ -26,7 +27,7 @@
query: query,
refresh: $.refresh(refresh),
regex: regex,
sort: 0,
sort: sort,
tagValuesQuery: tagValuesQuery,
tags: [],
tagsQuery: '',
Expand Down
1 change: 1 addition & 0 deletions tests/template/query.jsonnet
Expand Up @@ -14,6 +14,7 @@ local template = grafana.template;
current='bar',
hide='value',
includeAll=true,
sort=2,
multi=true,
),
refresh: [
Expand Down
2 changes: 1 addition & 1 deletion tests/template/query_compiled.json
Expand Up @@ -15,7 +15,7 @@
"query": "newtest-query",
"refresh": 0,
"regex": "([a-z+])",
"sort": 0,
"sort": 2,
"tagValuesQuery": "tvquery",
"tags": [ ],
"tagsQuery": "",
Expand Down

0 comments on commit 7c5e0bc

Please sign in to comment.