From 4e9b9f0853be6a52532c2b50b8c5b193fe0be350 Mon Sep 17 00:00:00 2001 From: guerler Date: Sun, 1 Dec 2024 22:50:27 +0300 Subject: [PATCH] Move VegaWrapper to Common folder, use also in Markdown --- .../VegaWrapper.vue | 0 client/src/components/Markdown/Markdown.vue | 6 +++++- .../Markdown/{ => Sections}/MarkdownDefault.vue | 0 .../Markdown/Sections/MarkdownVega.vue | 17 +++++++++++++++++ .../WorkflowInvocationMetrics.vue | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) rename client/src/components/{WorkflowInvocationState => Common}/VegaWrapper.vue (100%) rename client/src/components/Markdown/{ => Sections}/MarkdownDefault.vue (100%) create mode 100644 client/src/components/Markdown/Sections/MarkdownVega.vue diff --git a/client/src/components/WorkflowInvocationState/VegaWrapper.vue b/client/src/components/Common/VegaWrapper.vue similarity index 100% rename from client/src/components/WorkflowInvocationState/VegaWrapper.vue rename to client/src/components/Common/VegaWrapper.vue diff --git a/client/src/components/Markdown/Markdown.vue b/client/src/components/Markdown/Markdown.vue index 85534cc86c71..435574c7d6b2 100644 --- a/client/src/components/Markdown/Markdown.vue +++ b/client/src/components/Markdown/Markdown.vue @@ -46,6 +46,7 @@
+ +const VegaWrapper = () => import("@/components/Common/VegaWrapper.vue"); +import { computed } from "vue"; + +const props = defineProps<{ + content: string; +}>(); + +const spec = computed(() => ({ + ...JSON.parse(props.content), + width: "container", +})); + + + diff --git a/client/src/components/WorkflowInvocationState/WorkflowInvocationMetrics.vue b/client/src/components/WorkflowInvocationState/WorkflowInvocationMetrics.vue index 91782651b709..db1c58667e5c 100644 --- a/client/src/components/WorkflowInvocationState/WorkflowInvocationMetrics.vue +++ b/client/src/components/WorkflowInvocationState/WorkflowInvocationMetrics.vue @@ -6,7 +6,7 @@ import { type ComputedRef } from "vue"; import { type components, GalaxyApi } from "@/api"; import { errorMessageAsString } from "@/utils/simple-error"; -const VegaWrapper = () => import("./VegaWrapper.vue"); +const VegaWrapper = () => import("@/components/Common/VegaWrapper.vue"); const props = defineProps({ invocationId: {