Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Website
Commits
294aefea
Commit
294aefea
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
update btn to run example
parent
21d81d1a
No related branches found
No related tags found
1 merge request
!21
Copy paste sequence
Pipeline
#128358
passed
1 year ago
Stage: delete-release
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/components/SubmitAnalysis.vue
+6
-20
6 additions, 20 deletions
frontend/components/SubmitAnalysis.vue
with
6 additions
and
20 deletions
frontend/components/SubmitAnalysis.vue
+
6
−
20
View file @
294aefea
<
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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment