Skip to content

Commit

Permalink
Merge pull request #308 from DanielJMaher/release4f2
Browse files Browse the repository at this point in the history
Fixed UI components for DPA = True D/L Link
  • Loading branch information
oceanzus committed Apr 21, 2015
2 parents 4bc4d8f + edd8c59 commit 559324a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
26 changes: 23 additions & 3 deletions ooiui/core/routes/science.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,23 +183,23 @@ def metadata_times_proxy(stream_name,reference_designator):
@app.route('/api/uframe/get_csv/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>')
def get_csv(stream_name, reference_designator,start,end):
token = get_login()
dpa = "0"
dpa = "1"
url = app.config['SERVICES_URL'] + '/uframe/get_csv/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa)
req = requests.get(url, auth=(token, ''), stream=True,params=request.args)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/api/uframe/get_json/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>')
def get_json(stream_name, reference_designator,start,end):
token = get_login()
dpa = "0"
dpa = "1"
url = app.config['SERVICES_URL'] + '/uframe/get_json/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa)
req = requests.get(url, auth=(token, ''), stream=True,params=request.args)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/api/uframe/get_netcdf/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>')
def get_netcdf(stream_name, reference_designator,start,end):
token = get_login()
dpa = "0"
dpa = "1"
req = requests.get(app.config['SERVICES_URL'] + '/uframe/get_netcdf/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa), auth=(token, ''), stream=True)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

Expand All @@ -209,6 +209,26 @@ def get_profiles(stream_name, reference_designator):
req = requests.get(app.config['SERVICES_URL'] + '/uframe/get_profiles/%s/%s/%s/%s' % (stream_name, reference_designator), auth=(token, ''), stream=True)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/api/uframe/get_csv/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>/<string:dpa>')
def get_csv_dpaflag(stream_name, reference_designator,start,end,dpa):
token = get_login()
url = app.config['SERVICES_URL'] + '/uframe/get_csv/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa)
req = requests.get(url, auth=(token, ''), stream=True,params=request.args)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/api/uframe/get_json/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>/<string:dpa>')
def get_json_dpaflag(stream_name, reference_designator,start,end,dpa):
token = get_login()
url = app.config['SERVICES_URL'] + '/uframe/get_json/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa)
req = requests.get(url, auth=(token, ''), stream=True,params=request.args)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/api/uframe/get_netcdf/<string:stream_name>/<string:reference_designator>/<string:start>/<string:end>/<string:dpa>')
def get_netcdf_dpaflag(stream_name, reference_designator,start,end,dpa):
token = get_login()
req = requests.get(app.config['SERVICES_URL'] + '/uframe/get_netcdf/%s/%s/%s/%s/%s' % (stream_name, reference_designator,start,end,dpa), auth=(token, ''), stream=True)
return Response(stream_with_context(req.iter_content(chunk_size=1024*1024*4)), headers=dict(req.headers))

@app.route('/svg/plot/<string:instrument>/<string:stream>', methods=['GET'])
def get_plotdemo(instrument, stream):
token = get_login()
Expand Down
2 changes: 1 addition & 1 deletion ooiui/static/js/partials/SVGPlotControl.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<% console.log(model.get('variables_shape')[varName]) %>

<% if(model.get('variables_shape')[varName] == "function"){ %>
<option data-subtext="L1 dpa true" class="dpa-function-variable" value="<%=varName%>"><%= varName %></option>
<option data-subtext="L1/L2 DPA" class="dpa-function-variable" value="<%=varName%>"><%= varName %></option>
<%} else { %>
<option value="<%=varName%>"><%= varName %></option>
<% } %>
Expand Down

0 comments on commit 559324a

Please sign in to comment.