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
494ac90c
Commit
494ac90c
authored
Aug 13, 2019
by
Šimon Podlipský
Committed by
Torkel Ödegaard
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QueryData: Handle that response data must be array (#18504)
Fixes #18499
parent
3ccc10f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
public/app/features/dashboard/state/PanelQueryState.ts
+7
-4
No files found.
public/app/features/dashboard/state/PanelQueryState.ts
View file @
494ac90c
// Libraries
// Libraries
import
isString
from
'lodash/isString'
;
import
{
isArray
,
isEqual
,
isString
}
from
'lodash'
;
import
isEqual
from
'lodash/isEqual'
;
// Utils & Services
// Utils & Services
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
...
@@ -123,6 +122,10 @@ export class PanelQueryState {
...
@@ -123,6 +122,10 @@ export class PanelQueryState {
return
ds
return
ds
.
query
(
this
.
request
,
this
.
dataStreamObserver
)
.
query
(
this
.
request
,
this
.
dataStreamObserver
)
.
then
(
resp
=>
{
.
then
(
resp
=>
{
if
(
!
isArray
(
resp
.
data
))
{
throw
new
Error
(
`Expected response data to be array, got
${
typeof
resp
.
data
}
.`
);
}
this
.
request
.
endTime
=
Date
.
now
();
this
.
request
.
endTime
=
Date
.
now
();
this
.
executor
=
null
;
this
.
executor
=
null
;
...
@@ -349,8 +352,8 @@ function translateToLegacyData(data: DataQueryResponseData) {
...
@@ -349,8 +352,8 @@ function translateToLegacyData(data: DataQueryResponseData) {
*
*
* This is also used by PanelChrome for snapshot support
* This is also used by PanelChrome for snapshot support
*/
*/
export
function
getProcessedDataFrames
(
results
?:
any
[]):
DataFrame
[]
{
export
function
getProcessedDataFrames
(
results
?:
DataQueryResponseData
[]):
DataFrame
[]
{
if
(
!
results
)
{
if
(
!
isArray
(
results
)
)
{
return
[];
return
[];
}
}
...
...
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