You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by le...@apache.org on 2018/01/17 02:03:02 UTC
[1/3] climate git commit: CLIMATE-374 UI runEvaluation doesnt use
$window or $location for results transition
Repository: climate
Updated Branches:
refs/heads/master 59dbe805b -> a9fbf74d5
CLIMATE-374 UI runEvaluation doesnt use $window or $location for results transition
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/c7c1aeb5
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/c7c1aeb5
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/c7c1aeb5
Branch: refs/heads/master
Commit: c7c1aeb5a13d0edfaab43c4a038f34f47baac599
Parents: 4cf79f3
Author: Michael Anderson <mi...@Michaels-iMac.local>
Authored: Sun Jan 7 13:57:48 2018 -0500
Committer: Michael Anderson <mi...@Michaels-iMac.local>
Committed: Sun Jan 7 13:57:48 2018 -0500
----------------------------------------------------------------------
.../app/scripts/controllers/parameterselect.js | 38 ++++++++++----------
1 file changed, 18 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/c7c1aeb5/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
index cad97e0..565b054 100644
--- a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
+++ b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
@@ -27,9 +27,9 @@
* Controller of the ocwUiApp
*/
angular.module('ocwUiApp')
-.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout',
- 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
- function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
+.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout', '$location',
+ 'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
+ function($rootScope, $scope, $http, $timeout, $location, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
$scope.datasets = selectedDatasetInformation.getDatasets();
// The min/max lat/lon values from the selected datasets
@@ -145,6 +145,8 @@ angular.module('ocwUiApp')
data['temporal_resolution'] = 30;
}
+ data['temporal_resolution_type'] = temporal_res;
+
// Load the Metrics for the evaluation
data['metrics'] = []
var metrics = settings.metrics
@@ -164,21 +166,17 @@ angular.module('ocwUiApp')
data['lon_min'] = $scope.displayParams.lonMin,
data['lon_max'] = $scope.displayParams.lonMax,
- $http.post($rootScope.baseURL + '/processing/run_evaluation/', data).
- success(function(data) {
- var evalWorkDir = data['eval_work_dir'];
+ $http.post(`${$rootScope.baseURL}/processing/run_evaluation/`, data).
+ success((data) => {
+ const evalWorkDir = data.eval_work_dir;
$scope.runningEval = false;
- $timeout(function() {
- if (evalWorkDir !== undefined) {
- window.location = "#/results/" + evalWorkDir;
- } else {
- window.location = "#/results";
- }
+ $timeout(() => {
+ let url = (evalWorkDir) ? `/results/${evalWorkDir}` : '/results';
+ $location.url(url)
}, 100);
-
- }).error(function() {
+ }).error(() => {
$scope.runningEval = false;
});
};
@@ -192,13 +190,13 @@ angular.module('ocwUiApp')
if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax))
$scope.displayParams.latMax = $scope.latMax;
- if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
+ if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
$scope.displayParams.lonMin = $scope.lonMin;
- if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
+ if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
$scope.displayParams.lonMax = $scope.lonMax;
- if ($scope.displayParams.start < $scope.start)
+ if ($scope.displayParams.start < $scope.start)
$scope.displayParams.start = $scope.start;
if ($scope.displayParams.end > $scope.end)
@@ -213,8 +211,8 @@ angular.module('ocwUiApp')
$rootScope.$broadcast('redrawOverlays', []);
}
- $scope.unwatchDatasets = $scope.$watch('datasets',
- function() {
+ $scope.unwatchDatasets = $scope.$watch('datasets',
+ function() {
var numDatasets = $scope.datasets.length;
$scope.displayParams.areValid = false;
$scope.areInUserRegridState = false;
@@ -230,7 +228,7 @@ angular.module('ocwUiApp')
// Get the valid lat/lon range in the selected datasets.
for (var i = 0; i < numDatasets; i++) {
var curDataset = $scope.datasets[i];
-
+
latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;
[3/3] climate git commit: Merge branch 'CLIMATE-374' of
https://github.com/MichaelArthurAnderson/climate
Posted by le...@apache.org.
Merge branch 'CLIMATE-374' of https://github.com/MichaelArthurAnderson/climate
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/a9fbf74d
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/a9fbf74d
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/a9fbf74d
Branch: refs/heads/master
Commit: a9fbf74d5722db3e55df8f14eec6846707fbbe97
Parents: 59dbe80 4a64b62
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Tue Jan 16 18:02:57 2018 -0800
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Tue Jan 16 18:02:57 2018 -0800
----------------------------------------------------------------------
.../app/scripts/controllers/parameterselect.js | 28 +++++++++-----------
1 file changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
[2/3] climate git commit: CLIMATE-374 UI runEvaluation doesnt use
$window or $location for results transition
Posted by le...@apache.org.
CLIMATE-374 UI runEvaluation doesnt use $window or $location for results transition
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/4a64b62b
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/4a64b62b
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/4a64b62b
Branch: refs/heads/master
Commit: 4a64b62bb73ee4d12448833b67e06ca4becf0528
Parents: c7c1aeb
Author: Michael Anderson <mi...@Michaels-iMac.local>
Authored: Sun Jan 7 16:09:59 2018 -0500
Committer: Michael Anderson <mi...@Michaels-iMac.local>
Committed: Sun Jan 7 16:09:59 2018 -0500
----------------------------------------------------------------------
.../frontend/app/scripts/controllers/parameterselect.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/4a64b62b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
index 565b054..a2554f4 100644
--- a/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
+++ b/ocw-ui/frontend/app/scripts/controllers/parameterselect.js
@@ -166,17 +166,17 @@ angular.module('ocwUiApp')
data['lon_min'] = $scope.displayParams.lonMin,
data['lon_max'] = $scope.displayParams.lonMax,
- $http.post(`${$rootScope.baseURL}/processing/run_evaluation/`, data).
- success((data) => {
- const evalWorkDir = data.eval_work_dir;
+ $http.post($rootScope.baseURL + '/processing/run_evaluation/', data).
+ success(function(data) {
+ var evalWorkDir = data['eval_work_dir'];
$scope.runningEval = false;
- $timeout(() => {
- let url = (evalWorkDir) ? `/results/${evalWorkDir}` : '/results';
+ $timeout(function() {
+ var url = (evalWorkDir) ? '/results/' + evalWorkDir : '/results';
$location.url(url)
}, 100);
- }).error(() => {
+ }).error(function() {
$scope.runningEval = false;
});
};