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
299a2457
Commit
299a2457
authored
Oct 29, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:grafana/grafana
parents
3de4707c
603ec65e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
public/app/plugins/datasource/cloudwatch/datasource.js
+5
-5
No files found.
public/app/plugins/datasource/cloudwatch/datasource.js
View file @
299a2457
...
...
@@ -34,7 +34,7 @@ function (angular, _) {
query
.
region
=
templateSrv
.
replace
(
target
.
region
,
options
.
scopedVars
);
query
.
namespace
=
templateSrv
.
replace
(
target
.
namespace
,
options
.
scopedVars
);
query
.
metricName
=
templateSrv
.
replace
(
target
.
metricName
,
options
.
scopedVars
);
query
.
dimensions
=
convertDimensionFormat
(
target
.
dimensions
);
query
.
dimensions
=
convertDimensionFormat
(
target
.
dimensions
,
options
.
scopedVars
);
query
.
statistics
=
target
.
statistics
;
query
.
period
=
parseInt
(
target
.
period
,
10
);
...
...
@@ -119,7 +119,7 @@ function (angular, _) {
parameters
:
{
namespace
:
templateSrv
.
replace
(
namespace
),
metricName
:
templateSrv
.
replace
(
metricName
),
dimensions
:
convertDimensionFormat
(
dimensions
),
dimensions
:
convertDimensionFormat
(
dimensions
,
{}
),
}
};
...
...
@@ -276,11 +276,11 @@ function (angular, _) {
return
Math
.
round
(
date
.
valueOf
()
/
1000
);
}
function
convertDimensionFormat
(
dimensions
)
{
function
convertDimensionFormat
(
dimensions
,
scopedVars
)
{
return
_
.
map
(
dimensions
,
function
(
value
,
key
)
{
return
{
Name
:
templateSrv
.
replace
(
key
),
Value
:
templateSrv
.
replace
(
value
)
Name
:
templateSrv
.
replace
(
key
,
scopedVars
),
Value
:
templateSrv
.
replace
(
value
,
scopedVars
)
};
});
}
...
...
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