Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Schorb
VolumeAlign
Commits
b0fb56d4
Commit
b0fb56d4
authored
Jan 14, 2022
by
Martin Schorb
Browse files
status checks and remove popup
parent
70fbc731
Changes
4
Hide whitespace changes
Inline
Side-by-side
dash/callbacks/runstate.py
View file @
b0fb56d4
...
...
@@ -21,13 +21,15 @@ from utils import launch_jobs
from
utils
import
helper_functions
as
hf
static_states
=
[
'done'
,
'cancelled'
,
'error'
,
'input'
,
'wait'
,
'timeout'
]
# =================================================
@
app
.
callback
([
Output
({
'component'
:
'store_r_status'
,
'module'
:
MATCH
},
'data'
),
Output
({
'component'
:
'statuspage_div'
,
'module'
:
MATCH
},
'style'
),
Output
({
'component'
:
'statuspage_link'
,
'module'
:
MATCH
},
'href'
)],
[
Input
(
'interval
2
'
,
'n_intervals'
),
[
Input
(
'interval
1
'
,
'n_intervals'
),
Input
({
'component'
:
'cancel'
,
'module'
:
MATCH
},
'n_clicks'
)
],
[
State
({
'component'
:
'store_run_status'
,
'module'
:
MATCH
},
'data'
),
...
...
@@ -43,6 +45,9 @@ def update_status(n,click,run_state,logfile,module,thispage):
if
None
in
[
n
,
run_state
,
logfile
,
module
,
thispage
]:
raise
PreventUpdate
if
run_state
[
'status'
]
in
static_states
:
raise
PreventUpdate
status_href
=
''
status_style
=
{
'display'
:
'none'
}
...
...
@@ -63,7 +68,7 @@ def update_status(n,click,run_state,logfile,module,thispage):
r_status
[
'logfile'
]
=
logfile
if
'interval
2
'
in
trigger
:
if
'interval
1
'
in
trigger
:
link
=
''
if
run_state
[
'id'
]
is
None
:
...
...
dash/index.py
View file @
b0fb56d4
...
...
@@ -50,14 +50,8 @@ menu_text=['Convert & upload',
intervals
=
html
.
Div
([
dcc
.
Interval
(
id
=
'interval1'
,
interval
=
params
.
idle_interval
,
n_intervals
=
0
),
dcc
.
Interval
(
id
=
'interval2'
,
interval
=
params
.
idle_interval
,
n_intervals
=
0
)
])
intervals
=
html
.
Div
(
dcc
.
Interval
(
id
=
'interval1'
,
interval
=
params
.
refresh_interval
,
n_intervals
=
0
))
consolefile
=
params
.
render_log_dir
+
'/out.txt'
...
...
dash/inputtypes/sbem_conv.py
View file @
b0fb56d4
...
...
@@ -103,10 +103,10 @@ page2.append(html.Div(pages.render_selector(label,create=True,show=['stack','pro
gobutton
=
html
.
Div
(
children
=
[
html
.
Br
(),
html
.
Button
(
'Start conversion'
,
id
=
label
+
"go"
,
disabled
=
True
),
html
.
Div
([],
id
=
label
+
'directory-popup'
,
style
=
{
'color'
:
'#E00'
}),
dcc
.
ConfirmDialog
(
id
=
label
+
'danger-novaliddir'
,
displayed
=
False
,
message
=
'The selected directory does not exist or is not readable!'
),
#
dcc.ConfirmDialog(
#
id=label+'danger-novaliddir',displayed=False,
#
message='The selected directory does not exist or is not readable!'
#
),
html
.
Br
(),
html
.
Details
([
html
.
Summary
(
'Compute location:'
),
dcc
.
RadioItems
(
...
...
@@ -154,7 +154,7 @@ page2.append(collapse_stdout)
@
app
.
callback
([
Output
(
label
+
'go'
,
'disabled'
),
Output
(
label
+
'directory-popup'
,
'children'
),
Output
(
label
+
'danger-novaliddir'
,
'displayed'
),
#
Output(label+'danger-novaliddir','displayed'),
Output
({
'component'
:
'store_launch_status'
,
'module'
:
label
},
'data'
),
Output
({
'component'
:
'store_render_launch'
,
'module'
:
label
},
'data'
)
],
...
...
@@ -247,12 +247,12 @@ def sbem_conv_gobutton(stack_sel, in_dir, click, proj_dd_sel, compute_sel, run_s
run_state
[
'status'
]
=
'wait'
# params.processes[parent.strip('_')] = []
popup
=
'Directory not accessible.'
pop_display
=
True
#
pop_display = True
out
[
'logfile'
]
=
log_file
out
[
'status'
]
=
run_state
[
'status'
]
return
but_disabled
,
popup
,
pop_display
,
out
,
outstore
return
but_disabled
,
popup
,
out
,
outstore
\ No newline at end of file
dash/params.py
View file @
b0fb56d4
...
...
@@ -190,7 +190,6 @@ default_tile_scale = 0.5
refresh_interval
=
1000
# ms
disp_lines
=
50
# output lines to display
idle_interval
=
5000
# ms
#=============================================================
...
...
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