Skip to content
Snippets Groups Projects
Verified Commit e891980d authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Add button to refresh workflow execution list

#52
parent f4e3d14c
No related branches found
No related tags found
2 merge requests!84Remove development branch,!45Resolve "Refresh workflow execution list"
Pipeline #27745 passed
...@@ -114,7 +114,7 @@ function updateValue() { ...@@ -114,7 +114,7 @@ function updateValue() {
"update:modelValue", "update:modelValue",
!s3Path.bucket && s3Path.key !s3Path.bucket && s3Path.key
? undefined ? undefined
: `s3://${s3Path.bucket}/${s3Path.key}` : `s3://${s3Path.bucket}/${s3Path.key ?? ""}`
); );
} else { } else {
emit( emit(
......
...@@ -138,7 +138,8 @@ function updateExecutions() { ...@@ -138,7 +138,8 @@ function updateExecutions() {
) )
.filter( .filter(
// filter already seen workflow versions // filter already seen workflow versions
(version) => !executionsState.versionMapping[version.workflow_id] (version) =>
!executionsState.versionMapping[version.workflow_version_id]
) )
.filter( .filter(
// filter unique workflow versions // filter unique workflow versions
...@@ -225,9 +226,14 @@ onMounted(() => { ...@@ -225,9 +226,14 @@ onMounted(() => {
class="row m-2 border-bottom border-light mb-4 justify-content-between align-items-center" class="row m-2 border-bottom border-light mb-4 justify-content-between align-items-center"
> >
<h1 class="mb-2 text-light w-fit">My Workflow Executions</h1> <h1 class="mb-2 text-light w-fit">My Workflow Executions</h1>
<router-link :to="{ name: 'workflows' }" class="btn btn-primary w-fit" <div class="w-fit">
>Start Workflow Execution</router-link <button class="btn btn-light me-2" @click="updateExecutions">
> <font-awesome-icon icon="fa-solid fa-arrow-rotate-right" />
</button>
<router-link :to="{ name: 'workflows' }" class="btn btn-primary"
>Start Workflow Execution</router-link
>
</div>
</div> </div>
<table <table
class="table table-dark table-striped table-hover caption-top align-middle" class="table table-dark table-striped table-hover caption-top align-middle"
...@@ -245,6 +251,7 @@ onMounted(() => { ...@@ -245,6 +251,7 @@ onMounted(() => {
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col">Started</th> <th scope="col">Started</th>
<th scope="col">Ended</th> <th scope="col">Ended</th>
<th scope="col">Notes</th>
<th scope="col"></th> <th scope="col"></th>
</tr> </tr>
</thead> </thead>
...@@ -254,13 +261,16 @@ onMounted(() => { ...@@ -254,13 +261,16 @@ onMounted(() => {
<td class="placeholder-glow w-25"> <td class="placeholder-glow w-25">
<span class="placeholder col-6"></span> <span class="placeholder col-6"></span>
</td> </td>
<td class="placeholder-glow" style="width: 20%"> <td class="placeholder-glow" style="width: 15%">
<span class="placeholder col-4"></span> <span class="placeholder col-4"></span>
</td> </td>
<td class="placeholder-glow" style="width: 20%"> <td class="placeholder-glow" style="width: 15%">
<span class="placeholder col-6"></span> <span class="placeholder col-6"></span>
</td> </td>
<td class="placeholder-glow" style="width: 20%"> <td class="placeholder-glow" style="width: 15%">
<span class="placeholder col-6"></span>
</td>
<td class="placeholder-glow" style="width: 15%">
<span class="placeholder col-6"></span> <span class="placeholder col-6"></span>
</td> </td>
<td class="text-end"> <td class="text-end">
...@@ -290,14 +300,19 @@ onMounted(() => { ...@@ -290,14 +300,19 @@ onMounted(() => {
<span class="placeholder col-6"></span> <span class="placeholder col-6"></span>
</td> </td>
<td v-else> <td v-else>
<span>{{ <router-link
executionsState.workflowMapping[execution.workflow_id] :to="{
}}</span> name: 'workflow-version',
<span params: {
>@{{ versionId: execution.workflow_version_id,
executionsState.versionMapping[execution.workflow_version_id] workflowId: execution.workflow_id,
}}</span },
}"
> >
{{ executionsState.workflowMapping[execution.workflow_id] }}@{{
executionsState.versionMapping[execution.workflow_version_id]
}}
</router-link>
</td> </td>
<td> <td>
<span <span
...@@ -316,6 +331,10 @@ onMounted(() => { ...@@ -316,6 +331,10 @@ onMounted(() => {
</template> </template>
<template v-else> - </template> <template v-else> - </template>
</td> </td>
<td class="text-truncate">
<template v-if="execution.notes">{{ execution.notes }}</template>
<template v-else>-</template>
</td>
<td class="text-end"> <td class="text-end">
<div <div
class="btn-group btn-group-sm dropdown-center dropdown-menu-start" class="btn-group btn-group-sm dropdown-center dropdown-menu-start"
...@@ -358,7 +377,7 @@ onMounted(() => { ...@@ -358,7 +377,7 @@ onMounted(() => {
</tr> </tr>
</template> </template>
<tr v-else> <tr v-else>
<td colspan="5" class="text-center"><i>No workflow executions</i></td> <td colspan="6" class="text-center"><i>No workflow executions</i></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -4,7 +4,6 @@ import type { WorkflowVersionFull } from "@/client/workflow"; ...@@ -4,7 +4,6 @@ import type { WorkflowVersionFull } from "@/client/workflow";
import { WorkflowVersionService } from "@/client/workflow"; import { WorkflowVersionService } from "@/client/workflow";
import axios from "axios"; import axios from "axios";
import { onMounted, ref, reactive } from "vue"; import { onMounted, ref, reactive } from "vue";
import type { JSONSchemaType } from "ajv";
const props = defineProps<{ const props = defineProps<{
versionId: string; versionId: string;
...@@ -15,7 +14,7 @@ const parameterSchema = ref(undefined); ...@@ -15,7 +14,7 @@ const parameterSchema = ref(undefined);
const versionState = reactive<{ const versionState = reactive<{
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
parameterSchema?: JSONSchemaType<any>; parameterSchema?: Record<string, any>;
workflowVersion?: WorkflowVersionFull; workflowVersion?: WorkflowVersionFull;
}>({ }>({
parameterSchema: undefined, parameterSchema: undefined,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment