Skip to content

Commit

Permalink
enabled wps downloads action
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Jul 3, 2018
1 parent cd1424e commit a442789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions phoenix/monitor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ def output_details(request, output):
# get proxy_reference and wms_dataset_path
LOGGER.debug("output reference: %s", output.reference)
proxy_reference = output.reference
if output.reference and 'wpsoutputs' in output.reference:
if output.reference:
wps_output_url = request.registry.settings.get('wps.output.url')
if request.map_activated and output.mimeType and 'netcdf' in output.mimeType:
wms_dataset_path = "outputs" + output.reference.split('wpsoutputs', 1)[1]
if 'wpsoutputs' in output.reference:
wms_dataset_path = "outputs" + output.reference.split('wpsoutputs', 1)[1]
if wps_output_url and output.reference.startswith(wps_output_url):
proxy_reference = request.route_url(
'download_wpsoutputs',
Expand Down
2 changes: 1 addition & 1 deletion phoenix/monitor/views/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ def includeme(config):
config.add_route('unset_favorite', 'unset_favorite')
# download internal wps outputs
config.add_route('download_wpsoutputs', '/download/wpsoutputs*subpath')
# config.add_view(download_wpsoutputs, route_name='download_wpsoutputs')
config.add_view(download_wpsoutputs, route_name='download_wpsoutputs')

0 comments on commit a442789

Please sign in to comment.