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=<history_id> to the query string.
This commit is contained in:
John Chilton
2015-09-14 09:40:20 +01:00
parent 51979deefb
commit 8c2ab4180b
@@ -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,