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
genotoul-bioinfo
D-GENIES
Commits
6d046e33
Commit
6d046e33
authored
Apr 16, 2018
by
Floreal Cabanettes
Browse files
Standalone mode: only show valid jobs on results menu
parent
a0a173ec
Changes
2
Show whitespace changes
Inline
Side-by-side
src/dgenies/lib/functions.py
View file @
6d046e33
...
...
@@ -257,11 +257,25 @@ class Functions:
return
False
return
False
@
staticmethod
def
_get_jobs_list
():
all_jobs
=
os
.
listdir
(
Functions
.
config
.
app_data
)
print
(
all_jobs
)
valid_jobs
=
[]
for
job
in
all_jobs
:
job_path
=
os
.
path
.
join
(
Functions
.
config
.
app_data
,
job
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
job_path
,
"map.paf"
))
and
\
os
.
path
.
isfile
(
os
.
path
.
join
(
job_path
,
"target.idx"
))
and
\
os
.
path
.
isfile
(
os
.
path
.
join
(
job_path
,
"query.idx"
))
and
\
os
.
path
.
isfile
(
os
.
path
.
join
(
job_path
,
".valid"
)):
valid_jobs
.
append
(
job
)
return
valid_jobs
@
staticmethod
def
get_list_all_jobs
(
mode
=
"webserver"
):
if
mode
==
"webserver"
:
return
[]
# Don't give the list in webserver as it's multi-user
all_jobs
=
os
.
listdir
(
Functions
.
config
.
app_data
)
all_jobs
=
Functions
.
_get_jobs_list
(
)
if
"gallery"
in
all_jobs
:
all_jobs
.
remove
(
"gallery"
)
return
sorted
(
all_jobs
,
key
=
lambda
x
:
x
.
lower
())
...
...
src/dgenies/views.py
View file @
6d046e33
...
...
@@ -428,6 +428,9 @@ def get_graph():
paf
=
Paf
(
paf
,
idx1
,
idx2
)
if
paf
.
parsed
:
valid
=
os
.
path
.
join
(
APP_DATA
,
id_f
,
".valid"
)
if
not
os
.
path
.
exists
(
valid
):
Path
(
valid
).
touch
()
res
=
paf
.
get_d3js_data
()
res
[
"success"
]
=
True
return
jsonify
(
res
)
...
...
Write
Preview
Markdown
is supported
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