Skip to content

Commit

Permalink
Merge pull request #5050 from dominikl/show_platename_for_welltags
Browse files Browse the repository at this point in the history
Show platename for well tags
  • Loading branch information
jburel authored Feb 16, 2017
2 parents 38053d0 + 754ead8 commit 64d8c5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions components/tools/OmeroWeb/omeroweb/webclient/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,8 @@ def marshal_tagged(conn, tag_id, group_id=-1, experimenter_id=-1, page=1,
obj.column as column,
plate.id as plateId,
plate.columnNamingConvention as colnames,
plate.rowNamingConvention as rownames)
plate.rowNamingConvention as rownames,
plate.name as platename)
from Well obj
join obj.annotationLinks alink
join obj.plate plate
Expand All @@ -1524,8 +1525,9 @@ def marshal_tagged(conn, tag_id, group_id=-1, experimenter_id=-1, page=1,
e[0]["column"],
e[0]["plateId"],
e[0]["rownames"],
e[0]["colnames"]]
wells.append(_marshal_well(conn, e[0:8]))
e[0]["colnames"],
e[0]["platename"]]
wells.append(_marshal_well(conn, e[0:9]))
tagged['wells'] = wells

return tagged
Expand All @@ -1544,7 +1546,8 @@ def _marshal_well(conn, row):
@param row The Well row to marshal
@type row L{list}
'''
well_id, owner_id, perms, row, col, plateId, rownames, colnames = row
well_id, owner_id, perms, row, col, plateId, rownames, colnames,\
platename = row
well = dict()
well['id'] = unwrap(well_id)
well['ownerId'] = unwrap(owner_id)
Expand All @@ -1553,7 +1556,7 @@ def _marshal_well(conn, row):
parse_permissions_css(perms, unwrap(owner_id), conn)
rowname = str(row + 1) if rownames == 'number' else _letterGridLabel(row)
colname = _letterGridLabel(col) if colnames == 'letter' else str(col + 1)
well['name'] = "%s%s" % (rowname, colname)
well['name'] = "%s - %s%s" % (platename, rowname, colname)
return well


Expand Down
3 changes: 2 additions & 1 deletion components/tools/OmeroWeb/test/integration/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,12 @@ def expected_wells(user, wells):
for well in wells:
rName = unwrap(well.plate.rowNamingConvention)
cName = unwrap(well.plate.columnNamingConvention)
pName = unwrap(well.plate.name)
row = well.row.val
col = well.column.val
rowname = str(row + 1) if rName == 'number' else _letterGridLabel(row)
colname = _letterGridLabel(col) if cName == 'letter' else str(col + 1)
name = "%s%s" % (rowname, colname)
name = "%s - %s%s" % (pName, rowname, colname)
expected.append({
'id': well.id.val,
'name': name,
Expand Down

0 comments on commit 64d8c5b

Please sign in to comment.