Skip to content

Commit

Permalink
Merge branch 'subsetter_front_clean' into develop_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Nov 28, 2023
2 parents f261939 + 241920a commit 2529520
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/frontend/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export const ENDPOINTS = {
logs: `${API_BASE}/logs`,
url: `${API_BASE}/url`,
submissions: `${API_BASE}/submissions`,
refresh: `${API_BASE}/refresh`,
};
7 changes: 6 additions & 1 deletion app/frontend/src/stores/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ export const useSubmissionsStore = defineStore('submissions', () => {
let submissions = submissionsObj.submissions
this.submissions = submissions
}
return { submissions, getSubmissions}

async function refreshWorkflows() {
return fetchWrapper.get(`${ENDPOINTS.refresh}`)
}

return { submissions, getSubmissions, refreshWorkflows}
})
14 changes: 9 additions & 5 deletions app/frontend/src/views/SubmissionsView.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div>SUBMISSIONS</div>
<v-card class="ma-10" v-for="submission in submissionStore.submissions" :key="submission.id" width="400">
workflow_name: {{ submission.workflow_name }}
workflow_id: {{ submission.workflow_id }}
startedAt: {{ submission.startedAt }}
estimatedDuration: {{submission.estimatedDuration }}
<a :href="`${downloadEndpoint}/${submission.workflow_id}`">Download</a>
<div>workflow_name: {{ submission.workflow_name }}</div>
<div>workflow_id: {{ submission.workflow_id }}</div>
<div>startedAt: {{ submission.startedAt }}</div>
<div>estimatedDuration: {{submission.estimatedDuration }}</div>
<div>phase: {{ submission.phase }}</div>
<v-btn v-if="submission.phase == 'Succeeded'"><a :href="`${downloadEndpoint}/${submission.workflow_id}`" target="_blank">Download</a></v-btn>
<v-btn><a :href="`${refreshEndpoint}/${submission.workflow_id}`" target="_blank">Refresh</a></v-btn>
</v-card>
<v-container>
<a href="https://workflows.argo.cuahsi.io/workflows">argo.cuahsi.io</a>
Expand All @@ -17,7 +19,9 @@ import { useSubmissionsStore } from '@/stores/submissions'
import { ENDPOINTS } from '@/constants'
const downloadEndpoint = ENDPOINTS.download
const refreshEndpoint = ENDPOINTS.refresh
const submissionStore = useSubmissionsStore();
submissionStore.refreshWorkflows()
submissionStore.getSubmissions()
</script>

0 comments on commit 2529520

Please sign in to comment.