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
c3900398
Commit
c3900398
authored
Oct 28, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #917 from mchataigner/master
adding templating in opentsdb graphs
parents
4b79a5e9
482b3129
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/app/services/opentsdb/opentsdbDatasource.js
+10
-4
No files found.
src/app/services/opentsdb/opentsdbDatasource.js
View file @
c3900398
define
([
'angular'
,
'lodash'
,
'kbn'
'kbn'
,
'moment'
],
function
(
angular
,
_
,
kbn
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
factory
(
'OpenTSDBDatasource'
,
function
(
$q
,
$http
)
{
module
.
factory
(
'OpenTSDBDatasource'
,
function
(
$q
,
$http
,
templateSrv
)
{
function
OpenTSDBDatasource
(
datasource
)
{
this
.
type
=
'opentsdb'
;
...
...
@@ -123,12 +124,12 @@ function (angular, _, kbn) {
}
var
query
=
{
metric
:
t
arget
.
metric
,
metric
:
t
emplateSrv
.
replace
(
target
.
metric
)
,
aggregator
:
"avg"
};
if
(
target
.
aggregator
)
{
query
.
aggregator
=
t
arget
.
aggregator
;
query
.
aggregator
=
t
emplateSrv
.
replace
(
target
.
aggregator
)
;
}
if
(
target
.
shouldComputeRate
)
{
...
...
@@ -151,6 +152,11 @@ function (angular, _, kbn) {
}
query
.
tags
=
angular
.
copy
(
target
.
tags
);
if
(
query
.
tags
){
for
(
var
key
in
query
.
tags
){
query
.
tags
[
key
]
=
templateSrv
.
replace
(
query
.
tags
[
key
]);
}
}
return
query
;
}
...
...
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