diff --git a/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py b/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
index d946d326022..6001ef1dfd3 100644
--- a/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
+++ b/lib/tool_shed/galaxy_install/grids/admin_toolshed_grids.py
@@ -15,6 +15,13 @@ def generate_deprecated_repository_img_str( include_mouse_over=False ):
deprecated_tip_str = ''
return '
' % deprecated_tip_str
+def generate_includes_workflows_img_str( include_mouse_over=False ):
+ if include_mouse_over:
+ deprecated_tip_str = 'class="icon-button" title="This repository contains exported workflows"'
+ else:
+ deprecated_tip_str = ''
+ return '
' % deprecated_tip_str
+
def generate_latest_revision_img_str( include_mouse_over=False ):
if include_mouse_over:
latest_revision_tip_str = 'class="icon-button" title="This is the latest installable revision of this repository"'
@@ -60,6 +67,8 @@ class InstalledRepositoryGrid( grids.Grid ):
tool_shed_status_str += generate_revision_updates_img_str( include_mouse_over=True )
if tool_shed_repository.upgrade_available:
tool_shed_status_str += generate_revision_upgrades_img_str( include_mouse_over=True )
+ if tool_shed_repository.includes_workflows:
+ tool_shed_status_str += generate_includes_workflows_img_str( include_mouse_over=True )
else:
tool_shed_status_str = generate_unknown_img_str( include_mouse_over=True )
return tool_shed_status_str
@@ -211,7 +220,11 @@ class InstalledRepositoryGrid( grids.Grid ):
use_paging = False
def build_initial_query( self, trans, **kwd ):
- return trans.sa_session.query( self.model_class )
+ return trans.sa_session.query( self.model_class ) \
+ .order_by( self.model_class.table.c.tool_shed,
+ self.model_class.table.c.name,
+ self.model_class.table.c.owner,
+ self.model_class.table.c.ctx_rev )
@property
def legend( self ):
@@ -219,6 +232,7 @@ class InstalledRepositoryGrid( grids.Grid ):
legend_str += '%s A newer installable revision is available for this repository
' % generate_revision_upgrades_img_str()
legend_str += '%s This is the latest installable revision of this repository
' % generate_latest_revision_img_str()
legend_str += '%s This repository is deprecated in the Tool Shed
' % generate_deprecated_repository_img_str()
+ legend_str += '%s This repository contains exported workflows
' % generate_includes_workflows_img_str()
legend_str += '%s Unable to get information from the Tool Shed
' % generate_unknown_img_str()
return legend_str
diff --git a/lib/tool_shed/galaxy_install/repository_util.py b/lib/tool_shed/galaxy_install/repository_util.py
index 13118e0c0c9..a930bb5c6a6 100644
--- a/lib/tool_shed/galaxy_install/repository_util.py
+++ b/lib/tool_shed/galaxy_install/repository_util.py
@@ -352,6 +352,10 @@ def handle_repository_contents( trans, tool_shed_repository, tool_path, reposito
updating_installed_repository=False,
persist=True )
tool_shed_repository.metadata = metadata_dict
+ # Update the tool_shed_repository.tool_shed_status column in the database.
+ tool_shed_status_dict = suc.get_tool_shed_status_for_installed_repository( trans.app, tool_shed_repository )
+ if tool_shed_status_dict:
+ tool_shed_repository.tool_shed_status = tool_shed_status_dict
trans.sa_session.add( tool_shed_repository )
trans.sa_session.flush()
if 'tool_dependencies' in metadata_dict and not reinstalling: