climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1563546 - in /incubator/climate/trunk/ocw-ui/backend: rcmed_helpers.py run_webservices.py
Date Sun, 02 Feb 2014 02:32:01 GMT
Author: joyce
Date: Sun Feb  2 02:32:01 2014
New Revision: 1563546

URL: http://svn.apache.org/r1563546
Log:
CLIMATE-326 - Mount RCMED helpers in main webservices

Modified:
    incubator/climate/trunk/ocw-ui/backend/rcmed_helpers.py
    incubator/climate/trunk/ocw-ui/backend/run_webservices.py

Modified: incubator/climate/trunk/ocw-ui/backend/rcmed_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/rcmed_helpers.py?rev=1563546&r1=1563545&r2=1563546&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/rcmed_helpers.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/rcmed_helpers.py Sun Feb  2 02:32:01 2014
@@ -21,9 +21,9 @@ from bottle import Bottle, request
 
 import requests
 
-dataset_app = Bottle()
+rcmed_app = Bottle()
 
-@dataset_app.route('/getObsDatasets')
+@rcmed_app.route('/getObsDatasets')
 def getObservationDatasetData():
     r = requests.get('http://rcmes.jpl.nasa.gov/query-api/datasets.php')
 
@@ -34,7 +34,7 @@ def getObservationDatasetData():
     else:
         return r.text
 
-@dataset_app.route('/getDatasetParam')
+@rcmed_app.route('/getDatasetParam')
 def getDatasetParameters():
     url = 'http://rcmes.jpl.nasa.gov/query-api/parameters.php?dataset=' + request.query.dataset
     r = requests.get(url)

Modified: incubator/climate/trunk/ocw-ui/backend/run_webservices.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/run_webservices.py?rev=1563546&r1=1563545&r2=1563546&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/run_webservices.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/run_webservices.py Sun Feb  2 02:32:01 2014
@@ -16,13 +16,15 @@
 #
 ''' OCW UI Backend web services initialization. '''
 
-from bottle import Bottle, route, hook, response, run
+from bottle import Bottle, response
 from local_file_metadata_extractors import lfme_app
 from directory_helpers import dir_app
+from rcmed_helpers import rcmed_app
 
 app = Bottle()
 app.mount('/lfme/', lfme_app)
 app.mount('/dir/', dir_app)
+app.mount('/rcmed/', rcmed_app)
 
 @app.route('/')
 def index():
@@ -45,7 +47,7 @@ def get_eval_result_image(filepath):
     :returns: The requested file resource
 
     '''
-    return static_file(filepath, root="/tmp/rcmet")
+    return app.static_file(filepath, root="/tmp/rcmet")
 
 @app.hook('after_request')
 def enable_cors():



Mime
View raw message