From 7f13ca33bab57e1d9a5362905c81826e1ccc8090 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 | 51 ++++++--- .../schemas/tool_shed_config_schema.yml | 25 +++-- 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 +- lib/tool_shed/managers/trs.py | 4 +- 14 files changed, 292 insertions(+), 30 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 b544ae3d71e2..f73b37934f12 100644 --- a/client/src/components/Markdown/MarkdownContainer.vue +++ b/client/src/components/Markdown/MarkdownContainer.vue @@ -1,6 +1,8 @@