climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1487113 - in /incubator/climate/trunk/rcmet/src/main/ui/app: index.html js/app.js js/controllers.js
Date Tue, 28 May 2013 20:52:15 GMT
Author: joyce
Date: Tue May 28 20:52:15 2013
New Revision: 1487113

URL: http://svn.apache.org/r1487113
Log:
Resolves CLIMATE-60 - Add and wire-in SettingsCtrl.

- Changes the formatting for the evaluationSettings object for easier
  display.
- Adds SettingsCtrl that binds a local variable to the evaluation
  settings object.
- Updates settings modal in index.html to display the metrics.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/app/index.html
    incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js
    incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/index.html
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/index.html?rev=1487113&r1=1487112&r2=1487113&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/index.html (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/index.html Tue May 28 20:52:15 2013
@@ -61,7 +61,11 @@
   	<button class="close">&times;</button>
   	<h3>Settings</h3>
   </div>
-  <div class="modal-body">
+  <div class="modal-body" ng-controller="SettingsCtrl">
+    <h4>Select the metrics you would like to run.</h4>
+    <div ng-repeat="metric in settings.metrics">
+      <label><input type="checkbox" ng-model="metric.select"> {{metric.name}}</label>
+    </div>
   </div>
   <div class="modal-footer">
 	  <a href="#" class="btn btn-primary close">Close</a>

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js?rev=1487113&r1=1487112&r2=1487113&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/app.js Tue May 28 20:52:15 2013
@@ -57,10 +57,10 @@ angular.module('rcmes', []).
     }).
 	service('evaluationSettings', function() {
 		var settings = {
-			'metrics': {
-				'bias': true,
-				'mean difference': false,
-			},
+			'metrics': [ 
+				{'name': 'bias', 'select': true},
+				{'name': 'mean difference', 'select': false},
+			],
 		};
 
 		return {

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js?rev=1487113&r1=1487112&r2=1487113&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers.js Tue May 28 20:52:15 2013
@@ -576,3 +576,7 @@ function RcmedSelectionCtrl($rootScope, 
 	// Grab the available observations from RCMED
 	getObservations();
 }
+
+function SettingsCtrl($scope, evaluationSettings) {
+	$scope.settings = evaluationSettings.getSettings();
+}



Mime
View raw message