diff --git a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py index cbbb5c73ea7972527786fbc6d9dd79c3b34712ef..0bff22ebed495a941e010d1bee439f83423beddc 100644 --- a/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py +++ b/openbis-ipad/ipad-example-data/ipad-ui/1/dss/reporting-plugins/ipad-read-service/ipad_read.py @@ -29,18 +29,19 @@ def add_row(builder, entry): def material_to_dict(material): material_dict = {} material_dict['SUMMARY_HEADER'] = material.getCode() - material_dict['SUMMARY'] = material.getPropertyValue("DESC") material_dict['IDENTIFIER'] = material.getMaterialIdentifier() material_dict['PERM_ID'] = material.getMaterialIdentifier() material_dict['ENTITY_KIND'] = 'MATERIAL' material_dict['ENTITY_TYPE'] = material.getMaterialType() if material.getMaterialType() == '5HT_COMPOUND': chemblId = material.getCode() + material_dict['SUMMARY'] = material.getPropertyValue("FORMULA") material_dict['IMAGE_URL'] = 'https://www.ebi.ac.uk/chemblws/compounds/%s/image' % chemblId else: + material_dict['SUMMARY'] = material.getPropertyValue("DESC") material_dict['IMAGE_URL'] = "" - prop_names = ["NAME", "PROT_NAME", "GENE_NAME", "LENGTH", "CHEMBL", "DESC"] + prop_names = ["NAME", "PROT_NAME", "GENE_NAME", "LENGTH", "CHEMBL", "DESC", "FORUMLA", "WEIGHT", "SMILES"] properties = dict((name, material.getPropertyValue(name)) for name in prop_names if material.getPropertyValue(name) is not None) material_dict['PROPERTIES'] = ObjectMapper().writeValueAsString(properties) return material_dict