Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ff870e08
Unverified
Commit
ff870e08
authored
Apr 22, 2019
by
Ryan McKinley
Committed by
GitHub
Apr 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PanelQueryRunner: add datasource name to queries (#16712)
parent
db584b3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
public/app/features/dashboard/state/PanelQueryRunner.ts
+8
-0
No files found.
public/app/features/dashboard/state/PanelQueryRunner.ts
View file @
ff870e08
...
@@ -133,6 +133,14 @@ export class PanelQueryRunner {
...
@@ -133,6 +133,14 @@ export class PanelQueryRunner {
?
(
datasource
as
DataSourceApi
)
?
(
datasource
as
DataSourceApi
)
:
await
getDatasourceSrv
().
get
(
datasource
as
string
,
request
.
scopedVars
);
:
await
getDatasourceSrv
().
get
(
datasource
as
string
,
request
.
scopedVars
);
// Attach the datasource name to each query
request
.
targets
=
request
.
targets
.
map
(
query
=>
{
if
(
!
query
.
datasource
)
{
query
.
datasource
=
ds
.
name
;
}
return
query
;
});
const
lowerIntervalLimit
=
minInterval
?
templateSrv
.
replace
(
minInterval
,
request
.
scopedVars
)
:
ds
.
interval
;
const
lowerIntervalLimit
=
minInterval
?
templateSrv
.
replace
(
minInterval
,
request
.
scopedVars
)
:
ds
.
interval
;
const
norm
=
kbn
.
calculateInterval
(
timeRange
,
widthPixels
,
lowerIntervalLimit
);
const
norm
=
kbn
.
calculateInterval
(
timeRange
,
widthPixels
,
lowerIntervalLimit
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment