From 3f6a0c975911ac9b515c26b08f76b95a643058d5 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 6 Nov 2023 10:16:04 -0500 Subject: [PATCH 1/7] Implement Galaxy Markdown tag history_dataset_as_table. --- .../Elements/HistoryDatasetAsTable.vue | 126 ++++++++++++++++++ .../components/Markdown/MarkdownContainer.vue | 19 +++ .../components/Markdown/MarkdownToolBox.vue | 5 + lib/galaxy/managers/markdown_parse.py | 10 ++ lib/galaxy/managers/markdown_util.py | 19 +++ 5 files changed, 179 insertions(+) create mode 100644 client/src/components/Markdown/Elements/HistoryDatasetAsTable.vue diff --git a/client/src/components/Markdown/Elements/HistoryDatasetAsTable.vue b/client/src/components/Markdown/Elements/HistoryDatasetAsTable.vue new file mode 100644 index 000000000000..dd74936ca879 --- /dev/null +++ b/client/src/components/Markdown/Elements/HistoryDatasetAsTable.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/client/src/components/Markdown/MarkdownContainer.vue b/client/src/components/Markdown/MarkdownContainer.vue index c338743a39e2..13806a855da4 100644 --- a/client/src/components/Markdown/MarkdownContainer.vue +++ b/client/src/components/Markdown/MarkdownContainer.vue @@ -4,6 +4,7 @@ import { computed, ref } from "vue"; import { useConfig } from "@/composables/config"; import HistoryDatasetAsImage from "./Elements/HistoryDatasetAsImage.vue"; +import HistoryDatasetAsTable from "./Elements/HistoryDatasetAsTable.vue"; import HistoryDatasetCollectionDisplay from "./Elements/HistoryDatasetCollection/CollectionDisplay.vue"; import HistoryDatasetDetails from "./Elements/HistoryDatasetDetails.vue"; import HistoryDatasetDisplay from "./Elements/HistoryDatasetDisplay.vue"; @@ -68,6 +69,17 @@ const props = defineProps({ const isCollapsible = computed(() => props.args.collapse !== undefined); const isVisible = computed(() => !isCollapsible.value || toggle.value); + +function argToBoolean(args, name, booleanDefault) { + const valueAsString = args[name]; + if (valueAsString == "true") { + return true; + } else if (valueAsString == "false") { + return false; + } else { + return booleanDefault; + } +}