climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skhud...@apache.org
Subject svn commit: r1499516 - in /incubator/climate/trunk/rcmet/src/main/ui/app: index.html js/controllers/ParameterSelectCtrl.js js/controllers/ResultCtrl.js results.html
Date Wed, 03 Jul 2013 19:03:36 GMT
Author: skhudiky
Date: Wed Jul  3 19:03:35 2013
New Revision: 1499516

URL: http://svn.apache.org/r1499516
Log:
CLIMATE-172- step one to move to a separate result page

Add results.html and ResultCtrl.js to get list of images in directory and display on results
page

index.html - remove modal for evaluation results

ParameterSelectCtrl.js - redirect window to result page once evaluation is complete

Added:
    incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ResultCtrl.js
    incubator/climate/trunk/rcmet/src/main/ui/app/results.html   (with props)
Modified:
    incubator/climate/trunk/rcmet/src/main/ui/app/index.html
    incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.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=1499516&r1=1499515&r2=1499516&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/index.html (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/index.html Wed Jul  3 19:03:35 2013
@@ -48,33 +48,6 @@
 	</div>
   </bootstrap-modal>
 
-  <bootstrap-modal modal-id="evaluationResults">
-  <div class="modal-header">
-  	<button class="close">&times;</button>
-  	<h3>Evaluation Results</h3>
-  </div>
-  <div class="modal-body">
-	  <p>
-	  Comparison: <a href="{{baseURL}}/static/evalResults/{{evalResults.comparisonPath}}">
-		  {{evalResults.comparisonPath}}</a>
-	  </p>
-	  <p>
-	  Model: <a href="{{baseURL}}/static/evalResults/{{evalResults.modelPath}}">
-		  {{evalResults.modelPath}}</a>
-	  </p>
-	  <p>
-	  Observation: <a href="{{baseURL}}/static/evalResults/{{evalResults.obsPath}}">
-		  {{evalResults.obsPath}}</a>
-	  </p>
-	  <p><img src="{{baseURL}}/static/evalResults/{{evalResults.comparisonPath}}" alt=""
/></p>
-	  <p><img src="{{baseURL}}/static/evalResults/{{evalResults.modelPath}}" alt=""
/></p>
-	  <p><img src="{{baseURL}}/static/evalResults/{{evalResults.obsPath}}" alt="" /></p>
-  </div>
-  <div class="modal-footer">
-	  <a href="#" class="btn btn-primary close">Close</a>
-  </div>
-  </bootstrap-modal>
-
   <bootstrap-modal modal-id="evaluationSettings">
   <div class="modal-header">
   	<button class="close">&times;</button>

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js?rev=1499516&r1=1499515&r2=1499516&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ParameterSelectCtrl.js Wed
Jul  3 19:03:35 2013
@@ -163,7 +163,7 @@ function($rootScope, $scope, $http, $tim
 			$scope.runningEval = false;
 
 			$timeout(function() {
-				$('#evaluationResults').trigger('modalOpen', true, true);
+				window.location = "/app/results.html";
 			}, 100);
 		}).error(function() {
 			$scope.runningEval = false;

Added: incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ResultCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ResultCtrl.js?rev=1499516&view=auto
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ResultCtrl.js (added)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/controllers/ResultCtrl.js Wed Jul  3
19:03:35 2013
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http: *www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+**/
+
+// Controller for result page
+App.Controllers.controller('ResultCtrl', ['$rootScope', '$scope', '$http',
+function($rootScope, $scope, $http) {
+
+	// Grab all figures 
+	$scope.figures = [];
+	$http.jsonp($rootScope.baseURL + '/getResultDirInfo?callback=JSON_CALLBACK').
+		success(function(data) {
+			$scope.figures = data;
+	});
+}]);

Added: incubator/climate/trunk/rcmet/src/main/ui/app/results.html
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/results.html?rev=1499516&view=auto
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/results.html (added)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/results.html Wed Jul  3 19:03:35 2013
@@ -0,0 +1,67 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements.  See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership.  The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License.  You may obtain a copy of the License at
+ ~
+ ~    http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied.  See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<!doctype html>
+<html lang="en" ng-app="ocw" ng-controller="ResultCtrl">
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>OCW UI - Results</title>
+  <link rel="stylesheet" href="css/lib/bootstrap.min.css"/>
+  <link rel="stylesheet" href="css/lib/bootstrap-responsive.min.css"/>
+  <link rel="stylesheet" href="css/lib/font-awesome.min.css"/>
+  <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/ui-lightness/jquery-ui.min.css"
type="text/css"/> 
+  <!--[if lte IE 8]>
+    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css"
/>
+  <![endif]-->
+  <link rel="stylesheet" href="css/app.css"/>
+</head>
+<body>
+
+<div class="container-fluid">
+	<div class="row-fluid">
+	  <div class="row span12 text-center">
+	    <h2>Apache Open Climate Workbench UI - Results</h2>
+	    <hr />
+	  </div>
+	  <div class="row-fluid text-center">
+	  <ul>
+	  	<li ng-repeat="figure in figures">
+	  	<img src="{{baseURL}}/static/evalResults{{figure}}" alt="" />
+	  	</li>
+	  </ul>
+	  </div>
+	</div>
+</div>
+
+  <!--Libraries-->
+  <script src="js/lib/jquery/jquery-1.10.1.js"></script>
+  <script src="js/lib/jquery/jquery-ui/jquery-ui-1.10.3.min.js"></script>
+  <script src="js/lib/angular/angular.js"></script>
+  <script src="js/lib/jquery/jquery-ui/datepicker-wrapper/date.js"></script>
+  <script src="js/lib/bootstrap/bootstrap.js"></script>
+  
+  <!--General-->
+  <script src="js/app.js"></script>
+
+  <!--Controllers-->
+  <script src="js/controllers/ResultCtrl.js"></script>
+
+</body>
+</html>

Propchange: incubator/climate/trunk/rcmet/src/main/ui/app/results.html
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message