1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/951ba799c0b0/ changeset: 951ba799c0b0 user: greg date: 2012-07-02 22:56:55 summary: Fixes for monitoring tool_shed_repositories being installed. affected #: 5 files diff -r a8e1ffb2c5f5290105893dea606d3bda97b1f244 -r 951ba799c0b020ae9d90f55435a30e19039f51fb lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -1556,10 +1556,25 @@ message = kwd.get( 'message', '' ) status = kwd.get( 'status', 'done' ) if webapp == 'galaxy': - cloned_repositories = trans.sa_session.query( trans.model.ToolShedRepository ).first() + installed_repositories = trans.sa_session.query( trans.model.ToolShedRepository ).first() + installing_repository_ids = [] + new_status = trans.model.ToolShedRepository.installation_status.NEW + cloning_status = trans.model.ToolShedRepository.installation_status.CLONING + setting_tool_versions_status = trans.model.ToolShedRepository.installation_status.SETTING_TOOL_VERSIONS + installing_dependencies_status = trans.model.ToolShedRepository.installation_status.INSTALLING_TOOL_DEPENDENCIES + loading_datatypes_status = trans.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES + for tool_shed_repository in trans.sa_session.query( trans.model.ToolShedRepository ) \ + .filter( or_( trans.model.ToolShedRepository.status == new_status, + trans.model.ToolShedRepository.status == cloning_status, + trans.model.ToolShedRepository.status == setting_tool_versions_status, + trans.model.ToolShedRepository.status == installing_dependencies_status, + trans.model.ToolShedRepository.status == loading_datatypes_status ) ): + installing_repository_ids.append( trans.security.encode_id( tool_shed_repository.id ) ) + installing_repository_ids = ','.join( installing_repository_ids ) return trans.fill_template( '/webapps/galaxy/admin/index.mako', webapp=webapp, - cloned_repositories=cloned_repositories, + installed_repositories=installed_repositories, + installing_repository_ids=installing_repository_ids, message=message, status=status ) else: diff -r a8e1ffb2c5f5290105893dea606d3bda97b1f244 -r 951ba799c0b020ae9d90f55435a30e19039f51fb lib/galaxy/web/controllers/admin_toolshed.py --- a/lib/galaxy/web/controllers/admin_toolshed.py +++ b/lib/galaxy/web/controllers/admin_toolshed.py @@ -140,7 +140,7 @@ bgcolor = trans.model.ToolShedRepository.states.OK else: bgcolor = trans.model.ToolShedRepository.states.ERROR - rval = '<div class="count-box state-color-%s" id="ToolShedRepositoryStatus-%s">' % ( bgcolor, trans.security.encode_id( tool_shed_repository.id ) ) + rval = '<div class="count-box state-color-%s" id="RepositoryStatus-%s">' % ( bgcolor, trans.security.encode_id( tool_shed_repository.id ) ) rval += '%s</div>' % tool_shed_repository.status return rval @@ -1148,6 +1148,19 @@ tsridslist = util.listify( params.get( 'id', None ) ) if tsrid and tsrid not in tsridslist: tsridslist.append( tsrid ) + if not tsridslist: + new_status = trans.model.ToolShedRepository.installation_status.NEW + cloning_status = trans.model.ToolShedRepository.installation_status.CLONING + setting_tool_versions_status = trans.model.ToolShedRepository.installation_status.SETTING_TOOL_VERSIONS + installing_dependencies_status = trans.model.ToolShedRepository.installation_status.INSTALLING_TOOL_DEPENDENCIES + loading_datatypes_status = trans.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES + for tool_shed_repository in trans.sa_session.query( trans.model.ToolShedRepository ) \ + .filter( or_( trans.model.ToolShedRepository.status == new_status, + trans.model.ToolShedRepository.status == cloning_status, + trans.model.ToolShedRepository.status == setting_tool_versions_status, + trans.model.ToolShedRepository.status == installing_dependencies_status, + trans.model.ToolShedRepository.status == loading_datatypes_status ) ): + tsridslist.append( trans.security.encode_id( tool_shed_repository.id ) ) kwd[ 'tool_shed_repository_ids' ] = tsridslist return self.repository_installation_grid( trans, **kwd ) @web.json diff -r a8e1ffb2c5f5290105893dea606d3bda97b1f244 -r 951ba799c0b020ae9d90f55435a30e19039f51fb templates/admin/tool_shed_repository/common.mako --- a/templates/admin/tool_shed_repository/common.mako +++ b/templates/admin/tool_shed_repository/common.mako @@ -200,8 +200,8 @@ //alert( "repository_status_list[item] " + repository_status_list[item].toSource() ); //alert( "repository_status_list[item]['status']" + repository_status_list[item]['status'] ); if (repository_status_list[item]['status'] != 'Installed'){ - empty = false; - break; + empty = false; + break; } } if ( ! empty ) { diff -r a8e1ffb2c5f5290105893dea606d3bda97b1f244 -r 951ba799c0b020ae9d90f55435a30e19039f51fb templates/admin/tool_shed_repository/repository_installation_status.mako --- a/templates/admin/tool_shed_repository/repository_installation_status.mako +++ b/templates/admin/tool_shed_repository/repository_installation_status.mako @@ -19,7 +19,7 @@ bgcolor = trans.model.ToolShedRepository.states.OK else: bgcolor = trans.model.ToolShedRepository.states.ERROR - rval = '<div class="count-box state-color-%s" id="ToolShedRepositoryStatus-%s">' % ( bgcolor, trans.security.encode_id( repository.id ) ) + rval = '<div class="count-box state-color-%s" id="RepositoryStatus-%s">' % ( bgcolor, trans.security.encode_id( repository.id ) ) rval += '%s</div>' % repository.status return rval %> diff -r a8e1ffb2c5f5290105893dea606d3bda97b1f244 -r 951ba799c0b020ae9d90f55435a30e19039f51fb templates/webapps/galaxy/admin/index.mako --- a/templates/webapps/galaxy/admin/index.mako +++ b/templates/webapps/galaxy/admin/index.mako @@ -70,8 +70,10 @@ <div class="toolTitle"><a href="${h.url_for( controller='admin', action='reload_tool' )}" target="galaxy_main">Reload a tool's configuration</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='memdump' )}" target="galaxy_main">Profile memory usage</a></div><div class="toolTitle"><a href="${h.url_for( controller='admin', action='jobs' )}" target="galaxy_main">Manage jobs</a></div> - <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='monitor_repository_installation' )}" target="galaxy_main">Monitor installing tool shed repositories</a></div> - %if cloned_repositories: + %if installing_repository_ids: + <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='monitor_repository_installation', tool_shed_repository_ids=installing_repository_ids )}" target="galaxy_main">Monitor installing tool shed repositories</a></div> + %endif + %if installed_repositories: <div class="toolTitle"><a href="${h.url_for( controller='admin_toolshed', action='browse_repositories' )}" target="galaxy_main">Manage installed tool shed repositories</a></div> %endif </div> 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.