From 913e159e7eab0450a426361c45a150c45a386021 Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 10:48:05 -0400 Subject: [PATCH 1/6] Remove mount helper for Workflow Editor --- client/src/bundleEntries.js | 1 - client/src/components/Workflow/Editor/mount.js | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 client/src/components/Workflow/Editor/mount.js diff --git a/client/src/bundleEntries.js b/client/src/bundleEntries.js index 4112718a9d6..c162daee24d 100644 --- a/client/src/bundleEntries.js +++ b/client/src/bundleEntries.js @@ -46,7 +46,6 @@ export function chart(options) { export { initMasthead } from "components/Masthead/initMasthead"; export { mountHistory } from "components/History/mount"; export { mountMakoTags } from "components/Tags"; -export { mountWorkflowEditor } from "components/Workflow/Editor/mount"; export { mountPageEditor } from "components/PageEditor/mount"; export { mountPageDisplay } from "components/PageDisplay"; diff --git a/client/src/components/Workflow/Editor/mount.js b/client/src/components/Workflow/Editor/mount.js deleted file mode 100644 index b3ffbb4bef2..00000000000 --- a/client/src/components/Workflow/Editor/mount.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Endpoint for mounting WorkflowEditor from non-Vue environment (editor.mako). - */ -import Vue from "vue"; -import Index from "./Index"; -import store from "store"; - -export const mountWorkflowEditor = (propsData) => { - const component = Vue.extend(Index); - return new component({ - store: store, - propsData: propsData, - el: "#columns", - }); -}; From ec82fb90ffb337382fda0be69ebb7442df6d770f Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 10:48:53 -0400 Subject: [PATCH 2/6] Remove history legacy mount helper --- client/src/bundleEntries.js | 1 - client/src/components/History/mount.js | 24 ------------------------ 2 files changed, 25 deletions(-) delete mode 100644 client/src/components/History/mount.js diff --git a/client/src/bundleEntries.js b/client/src/bundleEntries.js index c162daee24d..c751646652f 100644 --- a/client/src/bundleEntries.js +++ b/client/src/bundleEntries.js @@ -44,7 +44,6 @@ export function chart(options) { } export { initMasthead } from "components/Masthead/initMasthead"; -export { mountHistory } from "components/History/mount"; export { mountMakoTags } from "components/Tags"; export { mountPageEditor } from "components/PageEditor/mount"; export { mountPageDisplay } from "components/PageDisplay"; diff --git a/client/src/components/History/mount.js b/client/src/components/History/mount.js deleted file mode 100644 index 7faf83e76f3..00000000000 --- a/client/src/components/History/mount.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Endpoint for mounting History in non-Vue environment. - */ -import Vue from "vue"; -import VueRouter from "vue-router"; -import HistoryView from "./HistoryView"; -import store from "store"; -import { safePath } from "utils/redirect"; - -Vue.use(VueRouter); - -export const mountHistory = (el, propsData) => { - const component = Vue.extend(HistoryView); - const router = new VueRouter(); - router.push = (url) => { - window.location.href = safePath(url); - }; - return new component({ - el: el, - propsData: propsData, - router: router, - store: store, - }); -}; From 07f03a1e02f77b7f841e7f92f0f297c5d7f3337c Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 10:50:11 -0400 Subject: [PATCH 3/6] Remove Page Editor / Display mount helpers --- client/src/bundleEntries.js | 2 -- client/src/components/PageDisplay/index.js | 4 ---- client/src/components/PageDisplay/mount.js | 16 ---------------- client/src/components/PageEditor/index.js | 1 - client/src/components/PageEditor/mount.js | 13 ------------- 5 files changed, 36 deletions(-) delete mode 100644 client/src/components/PageDisplay/index.js delete mode 100644 client/src/components/PageDisplay/mount.js delete mode 100644 client/src/components/PageEditor/index.js delete mode 100644 client/src/components/PageEditor/mount.js diff --git a/client/src/bundleEntries.js b/client/src/bundleEntries.js index c751646652f..d050a87a2b1 100644 --- a/client/src/bundleEntries.js +++ b/client/src/bundleEntries.js @@ -45,8 +45,6 @@ export function chart(options) { export { initMasthead } from "components/Masthead/initMasthead"; export { mountMakoTags } from "components/Tags"; -export { mountPageEditor } from "components/PageEditor/mount"; -export { mountPageDisplay } from "components/PageDisplay"; // Used in common.mako export { default as store } from "storemodern"; diff --git a/client/src/components/PageDisplay/index.js b/client/src/components/PageDisplay/index.js deleted file mode 100644 index 1a732b7cdfe..00000000000 --- a/client/src/components/PageDisplay/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as PageDisplay } from "./PageDisplay"; - -// function for mounting page display in non-Vue environments -export { mountPageDisplay } from "./mount"; diff --git a/client/src/components/PageDisplay/mount.js b/client/src/components/PageDisplay/mount.js deleted file mode 100644 index 96bba73373f..00000000000 --- a/client/src/components/PageDisplay/mount.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Endpoint for mounting PageDisplay from non-Vue environment (annotated DOMs). - */ -import $ from "jquery"; -import Vue from "vue"; -import store from "store"; -import PageDisplay from "./PageDisplay.vue"; - -export const mountPageDisplay = (propsData = {}) => { - $("#page-display-content").each((index, el) => { - const pageId = $(el).attr("page_id"); - const component = Vue.extend(PageDisplay); - propsData.pageId = pageId; - return new component({ store: store, propsData: propsData }).$mount(el); - }); -}; diff --git a/client/src/components/PageEditor/index.js b/client/src/components/PageEditor/index.js deleted file mode 100644 index 326ba8fc57f..00000000000 --- a/client/src/components/PageEditor/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as PageEditor } from "./PageEditor.vue"; diff --git a/client/src/components/PageEditor/mount.js b/client/src/components/PageEditor/mount.js deleted file mode 100644 index 4260bb0eb5f..00000000000 --- a/client/src/components/PageEditor/mount.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Endpoint for mounting WorkflowEditor from non-Vue environment (editor.mako). - */ -import Vue from "vue"; -import PageEditor from "./PageEditor"; - -export const mountPageEditor = (propsData) => { - const component = Vue.extend(PageEditor); - return new component({ - propsData: propsData, - el: "#columns", - }); -}; From 4949ef2cdff00f3695872bd5a52539854dea9741 Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 10:51:26 -0400 Subject: [PATCH 4/6] Remove legacy masthead mount helpers --- client/src/bundleEntries.js | 1 - .../src/components/Masthead/initMasthead.js | 18 --------------- client/src/layout/masthead.js | 23 ------------------- 3 files changed, 42 deletions(-) delete mode 100644 client/src/components/Masthead/initMasthead.js delete mode 100644 client/src/layout/masthead.js diff --git a/client/src/bundleEntries.js b/client/src/bundleEntries.js index d050a87a2b1..fd41c060c12 100644 --- a/client/src/bundleEntries.js +++ b/client/src/bundleEntries.js @@ -43,7 +43,6 @@ export function chart(options) { return new Client(options); } -export { initMasthead } from "components/Masthead/initMasthead"; export { mountMakoTags } from "components/Tags"; // Used in common.mako diff --git a/client/src/components/Masthead/initMasthead.js b/client/src/components/Masthead/initMasthead.js deleted file mode 100644 index 6b96f5d82cf..00000000000 --- a/client/src/components/Masthead/initMasthead.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Temporary function used to mount the masthead inside the current application. - * This function is exposed with the rest of the page-globals in bundledEntries. - */ -import { mountMasthead } from "layout/masthead"; -import $ from "jquery"; - -export function initMasthead(config, container) { - console.log("initMasthead"); - const $masthead = $("#masthead"); - if (config.hide_masthead) { - $masthead.remove(); - } else { - if (container) { - mountMasthead(container, config); - } - } -} diff --git a/client/src/layout/masthead.js b/client/src/layout/masthead.js deleted file mode 100644 index a9645e116a2..00000000000 --- a/client/src/layout/masthead.js +++ /dev/null @@ -1,23 +0,0 @@ -import Masthead from "components/Masthead/Masthead"; -import { mountVueComponent } from "utils/mountVueComponent"; -import { fetchMenu } from "entry/analysis/menu"; -import { safePath } from "utils/redirect"; - -export function mountMasthead(el, options) { - const mounted = mountVueComponent(Masthead)( - { - el: el, - displayGalaxyBrand: options.display_galaxy_brand, - tabs: fetchMenu(options), - brand: options.brand, - logoUrl: options.logo_url, - logoSrc: options.logo_src, - logoSrcSecondary: options.logo_src_secondary, - }, - el - ); - mounted.$on("open-url", (options) => { - window.location = safePath(options.url); - }); - return mounted; -} From cf90b11d8b1fe678412e018de09199bcd8c61b00 Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 11:28:10 -0400 Subject: [PATCH 5/6] Remove workflow invocations legacy mount helper --- .../components/WorkflowInvocationState/index.js | 4 ---- .../components/WorkflowInvocationState/mount.js | 14 -------------- 2 files changed, 18 deletions(-) delete mode 100644 client/src/components/WorkflowInvocationState/index.js delete mode 100644 client/src/components/WorkflowInvocationState/mount.js diff --git a/client/src/components/WorkflowInvocationState/index.js b/client/src/components/WorkflowInvocationState/index.js deleted file mode 100644 index 0e0e9faa990..00000000000 --- a/client/src/components/WorkflowInvocationState/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as WorkflowInvocationState } from "./WorkflowInvocationState"; - -// functions for mounting display in non-Vue environments -export { mountWorkflowInvocationState } from "./mount"; diff --git a/client/src/components/WorkflowInvocationState/mount.js b/client/src/components/WorkflowInvocationState/mount.js deleted file mode 100644 index 8dc8767d0d0..00000000000 --- a/client/src/components/WorkflowInvocationState/mount.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Endpoint for mounting workflow invocation state from non-Vue environment. - */ -import $ from "jquery"; -import WorkflowInvocationState from "./WorkflowInvocationState.vue"; -import { mountVueComponent } from "utils/mountVueComponent"; - -export const mountWorkflowInvocationState = (propsData = {}) => { - $(".workflow-invocation-state").each((index, el) => { - const invocationId = $(el).attr("workflow_invocation_id"); - propsData.invocationId = invocationId; - mountVueComponent(WorkflowInvocationState)(propsData, el); - }); -}; From d103a9fb7fda23370ecc5e13f1bf01aa9150d4c1 Mon Sep 17 00:00:00 2001 From: guerler Date: Thu, 20 Oct 2022 11:29:30 -0400 Subject: [PATCH 6/6] Remove legacy dataset embedding mount helpers --- client/src/components/Dataset/mount.js | 32 ------------------- .../components/Workflow/Invocations.test.js | 2 +- .../src/components/Workflow/Invocations.vue | 2 +- .../Workflow/Run/WorkflowRunSuccess.vue | 2 +- 4 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 client/src/components/Dataset/mount.js diff --git a/client/src/components/Dataset/mount.js b/client/src/components/Dataset/mount.js deleted file mode 100644 index a577a4374e4..00000000000 --- a/client/src/components/Dataset/mount.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Endpoint for mounting dataset components from non-Vue environment. - */ -import $ from "jquery"; -import DatasetLink from "./DatasetLink/DatasetLink"; -import { mountVueComponent } from "utils/mountVueComponent"; -import DatasetIndex from "./DatasetIndex/DatasetIndex"; -import DatasetAsImage from "./DatasetAsImage/DatasetAsImage"; - -export const mountDatasetAsImage = () => { - return mountDatasetComponent(".dataset-as-image", ["history_dataset_id", "path"], DatasetAsImage); -}; -export const mountDatasetIndex = () => { - return mountDatasetComponent(".dataset-index", ["history_dataset_id", "path"], DatasetIndex); -}; -export const mountDatasetLink = () => { - return mountDatasetComponent(".dataset-link", ["history_dataset_id", "path", "label"], DatasetLink); -}; - -export const mountDatasetComponents = () => { - const all = [mountDatasetAsImage, mountDatasetIndex, mountDatasetLink]; - all.forEach((func) => func()); -}; - -const mountDatasetComponent = (selector, props, component, propsData = {}) => { - $(selector).each((index, el) => { - props.forEach((prop) => { - propsData[prop] = $(el).attr(prop); - }); - mountVueComponent(component)(propsData, el); - }); -}; diff --git a/client/src/components/Workflow/Invocations.test.js b/client/src/components/Workflow/Invocations.test.js index 8b1271e2bfe..ebe93e2bdf8 100644 --- a/client/src/components/Workflow/Invocations.test.js +++ b/client/src/components/Workflow/Invocations.test.js @@ -1,4 +1,4 @@ -import Invocations from "../Workflow/Invocations"; +import Invocations from "./Invocations"; import { mount } from "@vue/test-utils"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; diff --git a/client/src/components/Workflow/Invocations.vue b/client/src/components/Workflow/Invocations.vue index 44b517ab491..ab80cadf3da 100644 --- a/client/src/components/Workflow/Invocations.vue +++ b/client/src/components/Workflow/Invocations.vue @@ -83,7 +83,7 @@ import { getAppRoot } from "onload/loadConfig"; import { getGalaxyInstance } from "app"; import { invocationsProvider } from "components/providers/InvocationsProvider"; -import { WorkflowInvocationState } from "components/WorkflowInvocationState"; +import WorkflowInvocationState from "components/WorkflowInvocationState/WorkflowInvocationState"; import WorkflowRunButton from "./WorkflowRunButton.vue"; import UtcDate from "components/UtcDate"; import { mapCacheActions } from "vuex-cache"; diff --git a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue index a127c9ddf04..00e207ab0dc 100644 --- a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue +++ b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue @@ -26,7 +26,7 @@