From 49ef79474c712ef04d6d5525e594fc8ce326b505 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 8 Dec 2023 20:45:23 +0300 Subject: [PATCH 1/5] Remove tool version grid from admin router --- client/src/entry/analysis/routes/admin-routes.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/client/src/entry/analysis/routes/admin-routes.js b/client/src/entry/analysis/routes/admin-routes.js index e881d01f9451..aaae3c74df9c 100644 --- a/client/src/entry/analysis/routes/admin-routes.js +++ b/client/src/entry/analysis/routes/admin-routes.js @@ -169,13 +169,6 @@ export default [ gridMessage: route.query.message, }), }, - { - path: "tool_versions", - component: Grid, - props: { - urlBase: "admin/tool_versions_list", - }, - }, // forms { path: "form/reset_user_password", From 6ddebd83f45fcd16b666e85380213feb7dbab767 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 8 Dec 2023 20:46:01 +0300 Subject: [PATCH 2/5] Remove tool versions link from admin home page --- client/src/components/admin/Home.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/src/components/admin/Home.vue b/client/src/components/admin/Home.vue index c0a4ced8836e..e4d1ad8c2bb2 100644 --- a/client/src/components/admin/Home.vue +++ b/client/src/components/admin/Home.vue @@ -114,12 +114,6 @@ - Select on which repositories you want to reset metadata. -
  • - - View Lineage - - - A view of a version lineages for all installed tools. Useful for debugging. -
  • From 7a93461de2e65870b09100e00defd570200ad525 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 8 Dec 2023 20:46:31 +0300 Subject: [PATCH 3/5] Remove tool versions from admin panel --- client/src/components/admin/AdminPanel.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/client/src/components/admin/AdminPanel.vue b/client/src/components/admin/AdminPanel.vue index 3a50897e213c..8853ed812d39 100644 --- a/client/src/components/admin/AdminPanel.vue +++ b/client/src/components/admin/AdminPanel.vue @@ -141,11 +141,6 @@ export default { title: "Manage Dependencies", route: "/admin/toolbox_dependencies", }, - { - id: "admin-link-tool-versions", - title: "View Lineage", - route: "/admin/tool_versions", - }, { id: "admin-link-error-stack", title: "View Error Logs", From 49311debd1b7748e1c059f7aa3536b4eb9af9f5d Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 8 Dec 2023 20:48:11 +0300 Subject: [PATCH 4/5] Remove tool versions grid --- .../webapps/galaxy/controllers/admin.py | 52 ------------------- 1 file changed, 52 deletions(-) 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'' - 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'
    ' - 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 From 5b1122bba6f9c3c1d8b06c41114d747dae1d4754 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 8 Dec 2023 21:50:07 +0300 Subject: [PATCH 5/5] Remove unused imports --- client/src/entry/analysis/routes/admin-routes.js | 1 - lib/galaxy/webapps/galaxy/controllers/admin.py | 1 - 2 files changed, 2 deletions(-) diff --git a/client/src/entry/analysis/routes/admin-routes.js b/client/src/entry/analysis/routes/admin-routes.js index aaae3c74df9c..377363401307 100644 --- a/client/src/entry/analysis/routes/admin-routes.js +++ b/client/src/entry/analysis/routes/admin-routes.js @@ -23,7 +23,6 @@ import adminGroupsGridConfig from "components/Grid/configs/adminGroups"; import adminQuotasGridConfig from "components/Grid/configs/adminQuotas"; import adminRolesGridConfig from "components/Grid/configs/adminRoles"; import adminUsersGridConfig from "components/Grid/configs/adminUsers"; -import Grid from "components/Grid/Grid"; import GridList from "components/Grid/GridList"; import RegisterForm from "components/Login/RegisterForm"; import Toolshed from "components/Toolshed/Index"; diff --git a/lib/galaxy/webapps/galaxy/controllers/admin.py b/lib/galaxy/webapps/galaxy/controllers/admin.py index 96df5714e981..4f3a20a30d4b 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin.py @@ -15,7 +15,6 @@ ) from galaxy.exceptions import ActionInputError from galaxy.managers.quotas import QuotaManager -from galaxy.model import tool_shed_install as install_model from galaxy.model.base import transaction from galaxy.model.index_filter_util import ( raw_text_column_filter,