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
c7febca4
Commit
c7febca4
authored
Feb 09, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mqe: fixes broken test for indexalias
parent
aa7292fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
pkg/tsdb/mqe/response_parser.go
+2
-1
pkg/tsdb/mqe/response_parser_test.go
+1
-1
No files found.
pkg/tsdb/mqe/response_parser.go
View file @
c7febca4
...
@@ -154,7 +154,8 @@ func (parser *ResponseParser) wildcardAlias(body MQEResponseSerie, queryToSend Q
...
@@ -154,7 +154,8 @@ func (parser *ResponseParser) wildcardAlias(body MQEResponseSerie, queryToSend Q
}
}
func
(
parser
*
ResponseParser
)
indexAlias
(
body
MQEResponseSerie
,
queryToSend
QueryToSend
)
string
{
func
(
parser
*
ResponseParser
)
indexAlias
(
body
MQEResponseSerie
,
queryToSend
QueryToSend
)
string
{
queryNameParts
:=
strings
.
Split
(
body
.
Name
,
`.`
)
queryNameParts
:=
strings
.
Split
(
queryToSend
.
Metric
.
Metric
,
`.`
)
name
:=
indexAliasPattern
.
ReplaceAllStringFunc
(
queryToSend
.
Metric
.
Alias
,
func
(
in
string
)
string
{
name
:=
indexAliasPattern
.
ReplaceAllStringFunc
(
queryToSend
.
Metric
.
Alias
,
func
(
in
string
)
string
{
positionName
:=
strings
.
TrimSpace
(
strings
.
Replace
(
in
,
"$"
,
""
,
1
))
positionName
:=
strings
.
TrimSpace
(
strings
.
Replace
(
in
,
"$"
,
""
,
1
))
...
...
pkg/tsdb/mqe/response_parser_test.go
View file @
c7febca4
...
@@ -75,7 +75,7 @@ func TestMQEResponseParser(t *testing.T) {
...
@@ -75,7 +75,7 @@ func TestMQEResponseParser(t *testing.T) {
AddClusterToAlias
:
true
,
AddClusterToAlias
:
true
,
AddHostToAlias
:
true
,
AddHostToAlias
:
true
,
},
},
Metric
:
Metric
{
Alias
:
"$2 $3"
},
Metric
:
Metric
{
Alias
:
"$2 $3"
,
Metric
:
"os.disk.sda3.weighted_io_time"
},
}
}
legend
:=
parser
.
formatLegend
(
serie
,
mqeSerie
,
queryRef
)
legend
:=
parser
.
formatLegend
(
serie
,
mqeSerie
,
queryRef
)
So
(
legend
,
ShouldEqual
,
"demoapp staples-lab-1 disk.sda3"
)
So
(
legend
,
ShouldEqual
,
"demoapp staples-lab-1 disk.sda3"
)
...
...
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