Skip to content

Commit

Permalink
color status column
Browse files Browse the repository at this point in the history
  • Loading branch information
akremin committed Aug 31, 2024
1 parent f46a7c6 commit 994c998
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py/desispec/workflow/proc_dashboard_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,15 @@ def _table_row(dictionary):
else:
row_str = f'<tr style="{style_str}" id="{idlabel}">'

for elem in dictionary.values():
for key, elem in dictionary.items():
## If job is still running don't color things yet
if idlabel.upper() in non_final_q_states:
row_str += _table_element(elem)
elif key == 'STATUS' and elem == 'COMPLETED' and idlabel == 'GOOD':
row_str += _table_element_id(elem, 'GOOD')
elif key == 'STATUS' and elem not in ['COMPLETED', 'unprocessed', 'unrecorded'] \
and elem not in non_final_q_states and idlabel != 'GOOD':
row_str += _table_element_id(elem, idlabel)
elif re.match('^\d+\/\d+$', elem) is not None:
strs = str(elem).split('/')
numerator, denom = int(strs[0]), int(strs[1])
Expand Down

0 comments on commit 994c998

Please sign in to comment.