-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes a lot of plumbing for tools but not the APIs - they are not ready to go yet.
- Loading branch information
Showing
24 changed files
with
916 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { type components } from "@/api/schema"; | ||
|
||
export type ClaimLandingPayload = components["schemas"]["ClaimLandingPayload"]; | ||
export type WorkflowLandingRequest = components["schemas"]["WorkflowLandingRequest"]; |
66 changes: 66 additions & 0 deletions
66
client/src/components/Form/Elements/FormData/FormDataUri.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<b-row align-v="center"> | ||
<b-col> | ||
<b-form-input :id="id" v-model="displayValue" :class="['ui-input', cls]" :readonly="true" /> | ||
</b-col> | ||
</b-row> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
value: { | ||
type: Object, | ||
}, | ||
id: { | ||
type: String, | ||
default: "", | ||
}, | ||
multiple: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
cls: { | ||
// Refers to an optional custom css class name | ||
type: String, | ||
default: null, | ||
}, | ||
}, | ||
computed: { | ||
displayValue: { | ||
get() { | ||
return this.value.url; | ||
}, | ||
set(newVal, oldValue) { | ||
if (newVal !== this.value.url) { | ||
this.$emit("input", this.value); | ||
} | ||
}, | ||
}, | ||
currentValue: { | ||
get() { | ||
const v = this.value ?? ""; | ||
if (Array.isArray(v)) { | ||
if (v.length === 0) { | ||
return ""; | ||
} | ||
return this.multiple | ||
? this.value.reduce((str_value, v) => str_value + String(v) + "\n", "") | ||
: String(this.value[0]); | ||
} | ||
return String(v); | ||
}, | ||
set(newVal, oldVal) { | ||
if (newVal !== oldVal) { | ||
this.$emit("input", newVal); | ||
} | ||
}, | ||
}, | ||
}, | ||
}; | ||
</script> | ||
<style scoped> | ||
.ui-input-linked { | ||
border-left-width: 0.5rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<div>This a place holder for a feature that is not currently implemented.</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script setup lang="ts"> | ||
import { BAlert } from "bootstrap-vue"; | ||
import { onMounted, ref } from "vue"; | ||
import { GalaxyApi } from "@/api"; | ||
import { type ClaimLandingPayload } from "@/api/landings"; | ||
import { errorMessageAsString } from "@/utils/simple-error"; | ||
import LoadingSpan from "@/components/LoadingSpan.vue"; | ||
import WorkflowRun from "@/components/Workflow/Run/WorkflowRun.vue"; | ||
interface Props { | ||
uuid: string; | ||
secret?: string; | ||
} | ||
const props = withDefaults(defineProps<Props>(), { | ||
secret: undefined, | ||
}); | ||
const workflowId = ref<string | null>(null); | ||
const errorMessage = ref<string | null>(null); | ||
const requestState = ref<Record<string, never> | null>(null); | ||
onMounted(async () => { | ||
const payload: ClaimLandingPayload = {}; | ||
if (props.secret) { | ||
payload["client_secret"] = props.secret; | ||
} | ||
const { data, error } = await GalaxyApi().POST("/api/workflow_landings/{uuid}/claim", { | ||
params: { | ||
path: { uuid: props.uuid }, | ||
}, | ||
body: payload, | ||
}); | ||
if (data) { | ||
workflowId.value = data.workflow_id; | ||
requestState.value = data.request_state; | ||
} else { | ||
errorMessage.value = errorMessageAsString(error); | ||
} | ||
console.log(data); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<div v-if="!workflowId"> | ||
<LoadingSpan message="Loading workflow parameters" /> | ||
</div> | ||
<div v-else-if="errorMessage"> | ||
<BAlert variant="danger" show> | ||
{{ errorMessage }} | ||
</BAlert> | ||
</div> | ||
<div v-else> | ||
<WorkflowRun :workflow-id="workflowId" :prefer-simple-form="true" :request-state="requestState" /> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.