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
13f55bc5
Unverified
Commit
13f55bc5
authored
Aug 30, 2019
by
Ryan McKinley
Committed by
GitHub
Aug 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MixedDatasource: don't filter hidden queries before sending to datasources (#18814)
parent
1a4be4af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
public/app/plugins/datasource/mixed/datasource.ts
+12
-6
public/app/plugins/datasource/mixed/plugin.json
+1
-0
No files found.
public/app/plugins/datasource/mixed/datasource.ts
View file @
13f55bc5
...
...
@@ -17,17 +17,23 @@ class MixedDatasource extends DataSourceApi<DataQuery> {
return
Promise
.
resolve
([]);
}
const
filtered
=
_
.
filter
(
targets
,
(
t
:
DataQuery
)
=>
{
return
!
t
.
hide
;
});
if
(
filtered
.
length
===
0
)
{
if
(
targets
.
length
===
0
)
{
return
{
data
:
[]
};
}
return
this
.
datasourceSrv
.
get
(
dsName
).
then
(
ds
=>
{
// Remove any unused hidden queries
if
(
!
ds
.
meta
.
hiddenQueries
)
{
targets
=
_
.
filter
(
targets
,
(
t
:
DataQuery
)
=>
{
return
!
t
.
hide
;
});
if
(
targets
.
length
===
0
)
{
return
{
data
:
[]
};
}
}
const
opt
=
_
.
cloneDeep
(
options
);
opt
.
targets
=
filtered
;
opt
.
targets
=
targets
;
return
ds
.
query
(
opt
);
});
});
...
...
public/app/plugins/datasource/mixed/plugin.json
View file @
13f55bc5
...
...
@@ -6,6 +6,7 @@
"builtIn"
:
true
,
"mixed"
:
true
,
"metrics"
:
true
,
"hiddenQueries"
:
true
,
"queryOptions"
:
{
"minInterval"
:
true
...
...
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