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
85b0df55
Commit
85b0df55
authored
Mar 21, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor refactoring of testdata query order PR #16122
parent
c91e5a2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
public/app/plugins/datasource/testdata/datasource.ts
+10
-16
No files found.
public/app/plugins/datasource/testdata/datasource.ts
View file @
85b0df55
...
...
@@ -51,25 +51,19 @@ export class TestDataDatasource implements DataSourceApi<TestDataQuery> {
// Returns data in the order it was asked for.
// if the response has data with different refId, it is ignored
for
(
let
i
=
0
;
i
<
queries
.
length
;
i
++
)
{
const
query
=
queries
[
i
];
for
(
const
query
of
queries
)
{
const
results
=
res
.
data
.
results
[
query
.
refId
];
if
(
results
)
{
if
(
results
.
tables
)
{
for
(
const
table
of
results
.
tables
)
{
data
.
push
(
table
as
TableData
);
}
}
if
(
results
.
series
)
{
for
(
const
series
of
results
.
series
)
{
data
.
push
({
target
:
series
.
name
,
datapoints
:
series
.
points
,
});
if
(
!
results
)
{
console
.
warn
(
'No Results for:'
,
query
);
continue
;
}
for
(
const
table
of
results
.
tables
||
[])
{
data
.
push
(
table
as
TableData
);
}
}
else
{
console
.
warn
(
'No Results for:'
,
query
);
for
(
const
series
of
results
.
series
||
[])
{
data
.
push
({
target
:
series
.
name
,
datapoints
:
series
.
points
});
}
}
...
...
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