mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
(1) enhance the 'Manage installed tool shed repositories' grid to mark repositories that contain exported workflows, (2) Set the tool_shed_status column value when installing a new repository or reinstalling an uninstalled repository, (3) On the 'Manage installed tool shed repositories' gird, display installed repositories ordered by tool_shed, name, owner, ctx_rev.
This commit is contained in:
@@ -15,6 +15,13 @@ def generate_deprecated_repository_img_str( include_mouse_over=False ):
|
||||
deprecated_tip_str = ''
|
||||
return '<img src="/static/images/icon_error_sml.gif" %s/>' % 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 '<img src="/static/images/fugue/gear.png" %s/>' % 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<br/>' % generate_revision_upgrades_img_str()
|
||||
legend_str += '%s This is the latest installable revision of this repository<br/>' % generate_latest_revision_img_str()
|
||||
legend_str += '%s This repository is deprecated in the Tool Shed<br/>' % generate_deprecated_repository_img_str()
|
||||
legend_str += '%s This repository contains exported workflows<br/>' % generate_includes_workflows_img_str()
|
||||
legend_str += '%s Unable to get information from the Tool Shed<br/>' % generate_unknown_img_str()
|
||||
return legend_str
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user