From 1caa82ad5bdfd30a4749bf702f76fadf3647264f Mon Sep 17 00:00:00 2001 From: Kyle Ellrott Date: Mon, 25 Feb 2013 16:48:38 -0800 Subject: [PATCH 1/2] Passing extra parameters from root index to tool index. This will allow for tools to pick up parameters from the request URL and map them with the request_param_translation, even when inside the root frame. --- lib/galaxy/webapps/galaxy/controllers/root.py | 3 ++- templates/webapps/galaxy/root/index.mako | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/root.py b/lib/galaxy/webapps/galaxy/controllers/root.py index 34d61a95622..694239d50be 100644 --- a/lib/galaxy/webapps/galaxy/controllers/root.py +++ b/lib/galaxy/webapps/galaxy/controllers/root.py @@ -22,7 +22,8 @@ class RootController( BaseUIController, UsesHistoryMixin, UsesAnnotations ): return trans.fill_template( "root/index.mako", tool_id=tool_id, workflow_id=workflow_id, - m_c=m_c, m_a=m_a ) + m_c=m_c, m_a=m_a, + params=kwd ) ## ---- Tool related ----------------------------------------------------- diff --git a/templates/webapps/galaxy/root/index.mako b/templates/webapps/galaxy/root/index.mako index 954e325cb1f..029d9bc0726 100644 --- a/templates/webapps/galaxy/root/index.mako +++ b/templates/webapps/galaxy/root/index.mako @@ -118,7 +118,7 @@ if trans.app.config.require_login and not trans.user: center_url = h.url_for( controller='user', action='login' ) elif tool_id is not None: - center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True ) + center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True, **params ) elif workflow_id is not None: center_url = h.url_for( controller='workflow', action='run', id=workflow_id ) elif m_c is not None: From 88682adec74ff265c4d1c6ba7c87fe62c3980ffb Mon Sep 17 00:00:00 2001 From: Kyle Ellrott Date: Tue, 26 Feb 2013 11:09:44 -0800 Subject: [PATCH 2/2] For external tool requests, without a 'URL' parameter but with other parameters, still process the incoming parameters. This will allow for tools that have 'request_param_translation' tables without the 'URL' parameter mapping to accept external requests and fill in their tool form page. --- lib/galaxy/tools/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 9bcb58a5bfe..a1cad841e31 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1809,6 +1809,8 @@ class Tool( object ): if "runtool_btn" not in incoming and "URL" not in incoming: if not self.display_interface: return 'message.mako', dict( status='info', message="The interface for this tool cannot be displayed", refresh_frames=['everything'] ) + if len(incoming): + self.update_state( trans, self.inputs_by_page[state.page], state.inputs, incoming, old_errors=old_errors or {} ) return "tool_form.mako", dict( errors={}, tool_state=state, param_values={}, incoming={} ) # Process incoming data if not( self.check_values ):