From 8ff3702a15e589be5c347a5615e171950e994347 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 11 Sep 2023 15:47:15 -0400 Subject: [PATCH] Implement instance URLs in Galaxy markdown. --- .../Markdown/Elements/InstanceUrl.vue | 31 ++++++ .../Markdown/MarkdownContainer.test.js | 7 ++ .../components/Markdown/MarkdownContainer.vue | 38 +++++++ .../components/Markdown/MarkdownToolBox.vue | 43 ++++++++ .../components/PageDisplay/PageDisplay.vue | 4 +- lib/galaxy/config/schemas/config_schema.yml | 29 ++++- lib/galaxy/managers/configuration.py | 4 + lib/galaxy/managers/markdown_parse.py | 7 ++ lib/galaxy/managers/markdown_util.py | 100 ++++++++++++++++++ lib/galaxy/webapps/galaxy/api/drs.py | 8 +- 10 files changed, 266 insertions(+), 5 deletions(-) create mode 100644 client/src/components/Markdown/Elements/InstanceUrl.vue diff --git a/client/src/components/Markdown/Elements/InstanceUrl.vue b/client/src/components/Markdown/Elements/InstanceUrl.vue new file mode 100644 index 000000000000..a7f52d957354 --- /dev/null +++ b/client/src/components/Markdown/Elements/InstanceUrl.vue @@ -0,0 +1,31 @@ + + + diff --git a/client/src/components/Markdown/MarkdownContainer.test.js b/client/src/components/Markdown/MarkdownContainer.test.js index 484e92c97e94..a40f1d810176 100644 --- a/client/src/components/Markdown/MarkdownContainer.test.js +++ b/client/src/components/Markdown/MarkdownContainer.test.js @@ -11,6 +11,13 @@ import MountTarget from "./MarkdownContainer.vue"; jest.mock("utils/redirect"); withPrefix.mockImplementation((url) => url); +jest.mock("@/composables/config", () => ({ + useConfig: jest.fn(() => ({ + config: {}, + isConfigLoaded: true, + })), +})); + const localVue = getLocalVue(); const axiosMock = new MockAdapter(axios); diff --git a/client/src/components/Markdown/MarkdownContainer.vue b/client/src/components/Markdown/MarkdownContainer.vue index 9ece148b02b6..5e0be545dd5a 100644 --- a/client/src/components/Markdown/MarkdownContainer.vue +++ b/client/src/components/Markdown/MarkdownContainer.vue @@ -1,6 +1,8 @@