diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index cb4a3b2327d8..96df5714e981 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -355,52 +355,6 @@ def apply_query_filter(self, query, **kwargs): return query -class ToolVersionListGrid(grids.Grid): - class ToolIdColumn(grids.TextColumn): - def get_value(self, trans, grid, tool_version): - toolbox = trans.app.toolbox - if toolbox.has_tool(tool_version.tool_id, exact=True): - link = url_for(controller="tool_runner", tool_id=tool_version.tool_id) - link_str = f'' - return f'
{link_str}{tool_version.tool_id}
' - return tool_version.tool_id - - class ToolVersionsColumn(grids.TextColumn): - def get_value(self, trans, grid, tool_version): - tool_ids_str = "" - toolbox = trans.app.toolbox - if tool := toolbox._tools_by_id.get(tool_version.tool_id): - for tool_id in tool.lineage.tool_ids: - if toolbox.has_tool(tool_id, exact=True): - link = url_for(controller="tool_runner", tool_id=tool_id) - link_str = f'' - tool_ids_str += f'
{link_str}{tool_id}

' - else: - tool_ids_str += f"{tool_version.tool_id}
" - else: - tool_ids_str += f"{tool_version.tool_id}
" - return tool_ids_str - - # Grid definition - title = "Tool versions" - model_class = install_model.ToolVersion - default_sort_key = "tool_id" - columns = [ - ToolIdColumn("Tool id", key="tool_id", attach_popup=False), - ToolVersionsColumn("Version lineage by tool id (parent/child ordered)"), - ] - columns.append( - grids.MulticolFilterColumn( - "Search tool id", cols_to_filter=[columns[0]], key="free-text-search", visible=False, filterable="standard" - ) - ) - num_rows_per_page = 50 - use_paging = True - - def build_initial_query(self, trans, **kwd): - return trans.install_model.context.query(self.model_class) - - # TODO: Convert admin UI to use the API and drop this. class DatatypesEntryT(TypedDict): status: str @@ -414,7 +368,6 @@ class AdminGalaxy(controller.JSAppLauncher): role_list_grid = RoleListGrid() group_list_grid = GroupListGrid() quota_list_grid = QuotaListGrid() - tool_version_list_grid = ToolVersionListGrid() def __init__(self, app: StructuredApp): super().__init__(app) @@ -688,11 +641,6 @@ def impersonate(self, trans, **kwd): web.url_for(controller="admin", action="users", message="Invalid user selected", status="error") ) - @web.legacy_expose_api - @web.require_admin - def tool_versions_list(self, trans, **kwd): - return self.tool_version_list_grid(trans, **kwd) - @web.expose @web.json @web.require_admin