forked from jakubplichta/grafana-dashboard-builder
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds alias field to the Elastic target datasource (#18)
* add uid * Fixes Grafana exporter tests * Adds alias field to the elastic target * Adds elastic target component test with alias * Adds alias field to the elastic sample
- Loading branch information
Showing
5 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/grafana_dashboards/components/elastic-target/full_with_alias.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"query": "(status: 'succeeded')", | ||
"alias": "Alias", | ||
"bucketAggs": [ | ||
{ | ||
"field": "finishedAt", | ||
"id": "2", | ||
"settings": { | ||
"interval": "auto", | ||
"min_doc_count": 1, | ||
"trimEdges": 0 | ||
}, | ||
"type": "date_histogram" | ||
} | ||
], | ||
"hide": false, | ||
"metrics": [ | ||
{ | ||
"field": "select metric", | ||
"id": "1", | ||
"type": "count" | ||
} | ||
], | ||
"refId": "A", | ||
"timeField": "finishedAt", | ||
"datasource": "default" | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/grafana_dashboards/components/elastic-target/full_with_alias.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
elastic-target: | ||
query: "(status: 'succeeded')" | ||
alias: "Alias" | ||
bucketAggs: | ||
- field: finishedAt | ||
type: date_histogram | ||
id: "2" | ||
settings: | ||
interval: 'auto' | ||
min_doc_count: 1 | ||
trimEdges: 0 | ||
hide: false | ||
metrics: | ||
- field: "select metric" | ||
id: "1" | ||
type: count | ||
refId: "A" | ||
timeField: finishedAt | ||
datasource: default |