From 24facf52f4436275dc1e8b85e69dd047649b32d7 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/__init__.py | 2 + lib/galaxy/config/config_manage.py | 2 + lib/galaxy/config/schemas/config_schema.yml | 53 +++++++--- 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 | 4 +- 12 files changed, 275 insertions(+), 20 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 @@