Skip to content

Commit

Permalink
OMERO.web: include plate acquisition start time in browsing tree
Browse files Browse the repository at this point in the history
This adds an extra case to the logic for setting the plate acquisition
name in the tree in the left-hand panel.  If a start time (but not an
end time) was set, then the name will be the start time instead of "Run $id".

See glencoesoftware#3
  • Loading branch information
melissalinkert committed Sep 29, 2016
1 parent aa2006e commit 0b28e5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/tools/OmeroWeb/omeroweb/webclient/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,9 @@ def _marshal_plate_acquisition(conn, row):
start_time = datetime.utcfromtimestamp(unwrap(start_time) / 1000.0)
end_time = datetime.utcfromtimestamp(unwrap(end_time) / 1000.0)
plate_acquisition['name'] = '%s - %s' % (start_time, end_time)
elif start_time is not None:
start_time = datetime.utcfromtimestamp(unwrap(start_time) / 1000.0)
plate_acquisition['name'] = '%s' % start_time
else:
plate_acquisition['name'] = 'Run %d' % unwrap(pa_id)

Expand Down

0 comments on commit 0b28e5e

Please sign in to comment.