Commit 811d0ae6 authored by Ryan Herbert's avatar Ryan Herbert Committed by marc duez
Browse files

absolute config urls

fixes the issue with the positional params and the browser path.
parent f8ebc2bc
......@@ -81,3 +81,4 @@ SET_TYPE_RUN= 'run'
SET_TYPE_GENERIC = 'generic'
REQUIRE_HTTPS = True
BROWSER_PATH = 'browser/index.html'
......@@ -78,3 +78,4 @@ SET_TYPE_RUN= 'run'
SET_TYPE_GENERIC = 'generic'
REQUIRE_HTTPS = False
BROWSER_PATH = 'browser/index.html'
......@@ -50,7 +50,7 @@ class SampleSet(object):
if conf['fused_file'] is not None :
configs.append(
str(A(conf['name'],
_href="browser/index.html?sample_set_id=%d&config=%d" % (data['sample_set_id'], conf['id']), _type="text/html",
_href=request.env['HTTP_ORIGIN'] + "/" + defs.BROWSER_PATH + "?sample_set_id=%d&config=%d" % (data['sample_set_id'], conf['id']), _type="text/html",
_onclick="event.preventDefault();event.stopPropagation();if( event.which == 2 ) { window.open(this.href); } else { myUrl.loadUrl(db, { 'sample_set_id' : '%d', 'config' : %d }, '%s' ); }" % (data['sample_set_id'], conf['id'], filename))))
else:
configs.append(conf['name'])
......
......@@ -96,3 +96,4 @@ FILE_SOURCE = '/mnt/data/src'
FILE_TYPES = ['fasta', 'fastq', 'fastq.gz', 'fa']
REQUIRE_HTTPS = True
BROWSER_PATH='browser/index.html'
......@@ -206,7 +206,7 @@
).select() :}}
{{if row.fused_file.fused_file is not None :}}
<a class="button2" href="browser/index.html?sample_set_id={{=request.vars["id"]}}&config={{=row.config.id}}" type="text/html"
<a class="button2" href="{{=request.env['HTTP_ORIGIN']}}/{{=defs.BROWSER_PATH}}?sample_set_id={{=request.vars["id"]}}&config={{=row.config.id}}" type="text/html"
onclick="event.preventDefault()
if( event.which == 2 ) { window.open(this.href) }
else { myUrl.loadUrl(db, { 'sample_set_id' : '{{=request.vars["id"]}}' , 'config' : {{=row.config.id}} }, '{{=info["filename"]}}' ) }" >
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment