Skip to content
Snippets Groups Projects
Commit 294aefea authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

update btn to run example

parent 21d81d1a
No related branches found
No related tags found
1 merge request!21Copy paste sequence
Pipeline #128358 passed
<script setup lang="ts">
// import { ref } from "vue";
import { useField, useForm } from 'vee-validate'
import { useCsrfToken } from "@/composables/useCsrfToken"
const uppyComponentRef = ref(null)
const tab = ref<"local" | "paste">("local")
const maxSequenceLength = ref(10000)
const valid = ref<boolean>(false)
const { csrfToken } = await useCsrfToken()
const { handleSubmit } = useForm({
validationSchema: {
// files(value) {
......@@ -28,12 +21,7 @@ const { handleSubmit } = useForm({
});
const files = useField("files")
const { value: sequence, errorMessage: sequenceErrorMessage } = useField("sequence");
const { data, error } = await useAPI<{ is_online: boolean }>("/analysis/is-galaxy-online", {
onRequest({ request }) {
}
})
const { data } = await useAPI<{ is_online: boolean }>("/analysis/is-galaxy-online")
if (data.value !== null && !data.value.is_online) {
throw createError("The galaxy instance is offline")
......@@ -55,8 +43,6 @@ async function addExample() {
}
}
const submit = handleSubmit(async (values) => {
loading.value = true
const formData = new FormData();
......@@ -88,7 +74,6 @@ const submit = handleSubmit(async (values) => {
<v-tab value="paste" :rounded="false">Paste fasta sequences</v-tab>
<v-tab value="example" :rounded="false">Example</v-tab>
</v-tabs>
<v-card-text>
<v-window v-model="tab">
<v-window-item value="local">
......@@ -104,13 +89,14 @@ const submit = handleSubmit(async (values) => {
<v-window-item value="example">
<v-card flat color="transparent">
<v-card-text>
You can try an example with Escherichia coli str. K-12 substr. MG1655 proteins downloaded from <a
target="_blank"
href="https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_000005845.2">GCF_000005845.2</a>
You can try an example with Escherichia coli str. K-12 substr. MG1655 proteins (<a target="_blank"
href="https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_000005845.2">GCF_000005845.2</a>)
</v-card-text>
<v-card-actions>
<v-btn variant="elevated" density="default" size="default" :slim="false" rounded="xl"
color="primary" :loading="loading" @click="addExample()">Submit</v-btn>
:loading="loading" @click="addExample()">Run
analysis for GCF_000005845.2</v-btn>
</v-card-actions>
</v-card>
</v-window-item>
......
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