소스 검색

fix, call linkToPrometheus() directly

Mitsuhiro Tanda 10 년 전
부모
커밋
c1d592b72c
2개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      public/app/plugins/datasource/prometheus/partials/query.editor.html
  2. 0 2
      public/app/plugins/datasource/prometheus/query_ctrl.js

+ 1 - 1
public/app/plugins/datasource/prometheus/partials/query.editor.html

@@ -111,7 +111,7 @@
       </select>
     </li>
     <li class="tight-form-item">
-      <a href="{{target.prometheusLink}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
+      <a href="{{linkToPrometheus()}}" target="_blank" bs-tooltip="'Link to Graph in Prometheus'">
         <i class="fa fa-share-square-o"></i>
       </a>
     </li>

+ 0 - 2
public/app/plugins/datasource/prometheus/query_ctrl.js

@@ -14,7 +14,6 @@ function (angular, _) {
 
       target.expr = target.expr || '';
       target.intervalFactor = target.intervalFactor || 2;
-      target.prometheusLink = $scope.linkToPrometheus();
 
       $scope.metric = '';
       $scope.resolutions = _.map([1,2,3,4,5,10], function(f) {
@@ -28,7 +27,6 @@ function (angular, _) {
     };
 
     $scope.refreshMetricData = function() {
-      $scope.target.prometheusLink = $scope.linkToPrometheus();
       if (!_.isEqual($scope.oldTarget, $scope.target)) {
         $scope.oldTarget = angular.copy($scope.target);
         $scope.get_data();