Skip to content

Commit

Permalink
Merge pull request #96 from CUAHSI:frontend-logs
Browse files Browse the repository at this point in the history
format metadata
  • Loading branch information
devincowan authored Sep 24, 2024
2 parents 313d4e7 + 80ca852 commit f80f557
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions app/frontend/src/views/SubmissionsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,28 @@
</v-card>
</v-bottom-sheet>

<v-bottom-sheet v-model="sheetText" inset>
<v-card class="text-center" height="100%">
<v-bottom-sheet v-model="metadataObject" inset>
<v-card height="100%">
<v-btn class="ml-auto" @click="metadataObject = null">
close
</v-btn>
<!-- show all of the key/value pairs of the metadataObject -->
<v-card-text>
<v-btn @click="sheetText = null">
close
</v-btn>

<br>
<br>
<div>
{{ sheetText }}
</div>
<strong>Metadata</strong>
<v-data-table :headers="Object.keys(metadataObject.metadata)" :items="[metadataObject.metadata]">
<template v-slot:item="{ item }">
<tr v-for="(value, key) in item" v-bind:key="key">
<td>{{ key }}</td>
<td>{{ value }}</td>
</tr>
</template>
</v-data-table>
</v-card-text>
<v-divider></v-divider>
<v-card-text>
<strong>Status</strong>
<!-- pretty format the metadataObject.status json and show it -->
<pre>{{ JSON.stringify(metadataObject.status, null, 2) }}</pre>
</v-card-text>
</v-card>
</v-bottom-sheet>
Expand All @@ -97,7 +107,7 @@ let interval = null
let logsArray = ref(null)
let showingLogs = ref(false)
let selectedSubmission = ref({})
let sheetText = ref('')
let metadataObject = ref(null)
let refreshingItem = ref({})
let refreshing = ref(true)
Expand Down Expand Up @@ -209,7 +219,7 @@ async function showArgo(submission) {
const argoUrl = `${argoEndpoint}/${submission.workflow_id}`
const response = await fetchWrapper.get(argoUrl)
const metadata = await response.unpacked
sheetText.value = metadata
metadataObject.value = metadata
}
async function refreshSubmission(submission) {
Expand Down

0 comments on commit f80f557

Please sign in to comment.