From b172750072aa3ed0669edc058b0c9ecc0cb67923 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Thu, 28 Sep 2023 12:47:29 -0400 Subject: [PATCH 1/2] exposing workflow version as workflow checkpoint --- client/src/components/Markdown/Markdown.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/src/components/Markdown/Markdown.vue b/client/src/components/Markdown/Markdown.vue index 57a794b2b554..c5e6b08ea642 100644 --- a/client/src/components/Markdown/Markdown.vue +++ b/client/src/components/Markdown/Markdown.vue @@ -27,6 +27,9 @@

Title: {{ markdownConfig.title || markdownConfig.model_class }}

+

+ Workflow Checkpoint: {{ workflowVersions.version }} +

@@ -67,9 +70,12 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import BootstrapVue from "bootstrap-vue"; import MarkdownIt from "markdown-it"; import markdownItRegexp from "markdown-it-regexp"; +import { mapActions } from "pinia"; import store from "store"; import Vue from "vue"; +import { useWorkflowStore } from "@/stores/workflowStore"; + import MarkdownContainer from "./MarkdownContainer.vue"; import LoadingSpan from "components/LoadingSpan.vue"; import StsDownloadButton from "components/StsDownloadButton.vue"; @@ -131,6 +137,7 @@ export default { jobs: {}, invocations: {}, loading: true, + workflowID: "", }; }, computed: { @@ -151,6 +158,9 @@ export default { } return "unavailable"; }, + workflowVersions() { + return this.getStoredWorkflowByInstanceId(this.workflowID); + }, version() { return this.markdownConfig.generate_version || "Unknown Galaxy Version"; }, @@ -162,8 +172,10 @@ export default { }, created() { this.initConfig(); + this.getWFversion(); }, methods: { + ...mapActions(useWorkflowStore, ["getStoredWorkflowByInstanceId", "fetchWorkflowForInstanceId"]), initConfig() { if (Object.keys(this.markdownConfig).length) { const config = this.markdownConfig; @@ -177,8 +189,12 @@ export default { this.jobs = config.jobs || {}; this.invocations = config.invocations || {}; this.loading = false; + this.workflowID = Object.keys(this.markdownConfig.workflows)[0]; } }, + getWFversion() { + this.fetchWorkflowForInstanceId(this.workflowID); + }, splitMarkdown(markdown) { const sections = []; let digest = markdown; From ae40fae7a8968768b703a84319224ce29d2e16ca Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Thu, 2 Nov 2023 13:21:42 -0400 Subject: [PATCH 2/2] changing h3 tag to h2 and removing unnecessary methods --- client/src/components/Markdown/Markdown.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/components/Markdown/Markdown.vue b/client/src/components/Markdown/Markdown.vue index c5e6b08ea642..50990e0bdac9 100644 --- a/client/src/components/Markdown/Markdown.vue +++ b/client/src/components/Markdown/Markdown.vue @@ -27,9 +27,9 @@

Title: {{ markdownConfig.title || markdownConfig.model_class }}

-

+

Workflow Checkpoint: {{ workflowVersions.version }} -

+ @@ -172,7 +172,7 @@ export default { }, created() { this.initConfig(); - this.getWFversion(); + this.fetchWorkflowForInstanceId(this.workflowID); }, methods: { ...mapActions(useWorkflowStore, ["getStoredWorkflowByInstanceId", "fetchWorkflowForInstanceId"]), @@ -192,9 +192,6 @@ export default { this.workflowID = Object.keys(this.markdownConfig.workflows)[0]; } }, - getWFversion() { - this.fetchWorkflowForInstanceId(this.workflowID); - }, splitMarkdown(markdown) { const sections = []; let digest = markdown;