From 4d313fd3d4041bebf472fdee6982e07672f90739 Mon Sep 17 00:00:00 2001 From: guerler Date: Fri, 12 Jul 2019 16:52:09 +0200 Subject: [PATCH] Remove legacy admin toolshed entry point --- client/galaxy/scripts/admin.toolshed.js | 80 ------------------- client/galaxy/scripts/bundleEntries.js | 5 -- .../galaxy/controllers/admin_toolshed.py | 12 --- 3 files changed, 97 deletions(-) delete mode 100644 client/galaxy/scripts/admin.toolshed.js diff --git a/client/galaxy/scripts/admin.toolshed.js b/client/galaxy/scripts/admin.toolshed.js deleted file mode 100644 index 04182abfda5..00000000000 --- a/client/galaxy/scripts/admin.toolshed.js +++ /dev/null @@ -1,80 +0,0 @@ -import Backbone from "backbone"; -import { getGalaxyInstance } from "app"; -import mod_shed_list_view from "mvc/toolshed/shed-list-view"; -import mod_categories_view from "mvc/toolshed/categories-view"; -import mod_repositories_view from "mvc/toolshed/repositories-view"; -import mod_repository_view from "mvc/toolshed/repository-view"; -import mod_repoqueue_view from "mvc/toolshed/repository-queue-view"; -import mod_repo_status_view from "mvc/toolshed/repo-status-view"; -import mod_workflows_view from "mvc/toolshed/workflows-view"; - -var AdminToolshedRouter = Backbone.Router.extend({ - routes: { - "": "toolsheds", - sheds: "toolsheds", - queue: "queue", - workflows: "workflows", - "status/r/:repositories": "status", - status: "status", - "categories/s/:tool_shed": "categories", - "category/s/:tool_shed/c/:category_id/k/:sort_key/p/:page/t/:sort_order": "repositories", - "repository/s/:tool_shed/r/:repository_id": "repository" - } -}); - -var GalaxyAdminToolshedApp = Backbone.View.extend({ - app_config: { - known_views: ["toolsheds", "queue", "status", "categories", "repositories", "repository"] - }, - - initialize: function() { - const Galaxy = getGalaxyInstance(); - - Galaxy.admintoolshedapp = this; - this.admin_toolshed_router = new AdminToolshedRouter(); - - this.admin_toolshed_router.on("route:queue", () => { - Galaxy.admintoolshedapp.adminRepoQueueView = new mod_repoqueue_view.RepoQueueView(); - }); - this.admin_toolshed_router.on("route:toolsheds", () => { - Galaxy.admintoolshedapp.adminShedListView = new mod_shed_list_view.ShedListView(); - }); - this.admin_toolshed_router.on("route:categories", tool_shed => { - Galaxy.admintoolshedapp.adminShedCategoriesView = new mod_categories_view.CategoryView({ - tool_shed: tool_shed.replace(/\//g, "%2f") - }); - }); - this.admin_toolshed_router.on( - "route:repositories", - (tool_shed, category_id, sort_key = "name", page = 1, sort_order = "asc") => { - Galaxy.admintoolshedapp.adminShedCategoryView = new mod_repositories_view.Category({ - tool_shed: tool_shed.replace(/\//g, "%2f"), - category_id: category_id, - page: page, - sort_order: sort_order, - sort_key: sort_key - }); - } - ); - this.admin_toolshed_router.on("route:repository", (tool_shed, repository_id) => { - Galaxy.admintoolshedapp.adminRepositoryView = new mod_repository_view.RepoDetails({ - tool_shed: tool_shed.replace(/\//g, "%2f"), - repository_id: repository_id - }); - }); - this.admin_toolshed_router.on("route:status", repositories => { - Galaxy.admintoolshedapp.adminRepoStatusView = new mod_repo_status_view.RepoStatus({ - repositories: repositories.split("|") - }); - }); - this.admin_toolshed_router.on("route:workflows", () => { - Galaxy.admintoolshedapp.adminWorkflowsView = new mod_workflows_view.Workflows(); - }); - - Backbone.history.start({ pushState: false }); - } -}); - -export default { - GalaxyApp: GalaxyAdminToolshedApp -}; diff --git a/client/galaxy/scripts/bundleEntries.js b/client/galaxy/scripts/bundleEntries.js index 0390749fb83..4112b14bbb2 100644 --- a/client/galaxy/scripts/bundleEntries.js +++ b/client/galaxy/scripts/bundleEntries.js @@ -17,7 +17,6 @@ import Circster from "viz/circster"; export { PhylovizView as phyloviz } from "viz/phyloviz"; export { SweepsterVisualization, SweepsterVisualizationView } from "viz/sweepster"; import GalaxyLibrary from "galaxy.library"; -import AdminToolshed from "admin.toolshed"; export { default as pages } from "galaxy.pages"; export { createTabularDatasetChunkedView } from "mvc/dataset/data"; import { HistoryCollection } from "mvc/history/history-model"; @@ -36,10 +35,6 @@ export { default as IES } from "galaxy.interactive_environments"; export { Toast } from "ui/toast"; // TODO: remove when external consumers are updated/gone (IES right now) -export function adminToolshed(options) { - new AdminToolshed.GalaxyApp(options); -} - export function trackster(options) { new TracksterUIView(options); } diff --git a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py index 00653846147..f457788bdd5 100644 --- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py +++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py @@ -159,18 +159,6 @@ class AdminToolshed(AdminGalaxy): message=message, status=status) - @web.expose - @web.require_admin - def browse_toolsheds(self, trans, **kwd): - app = { - 'jscript': "adminToolshed" - } - return trans.fill_template('galaxy.panels.mako', - config={ - 'title': 'Galaxy Tool Sheds', - 'app': app, - 'bundle': 'extended'}) - @web.expose @web.require_admin def check_for_updates(self, trans, **kwd):