fix, call linkToPrometheus() directly

This commit is contained in:
Mitsuhiro Tanda 2015-10-23 09:58:42 +09:00
parent fcaecf4782
commit c1d592b72c
2 changed files with 1 additions and 3 deletions

View File

@ -111,7 +111,7 @@
</select> </select>
</li> </li>
<li class="tight-form-item"> <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> <i class="fa fa-share-square-o"></i>
</a> </a>
</li> </li>

View File

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