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
189f89a9
Commit
189f89a9
authored
Sep 28, 2018
by
Erik Sundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stackdriver: add support for bool values
parent
220f479f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
pkg/tsdb/stackdriver/stackdriver.go
+9
-0
No files found.
pkg/tsdb/stackdriver/stackdriver.go
View file @
189f89a9
...
...
@@ -306,6 +306,7 @@ func (e *StackdriverExecutor) parseResponse(queryRes *tsdb.QueryResult, data Sta
for
i
:=
len
(
series
.
Points
)
-
1
;
i
>=
0
;
i
--
{
point
:=
series
.
Points
[
i
]
value
:=
point
.
Value
.
DoubleValue
if
series
.
ValueType
==
"INT64"
{
parsedValue
,
err
:=
strconv
.
ParseFloat
(
point
.
Value
.
IntValue
,
64
)
if
err
==
nil
{
...
...
@@ -313,6 +314,14 @@ func (e *StackdriverExecutor) parseResponse(queryRes *tsdb.QueryResult, data Sta
}
}
if
series
.
ValueType
==
"BOOL"
{
if
point
.
Value
.
BoolValue
{
value
=
1
}
else
{
value
=
0
}
}
points
=
append
(
points
,
tsdb
.
NewTimePoint
(
null
.
FloatFrom
(
value
),
float64
((
point
.
Interval
.
EndTime
)
.
Unix
())
*
1000
))
}
...
...
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