Commit 557fa8e9 authored by Thomas Matthews's avatar Thomas Matthews

Merge branch 'https_fixes' into 'development'

Bypass galaxy for baseurl generation so that users can provide galaxy urls with https

See merge request !26
parents ad645b82 d07837cb
Pipeline #3688 failed with stage
in 20805 minutes and 11 seconds
......@@ -39,7 +39,6 @@ class IridaImport:
CONFIG_FILE = 'config.ini'
XML_FILE_SAMPLE = 'irida_import.xml.sample'
XML_FILE = 'irida_import.xml'
CLIENT_ID_PARAM = 'galaxyClientID'
folds = {}
def __init__(self):
......@@ -660,10 +659,17 @@ class IridaImport:
inputs = tree.find('inputs')
inputs.set('action', irida_endpoint)
params = inputs.findall('param')
client_id_param = next(param for param in params
if param.get('name') == self.CLIENT_ID_PARAM)
client_id_param.set('value', self.CLIENT_ID)
for param in params:
if param.get('name') == 'galaxyClientID':
param.set('value', self.CLIENT_ID)
# manually set GALAXY_URL instead of using galaxy's baseurl type
# so that sites with SSL will work
if param.get('name') == 'galaxyCallbackUrl':
previous_value = param.get('value')
param.set('value', re.sub(r'GALAXY_URL', self.GALAXY_URL, previous_value))
......@@ -8,7 +8,7 @@
<inputs action="http://localhost:8080/projects" check_values="False" method="post">
<display>import data from IRIDA to Galaxy</display>
<param name="galaxyCallbackUrl" type="baseurl" value="/tool_runner?tool_id=irida_import&amp;runtool_btn=Execute" />
<param name="galaxyCallbackUrl" type="hidden" value="GALAXY_URL/tool_runner?tool_id=irida_import&amp;runtool_btn=Execute" />
<param name="appName" type="hidden" value="Galaxy" />
<param name="galaxyClientID" type="hidden" value="webClient" />
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