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
522d40fa
Commit
522d40fa
authored
Oct 06, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(influxdb): support mulitple tags
parent
87650c15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
pkg/tsdb/influxdb/response_parser.go
+7
-5
No files found.
pkg/tsdb/influxdb/response_parser.go
View file @
522d40fa
...
@@ -3,6 +3,7 @@ package influxdb
...
@@ -3,6 +3,7 @@ package influxdb
import
(
import
(
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"strings"
"github.com/grafana/grafana/pkg/tsdb"
"github.com/grafana/grafana/pkg/tsdb"
"gopkg.in/guregu/null.v3"
"gopkg.in/guregu/null.v3"
...
@@ -45,17 +46,18 @@ func (rp *ResponseParser) parseResult(result []Row, queryResult *tsdb.QueryResul
...
@@ -45,17 +46,18 @@ func (rp *ResponseParser) parseResult(result []Row, queryResult *tsdb.QueryResul
}
}
func
(
rp
*
ResponseParser
)
formatName
(
row
Row
,
column
string
)
string
{
func
(
rp
*
ResponseParser
)
formatName
(
row
Row
,
column
string
)
string
{
tags
:=
""
var
tags
[]
string
for
k
,
v
:=
range
row
.
Tags
{
for
k
,
v
:=
range
row
.
Tags
{
tags
+=
k
+
": "
+
v
tags
=
append
(
tags
,
fmt
.
Sprintf
(
"%s: %s"
,
k
,
v
))
}
}
if
tags
!=
""
{
tagText
:=
""
tags
=
fmt
.
Sprintf
(
" { %s }"
,
tags
)
if
len
(
tags
)
>
0
{
tagText
=
fmt
.
Sprintf
(
" { %s }"
,
strings
.
Join
(
tags
,
" "
))
}
}
return
fmt
.
Sprintf
(
"%s.%s%s"
,
row
.
Name
,
column
,
tag
s
)
return
fmt
.
Sprintf
(
"%s.%s%s"
,
row
.
Name
,
column
,
tag
Text
)
}
}
func
(
rp
*
ResponseParser
)
parseTimepoint
(
k
[]
interface
{},
valuePosition
int
)
tsdb
.
TimePoint
{
func
(
rp
*
ResponseParser
)
parseTimepoint
(
k
[]
interface
{},
valuePosition
int
)
tsdb
.
TimePoint
{
...
...
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