Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions src/templates/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
query: query,
// todo: added default
name: opts.name || '',
label: opts.name || '',
datasource: opts.datasource,
type: 'query',
includeAll: true,
Expand All @@ -70,6 +71,7 @@
'refresh',
'regex',
'tag',
"label",

Check failure on line 74 in src/templates/query.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `"label"` with `'label'`

Check failure on line 74 in src/templates/query.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Replace `"label"` with `'label'`

Check failure on line 74 in src/templates/query.ts

View workflow job for this annotation

GitHub Actions / build (24.x)

Replace `"label"` with `'label'`
];

// Override overridable values
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/templates/override_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const overrideQueryTemplate: GrafanaQueryTemplate = {
type: 'query',
query: 'stats.*',
name: 'template',
label: 'template label',
datasource: 'datasource',
options: [],
current: {},
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/templates/simple_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const simpleQueryTemplate: GrafanaQueryTemplate = {
type: 'query',
query: 'servers.*',
name: 'foo',
label: 'foo',
datasource: 'default',
options: [],
current: {},
Expand Down
1 change: 1 addition & 0 deletions test/templates/query.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test('Query template state cannot be mutated after init', function () {
test('Query template state overridden on init', function () {
var template = new Query('stats.*', {
name: 'template',
label: 'template label',
datasource: 'datasource',
includeAll: false,
allFormat: 'glob',
Expand Down
Loading