From 8c2ab4180b218c3cffcf5c739ccbe4d22c52edaa Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 14 Sep 2015 09:39:01 +0100 Subject: [PATCH] Extend root controller to allow specifing a history id. It currently allows hoping straight to a given workflow or tool by id, this commit extends that to allow histories as well. Simply add history_id= to the query string. --- lib/galaxy/webapps/galaxy/controllers/root.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/root.py b/lib/galaxy/webapps/galaxy/controllers/root.py index e11a7d82daa..46ff2e3d9b0 100644 --- a/lib/galaxy/webapps/galaxy/controllers/root.py +++ b/lib/galaxy/webapps/galaxy/controllers/root.py @@ -35,10 +35,16 @@ class RootController( BaseUIController, UsesAnnotations ): raise HTTPNotFound( 'This link may not be followed from within Galaxy.' ) @web.expose - def index(self, trans, id=None, tool_id=None, mode=None, workflow_id=None, m_c=None, m_a=None, **kwd): + def index(self, trans, id=None, tool_id=None, mode=None, workflow_id=None, history_id=None, m_c=None, m_a=None, **kwd): """ Called on the root url to display the main Galaxy page. """ + if history_id is not None: + # Get history or throw exception. + unencoded_id = trans.security.decode_id( history_id ) + history = self.history_manager.get_owned( unencoded_id, trans.user ) + trans.set_history( history ) + return trans.fill_template( "root/index.mako", tool_id=tool_id, workflow_id=workflow_id,