You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by om...@apache.org on 2016/11/15 13:26:40 UTC

[2/3] climate git commit: CLIMATE-886 Upgrading frontend dependencies

CLIMATE-886 Upgrading frontend dependencies


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/67de19c6
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/67de19c6
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/67de19c6

Branch: refs/heads/master
Commit: 67de19c68e8dc8966bb3e0e499d992e835f43afd
Parents: 253b997
Author: Omkar20895 <om...@gmail.com>
Authored: Tue Nov 15 18:24:27 2016 +0530
Committer: Omkar20895 <om...@gmail.com>
Committed: Tue Nov 15 18:24:27 2016 +0530

----------------------------------------------------------------------
 ocw-ui/backend/podaac_helpers.py                | 31 ---------------
 ocw-ui/backend/run_webservices.py               |  2 -
 ocw-ui/frontend/Gruntfile.js                    | 10 +++--
 ocw-ui/frontend/README.md                       | 23 +++++++++++
 ocw-ui/frontend/app/index.html                  |  7 ++--
 .../app/scripts/controllers/datasetselect.js    |  1 -
 .../app/scripts/controllers/podaacselection.js  | 40 --------------------
 ocw-ui/frontend/app/views/selectpodaac.html     | 29 --------------
 ocw-ui/frontend/package.json                    |  1 +
 9 files changed, 33 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/backend/podaac_helpers.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/podaac_helpers.py b/ocw-ui/backend/podaac_helpers.py
deleted file mode 100644
index a17949d..0000000
--- a/ocw-ui/backend/podaac_helpers.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-#  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.
-#
-
-''' Services for interacting with NASA JPL's PODAAC Database. '''
-
-from podaac.podaac_utils import PodaacUtils
-from bottle import Bottle
-
-podaac_app = Bottle()
-podaac_utils = PodaacUtils()
-
-@podaac_app.route('/datasets/', methods=['GET'])
-def get_observation_dataset_data():
-    ''' Return a list of dataset information from JPL's PODAAC.
-    '''
-    r = podaac_utils.list_available_granule_search_level2_dataset_ids()
-    return r

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/backend/run_webservices.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/run_webservices.py b/ocw-ui/backend/run_webservices.py
index 41587c6..dae2567 100644
--- a/ocw-ui/backend/run_webservices.py
+++ b/ocw-ui/backend/run_webservices.py
@@ -20,14 +20,12 @@ from bottle import Bottle, response, static_file
 from local_file_metadata_extractors import lfme_app
 from directory_helpers import dir_app
 from rcmed_helpers import rcmed_app
-from podaac_helpers import podaac_app
 from processing import processing_app
 
 app = Bottle()
 app.mount('/lfme/', lfme_app)
 app.mount('/dir/', dir_app)
 app.mount('/rcmed/', rcmed_app)
-app.mount('/podaac/', podaac_app)
 app.mount('/processing/', processing_app)
 
 @app.route('/')

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/Gruntfile.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/Gruntfile.js b/ocw-ui/frontend/Gruntfile.js
index 0efb4ae..a58f762 100644
--- a/ocw-ui/frontend/Gruntfile.js
+++ b/ocw-ui/frontend/Gruntfile.js
@@ -21,6 +21,8 @@ module.exports = function (grunt) {
     dist: 'dist'
   };
 
+  var serveStatic = require('serve-static');
+
   // Define the configuration for all the tasks
   grunt.initConfig({
 
@@ -76,12 +78,12 @@ module.exports = function (grunt) {
           open: true,
           middleware: function (connect) {
             return [
-              connect.static('.tmp'),
+              serveStatic('.tmp'),
               connect().use(
                 '/bower_components',
-                connect.static('./bower_components')
+                serveStatic('./bower_components')
               ),
-              connect.static(appConfig.app)
+              serveStatic(appConfig.app)
             ];
           }
         }
@@ -163,7 +165,7 @@ module.exports = function (grunt) {
     // Automatically inject Bower components into the app
     wiredep: {
       options: {
-        cwd: '<%= yeoman.app %>'
+        //cwd: '<%= yeoman.app %>'
       },
       app: {
         src: ['<%= yeoman.app %>/index.html'],

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/README.md
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/README.md b/ocw-ui/frontend/README.md
new file mode 100644
index 0000000..a7e538c
--- /dev/null
+++ b/ocw-ui/frontend/README.md
@@ -0,0 +1,23 @@
+[Apache Open Climate Workbench](http://climate.apache.org) is an effort to develop software that performs climate model evaluations using model outputs from a variety of different sources (the Earth System Grid Federation, the Coordinated Regional Downscaling Experiment, the U.S. National Climate Assessment and the North American Regional Climate Change Assessment Program) and temporal/spatial scales with remote sensing data from NASA, NOAA and other agencies. The toolkit includes capabilities for rebinning, metrics computation and visualization. For additional project information, please check the [project website](http://climate.apache.org/).
+
+## Getting Started
+
+The [project's wiki](https://cwiki.apache.org/confluence/display/CLIMATE/Home) is the best location for help and project information. New users should check out the [Getting Started](https://cwiki.apache.org/confluence/display/CLIMATE/Getting+Started) and [Easy OCW](https://cwiki.apache.org/confluence/display/CLIMATE/Easy-OCW+-+A+Guide+to+Simplifying+OCW+Installation) pages for help getting the necessary dependencies installed. If you would prefer to have an isolated environment set up in a virtual machine you should read the [OCW VM](https://cwiki.apache.org/confluence/display/CLIMATE/OCW+VM+-+A+Self+Contained+OCW+Environment) documentation. It will help you get up and running quickly with a fresh VM image for OCW work.
+
+There are a number of examples in the *examples* directory to help users get started with the toolkit API. If you have questions, the best way to get help is to email the project mailing lists which can be found on the [project's community page](http://climate.apache.org/community/mailing-lists.html).
+
+## Development
+
+OCW always welcomes pull request. Please check the [Developer Area](https://cwiki.apache.org/confluence/display/CLIMATE/Developer+Area) on the wiki for additional information on how to contribute. The [project's JIRA](https://issues.apache.org/jira/browse/CLIMATE) is a great place to start looking for issues to solve. Make sure to stop by the mailing lists and introduce yourself as well!
+
+## Documentation
+
+The project host the documentation built from the last release artifact on [the project website](https://climate.apache.org/api/index.html)
+
+If you would like to build the documentation for the project run the following command from the root of the repository:
+
+```
+cd docs && make html
+```
+
+You will need to have installed the project dependencies first. Checkout the [Getting Started](https://cwiki.apache.org/confluence/display/CLIMATE/Getting+Started) and [Easy OCW](https://cwiki.apache.org/confluence/display/CLIMATE/Easy-OCW+-+A+Guide+to+Simplifying+OCW+Installation) pages for help getting the necessary dependencies installed.

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/app/index.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/index.html b/ocw-ui/frontend/app/index.html
index 4a2cf20..84bea1a 100644
--- a/ocw-ui/frontend/app/index.html
+++ b/ocw-ui/frontend/app/index.html
@@ -99,21 +99,21 @@ under the License.
 
     <!-- build:js(.) scripts/vendor.js -->
     <!-- bower:js -->
-    <script src="bower_components/jquery/dist/jquery.js"></script>
     <script src="bower_components/angular/angular.js"></script>
     <script src="bower_components/json3/lib/json3.js"></script>
+    <script src="bower_components/es5-shim/es5-shim.js"></script>
+    <script src="bower_components/jquery/dist/jquery.js"></script>
     <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
     <script src="bower_components/angular-resource/angular-resource.js"></script>
     <script src="bower_components/angular-cookies/angular-cookies.js"></script>
     <script src="bower_components/angular-animate/angular-animate.js"></script>
     <script src="bower_components/angular-route/angular-route.js"></script>
     <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
-    <script src="bower_components/leaflet/dist/leaflet.js"></script>
     <script src="bower_components/leaflet/dist/leaflet-src.js"></script>
     <script src="bower_components/chap-links-timeline/timeline-min.js"></script>
     <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
     <script src="bower_components/jquery-ui/jquery-ui.js"></script>
-    <script src="bower_components/angular-ui-date/src/ui-date.js"></script>
+    <script src="bower_components/angular-ui-date/src/date.js"></script>
     <!-- endbower -->
     <!-- endbuild -->
 
@@ -125,7 +125,6 @@ under the License.
     <script src="scripts/controllers/observationselect.js"></script>
     <script src="scripts/controllers/parameterselect.js"></script>
     <script src="scripts/controllers/rcmedselection.js"></script>
-    <script src="scripts/controllers/podaacselection.js"></script>
     <script src="scripts/controllers/result.js"></script>
     <script src="scripts/controllers/resultdetail.js"></script>
     <script src="scripts/controllers/settings.js"></script>

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/datasetselect.js b/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
index 7a22500..b6b52ef 100644
--- a/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
+++ b/ocw-ui/frontend/app/scripts/controllers/datasetselect.js
@@ -56,7 +56,6 @@ angular.module('ocwUiApp')
       $scope.templates = [
         {title:'Local File', url: 'views/selectobservation.html'},
         {title:'RCMED', url: 'views/selectrcmed.html'},
-        {title:'PODAAC', url: 'views/selectpodaac.html'},
         {title:'ESG', disabled: true}
       ];
 

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/app/scripts/controllers/podaacselection.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/podaacselection.js b/ocw-ui/frontend/app/scripts/controllers/podaacselection.js
deleted file mode 100644
index 181ab19..0000000
--- a/ocw-ui/frontend/app/scripts/controllers/podaacselection.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.
- */
-
-'use strict';
-
-/**
- * @ngdoc function
- * @name ocwUiApp.controller:PodaacSelectionCtrl
- * @description
- * # PodaacSelectionCtrl
- * Controller of the ocwUiApp
- */
-angular.module('ocwUiApp')
-    .controller('PodaacSelectionCtrl', ['$rootScope', '$scope', '$http', '$timeout', 'selectedDatasetInformation',
-        function($rootScope, $scope, $http, $timeout, selectedDatasetInformation) {
-            $scope.datasetCount = selectedDatasetInformation.getDatasets();
-            $scope.fileAdded = false;
-            $scope.datasetSelection = "Please select a dataset";
-
-            $scope.getObservations = function() {
-            
-            };
-        }
-    ]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/app/views/selectpodaac.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/selectpodaac.html b/ocw-ui/frontend/app/views/selectpodaac.html
deleted file mode 100644
index c6e9a09..0000000
--- a/ocw-ui/frontend/app/views/selectpodaac.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-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.
--->
-
-<div ng-controller="PodaacSelectionCtrl">
-  <div class="row">
-    <div class="col-md-10 col-md-offset-1">
-      <div class="row top3">Select the PODAAC dataset that you would like to use.</div>
-      <div class="row top3">
-        <select ng-change="dataSelectUpdated()" class="form-control" ng-model="datasetSelection"></select>
-      </div>
-    </div>
-  </div>
-</div>

http://git-wip-us.apache.org/repos/asf/climate/blob/67de19c6/ocw-ui/frontend/package.json
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/package.json b/ocw-ui/frontend/package.json
index ca16ce8..9d3e55c 100644
--- a/ocw-ui/frontend/package.json
+++ b/ocw-ui/frontend/package.json
@@ -7,6 +7,7 @@
     "url" : "https://git-wip-us.apache.org/repos/asf/climate.git"
   },
   "license": "Apache-2.0",
+  "readme":"README.md",
   "dependencies": {},
   "devDependencies": {
     "bower": "^1.3.9",