Skip to content

Commit b7fc2e3

Browse files
authored
Merge pull request galaxyproject#16760 from assuntad23/16556/include-wf-version
WF Report Enhancement: Exposing Workflow Version as Workflow Checkpoint
2 parents ea0fe80 + ae40fae commit b7fc2e3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

client/src/components/Markdown/Markdown.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<h1 class="text-break align-middle">
2828
Title: {{ markdownConfig.title || markdownConfig.model_class }}
2929
</h1>
30+
<h2 v-if="workflowVersions" class="text-break align-middle">
31+
Workflow Checkpoint: {{ workflowVersions.version }}
32+
</h2>
3033
</span>
3134
</div>
3235
<b-badge variant="info" class="w-100 rounded mb-3 white-space-normal">
@@ -67,9 +70,12 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
6770
import BootstrapVue from "bootstrap-vue";
6871
import MarkdownIt from "markdown-it";
6972
import markdownItRegexp from "markdown-it-regexp";
73+
import { mapActions } from "pinia";
7074
import store from "store";
7175
import Vue from "vue";
7276
77+
import { useWorkflowStore } from "@/stores/workflowStore";
78+
7379
import MarkdownContainer from "./MarkdownContainer.vue";
7480
import LoadingSpan from "components/LoadingSpan.vue";
7581
import StsDownloadButton from "components/StsDownloadButton.vue";
@@ -131,6 +137,7 @@ export default {
131137
jobs: {},
132138
invocations: {},
133139
loading: true,
140+
workflowID: "",
134141
};
135142
},
136143
computed: {
@@ -158,6 +165,9 @@ export default {
158165
}
159166
return "unavailable";
160167
},
168+
workflowVersions() {
169+
return this.getStoredWorkflowByInstanceId(this.workflowID);
170+
},
161171
version() {
162172
return this.markdownConfig.generate_version || "Unknown Galaxy Version";
163173
},
@@ -169,8 +179,10 @@ export default {
169179
},
170180
created() {
171181
this.initConfig();
182+
this.fetchWorkflowForInstanceId(this.workflowID);
172183
},
173184
methods: {
185+
...mapActions(useWorkflowStore, ["getStoredWorkflowByInstanceId", "fetchWorkflowForInstanceId"]),
174186
initConfig() {
175187
if (Object.keys(this.markdownConfig).length) {
176188
const config = this.markdownConfig;
@@ -184,6 +196,7 @@ export default {
184196
this.jobs = config.jobs || {};
185197
this.invocations = config.invocations || {};
186198
this.loading = false;
199+
this.workflowID = Object.keys(this.markdownConfig.workflows)[0];
187200
}
188201
},
189202
splitMarkdown(markdown) {

0 commit comments

Comments
 (0)