File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
public/app/plugins/datasource/prometheus Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function (angular, _) {
7
7
8
8
var module = angular . module ( 'grafana.controllers' ) ;
9
9
10
- module . controller ( 'PrometheusQueryCtrl' , function ( $scope ) {
10
+ module . controller ( 'PrometheusQueryCtrl' , function ( $scope , templateSrv ) {
11
11
12
12
$scope . init = function ( ) {
13
13
var target = $scope . target ;
@@ -46,9 +46,9 @@ function (angular, _) {
46
46
47
47
$scope . linkToPrometheus = function ( ) {
48
48
var range = Math . ceil ( ( $scope . range . to . valueOf ( ) - $scope . range . from . valueOf ( ) ) / 1000 ) ;
49
- var endTime = $scope . range . to . utc ( ) . format ( 'YYYY-MM-DD HH:MM ' ) ;
49
+ var endTime = $scope . range . to . utc ( ) . format ( 'YYYY-MM-DD HH:mm ' ) ;
50
50
var expr = {
51
- expr : $scope . target . expr ,
51
+ expr : templateSrv . replace ( $scope . target . expr , $scope . panel . scopedVars ) ,
52
52
range_input : range + 's' ,
53
53
end_input : endTime ,
54
54
step_input : '' ,
You can’t perform that action at this time.
0 commit comments