Parcourir la source

fix, call linkToPrometheus() directly

Mitsuhiro Tanda il y a 10 ans
Parent
commit
c1d592b72c

+ 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();