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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
public/app/plugins/datasource/testdata/datasource.ts
+11
-17
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
,
});
}
}
}
else
{
if
(
!
results
)
{
console
.
warn
(
'No Results for:'
,
query
);
continue
;
}
for
(
const
table
of
results
.
tables
||
[])
{
data
.
push
(
table
as
TableData
);
}
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