diff --git a/rd_ui/app/scripts/controllers/dashboard.js b/rd_ui/app/scripts/controllers/dashboard.js index 811313147b..08ab3e1ea0 100644 --- a/rd_ui/app/scripts/controllers/dashboard.js +++ b/rd_ui/app/scripts/controllers/dashboard.js @@ -129,7 +129,8 @@ $scope.query = $scope.widget.getQuery(); var parameters = Query.collectParamsFromQueryString($location, $scope.query); - $scope.queryResult = $scope.query.getQueryResult(undefined, parameters); + var maxAge = $location.search()['maxAge']; + $scope.queryResult = $scope.query.getQueryResult(maxAge, parameters); $scope.nextUpdateTime = moment(new Date(($scope.query.updated_at + $scope.query.ttl + $scope.query.runtime + 300) * 1000)).fromNow(); $scope.type = 'visualization'; diff --git a/rd_ui/app/scripts/controllers/query_view.js b/rd_ui/app/scripts/controllers/query_view.js index 47d1165bf6..5ce8a22da0 100644 --- a/rd_ui/app/scripts/controllers/query_view.js +++ b/rd_ui/app/scripts/controllers/query_view.js @@ -7,6 +7,9 @@ var getQueryResult = function(ttl) { // Collect params, and getQueryResult with params; getQueryResult merges it into the query var parameters = Query.collectParamsFromQueryString($location, $scope.query); + if (ttl == undefined) { + ttl = $location.search()['maxAge']; + } $scope.queryResult = $scope.query.getQueryResult(ttl, parameters); }