Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
3e81ad68
Commit
3e81ad68
authored
Jun 23, 2020
by
Kenzo-Hugo Hillion
♻
Browse files
dynamically build name based on filters
parent
f9aca3b8
Pipeline
#32807
passed with stages
in 3 minutes and 36 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/genes/genes.js
View file @
3e81ad68
...
...
@@ -142,6 +142,26 @@ export default {
return
'
right
'
;
}
return
'
left
'
;
},
fileName
()
{
if
(
this
.
searchGeneName
)
{
return
this
.
searchGeneName
;
}
var
basename
=
"
metagenedb
"
;
if
(
this
.
geneSource
&&
this
.
geneSource
!=
'
all
'
)
{
basename
=
`
${
basename
}
_
${
this
.
geneSource
}
`
;
}
if
(
this
.
filterGeneLength
)
{
basename
=
`
${
basename
}
_
${
this
.
geneLengthFilterRange
[
0
]}
bp-
${
this
.
geneLengthFilterRange
[
1
]}
bp`
;
}
if
(
this
.
functionID
){
basename
=
`
${
basename
}
_function-
${
this
.
functionID
}
`
;
}
if
(
this
.
taxChoice
)
{
var
taxName
=
this
.
taxChoice
.
replace
(
/ /g
,
"
_
"
);
basename
=
`
${
basename
}
_
${
this
.
taxLevel
}
-
${
taxName
}
`
;
}
return
basename
;
}
},
mounted
()
{
...
...
@@ -226,7 +246,7 @@ export default {
})
.
then
((
response
)
=>
{
this
.
downloadFastaReady
=
true
;
this
.
forceFileDownload
(
response
,
'
metagenedb_sequences
.fasta
'
);
this
.
forceFileDownload
(
response
,
`
${
this
.
fileName
}
.fasta
`
);
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
...
...
@@ -248,7 +268,7 @@ export default {
})
.
then
((
response
)
=>
{
this
.
downloadCSVReady
=
true
;
this
.
forceFileDownload
(
response
,
'
metagenedb_metadata
.csv
'
);
this
.
forceFileDownload
(
response
,
`
${
this
.
fileName
}
.csv
`
);
})
.
catch
((
error
)
=>
{
console
.
error
(
error
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment