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
3f574d3e
Unverified
Commit
3f574d3e
authored
Mar 11, 2019
by
Torkel Ödegaard
Committed by
GitHub
Mar 11, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15685 from utkarshcmu/fix-#15562
Fixed alias in Cloudwatch Expressions
parents
a6e5e777
37033080
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
pkg/tsdb/cloudwatch/cloudwatch.go
+4
-3
No files found.
pkg/tsdb/cloudwatch/cloudwatch.go
View file @
3f574d3e
...
...
@@ -496,9 +496,6 @@ func parseQuery(model *simplejson.Json) (*CloudWatchQuery, error) {
}
alias
:=
model
.
Get
(
"alias"
)
.
MustString
()
if
alias
==
""
{
alias
=
"{{metric}}_{{stat}}"
}
returnData
:=
model
.
Get
(
"returnData"
)
.
MustBool
(
false
)
highResolution
:=
model
.
Get
(
"highResolution"
)
.
MustBool
(
false
)
...
...
@@ -521,8 +518,12 @@ func parseQuery(model *simplejson.Json) (*CloudWatchQuery, error) {
func
formatAlias
(
query
*
CloudWatchQuery
,
stat
string
,
dimensions
map
[
string
]
string
)
string
{
if
len
(
query
.
Id
)
>
0
&&
len
(
query
.
Expression
)
>
0
{
if
len
(
query
.
Alias
)
>
0
{
return
query
.
Alias
}
else
{
return
query
.
Id
}
}
data
:=
map
[
string
]
string
{}
data
[
"region"
]
=
query
.
Region
...
...
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