Skip to content
Snippets Groups Projects

Resolve "Create show Workflow Version Page"

Merged Daniel Göbel requested to merge feature/37-create-show-workflow-version-page into development
2 files
+ 69
34
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -13,7 +13,7 @@ const props = defineProps<{
@@ -13,7 +13,7 @@ const props = defineProps<{
const versionState = reactive({
const versionState = reactive({
loading: true,
loading: true,
markdownLoading: true,
fileLoading: true,
version: undefined,
version: undefined,
errorLoading: false,
errorLoading: false,
descriptionMarkdown: "",
descriptionMarkdown: "",
@@ -21,7 +21,7 @@ const versionState = reactive({
@@ -21,7 +21,7 @@ const versionState = reactive({
parameterSchema: {},
parameterSchema: {},
} as {
} as {
loading: boolean;
loading: boolean;
markdownLoading: boolean;
fileLoading: boolean;
version: undefined | WorkflowVersionFull;
version: undefined | WorkflowVersionFull;
descriptionMarkdown: string;
descriptionMarkdown: string;
changelogMarkdown: string;
changelogMarkdown: string;
@@ -40,6 +40,7 @@ watch(
@@ -40,6 +40,7 @@ watch(
function updateVersion(versionId: string, workflowId: string) {
function updateVersion(versionId: string, workflowId: string) {
versionState.loading = true;
versionState.loading = true;
 
versionState.fileLoading = true;
WorkflowVersionService.workflowVersionGetWorkflowVersion(
WorkflowVersionService.workflowVersionGetWorkflowVersion(
versionId,
versionId,
workflowId
workflowId
@@ -61,15 +62,23 @@ onMounted(() => {
@@ -61,15 +62,23 @@ onMounted(() => {
});
});
function downloadVersionFiles(version: WorkflowVersionFull) {
function downloadVersionFiles(version: WorkflowVersionFull) {
axios.get(version.readme_url).then((response) => {
const descriptionPromise = axios.get(version.readme_url).then((response) => {
versionState.descriptionMarkdown = response.data;
versionState.descriptionMarkdown = response.data;
});
});
axios.get(version.changelog_url).then((response) => {
const changelogPromise = axios.get(version.changelog_url).then((response) => {
versionState.changelogMarkdown = response.data;
versionState.changelogMarkdown = response.data;
});
});
axios.get(version.parameter_schema_url).then((response) => {
const parameterPromise = axios
versionState.parameterSchema = response.data;
.get(version.parameter_schema_url)
});
.then((response) => {
 
versionState.parameterSchema = response.data;
 
});
 
Promise.all([descriptionPromise, changelogPromise, parameterPromise]).finally(
 
() => {
 
versionState.fileLoading = false;
 
console.log("All loaded");
 
}
 
);
}
}
</script>
</script>
@@ -79,7 +88,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
@@ -79,7 +88,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
<router-link
<router-link
class="nav-link"
class="nav-link"
aria-current="page"
aria-current="page"
:to="{ path: '#', query: { tab: 'description' } }"
:to="{ query: { tab: 'description' } }"
:class="{ active: props.activeTab === 'description' }"
:class="{ active: props.activeTab === 'description' }"
>Description
>Description
</router-link>
</router-link>
@@ -87,7 +96,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
@@ -87,7 +96,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
<li class="nav-item">
<li class="nav-item">
<router-link
<router-link
class="nav-link"
class="nav-link"
:to="{ path: '#', query: { tab: 'parameters' } }"
:to="{ query: { tab: 'parameters' } }"
:class="{ active: props.activeTab === 'parameters' }"
:class="{ active: props.activeTab === 'parameters' }"
>Parameters
>Parameters
</router-link>
</router-link>
@@ -95,7 +104,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
@@ -95,7 +104,7 @@ function downloadVersionFiles(version: WorkflowVersionFull) {
<li class="nav-item">
<li class="nav-item">
<router-link
<router-link
class="nav-link"
class="nav-link"
:to="{ path: '#', query: { tab: 'changes' } }"
:to="{ query: { tab: 'changes' } }"
:class="{ active: props.activeTab === 'changes' }"
:class="{ active: props.activeTab === 'changes' }"
>Releases
>Releases
</router-link>
</router-link>
Loading