From 0b28e5e4609e2dbe5c80375e619b5ee4350574fc Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Thu, 29 Sep 2016 15:14:59 -0500 Subject: [PATCH] OMERO.web: include plate acquisition start time in browsing tree 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 https://github.com/glencoesoftware/openmicroscopy/issues/3 --- components/tools/OmeroWeb/omeroweb/webclient/tree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/tools/OmeroWeb/omeroweb/webclient/tree.py b/components/tools/OmeroWeb/omeroweb/webclient/tree.py index 73787a854c3..23ccc4db900 100644 --- a/components/tools/OmeroWeb/omeroweb/webclient/tree.py +++ b/components/tools/OmeroWeb/omeroweb/webclient/tree.py @@ -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)