2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d794e30fcd1a/ Changeset: d794e30fcd1a User: jmchilton Date: 2013-06-07 22:12:09 Summary: Refactor hardcoded references to static/welcome.html to a new welcome action on the root controller. Affected #: 4 files diff -r 30e8f84914bdd4ea66138f690c9df83e520d9572 -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 lib/galaxy/webapps/galaxy/controllers/root.py --- a/lib/galaxy/webapps/galaxy/controllers/root.py +++ b/lib/galaxy/webapps/galaxy/controllers/root.py @@ -547,6 +547,10 @@ return trans.show_error_message( "<p>Failed to make secondary dataset primary.</p>" ) @web.expose + def welcome( self, trans ): + return trans.response.send_redirect( url_for( '/static/welcome.html' ) ) + + @web.expose def bucket_proxy( self, trans, bucket=None, **kwd): if bucket: trans.response.set_content_type( 'text/xml' ) diff -r 30e8f84914bdd4ea66138f690c9df83e520d9572 -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 lib/galaxy/webapps/galaxy/controllers/tool_runner.py --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -52,7 +52,7 @@ def index(self, trans, tool_id=None, from_noframe=None, **kwd): # No tool id passed, redirect to main page if tool_id is None: - return trans.response.send_redirect( url_for( "/static/welcome.html" ) ) + return trans.response.send_redirect( url_for( controller="root", action="welcome" ) ) tool_version_select_field, tools, tool = self.__get_tool_components( tool_id, tool_version=None, get_loaded_tools_by_lineage=False, diff -r 30e8f84914bdd4ea66138f690c9df83e520d9572 -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 lib/galaxy/webapps/galaxy/controllers/user.py --- a/lib/galaxy/webapps/galaxy/controllers/user.py +++ b/lib/galaxy/webapps/galaxy/controllers/user.py @@ -492,7 +492,7 @@ message = 'You are now logged in as %s.<br>You can <a target="_top" href="%s">go back to the page you were visiting</a> or <a target="_top" href="%s">go to the home page</a>.' % \ ( user.email, redirect, url_for( '/' ) ) if trans.app.config.require_login: - message += ' <a target="_top" href="%s">Click here</a> to continue to the home page.' % web.url_for( '/static/welcome.html' ) + message += ' <a target="_top" href="%s">Click here</a> to continue to the home page.' % web.url_for( controller="root", action="welcome" ) success = True return ( message, status, user, success ) diff -r 30e8f84914bdd4ea66138f690c9df83e520d9572 -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 templates/webapps/galaxy/root/index.mako --- a/templates/webapps/galaxy/root/index.mako +++ b/templates/webapps/galaxy/root/index.mako @@ -149,7 +149,7 @@ elif m_c is not None: center_url = h.url_for( controller=m_c, action=m_a ) else: - center_url = h.url_for( '/static/welcome.html' ) + center_url = h.url_for( controller="root", action="welcome" ) %><div style="position: absolute; width: 100%; height: 100%"> https://bitbucket.org/galaxy/galaxy-central/commits/3636ba2f4439/ Changeset: 3636ba2f4439 User: jmchilton Date: 2013-06-08 00:35:36 Summary: Add config option 'welcome_url' to allow override of relative url to welcome file. Much like the tool filter request, the driving motivation here is allowing a single CloudMan packaged cloud image to host different Galaxys based on the supplied user data. More specifically, with this changset one can override the default welcome file to point to 'static/welcome_site1.html' when launching CloudMan by adding the option 'galaxy_universe_welcome_url: "/static/welcome_site1.html"' to the launch request's user data. Affected #: 2 files diff -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 -r 3636ba2f4439b7b61f25425698f8e0be9f0f6f07 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -166,6 +166,7 @@ self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea,ucla" ).lower().split(",") self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "modencode,sgd_yeast,tair,wormbase,wormbase_ws120,wormbase_ws140,wormbase_ws170,wormbase_ws180,wormbase_ws190,wormbase_ws200,wormbase_ws204,wormbase_ws210,wormbase_ws220,wormbase_ws225" ).lower().split(",") self.brand = kwargs.get( 'brand', None ) + self.welcome_url = kwargs.get( 'welcome_url', '/static/welcome.html' ) # Configuration for the message box directly below the masthead. self.message_box_visible = kwargs.get( 'message_box_visible', False ) self.message_box_content = kwargs.get( 'message_box_content', None ) diff -r d794e30fcd1ac28fa84c13d3f68c86c7de5df0d4 -r 3636ba2f4439b7b61f25425698f8e0be9f0f6f07 lib/galaxy/webapps/galaxy/controllers/root.py --- a/lib/galaxy/webapps/galaxy/controllers/root.py +++ b/lib/galaxy/webapps/galaxy/controllers/root.py @@ -548,7 +548,8 @@ @web.expose def welcome( self, trans ): - return trans.response.send_redirect( url_for( '/static/welcome.html' ) ) + welcome_url = trans.app.config.welcome_url + return trans.response.send_redirect( url_for( welcome_url ) ) @web.expose def bucket_proxy( self, trans, bucket=None, **kwd): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.