diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py index 0df6ce62396370745613ed49abcd446fca61a46c..40f7509e0fe25b91b8927c38bbc36ddd3792dc46 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py @@ -21,6 +21,34 @@ def addSampleChildNodes(path, samplePermId, sampleType, response, acceptor, cont contentNode = content.getRootNode() script.addDataSetFileNodes(path, dataSetCode, contentNode, response, acceptor, context) -for t in ["FACS_ARIA", "INFLUX", "LSR_FORTESSA", "CYTOFLEX_S", "MOFLO_XDP", "S3E", "SONY_SH800S", "SONY_MA900"]: +def addSampleChildNodesWithPlates(path, samplePermId, sampleType, response, acceptor, context): + dataSetSearchCriteria = DataSetSearchCriteria() + dataSetSearchCriteria.withOrOperator() + dataSetSearchCriteria.withSample().withPermId().thatEquals(samplePermId) + parentsSearchCriteria = dataSetSearchCriteria.withSample().withParents() + parentsSearchCriteria.withPermId().thatEquals(samplePermId) + fetchOptions = DataSetFetchOptions() + fetchOptions.withType() + fetchOptions.withProperties() + fetchOptions.withSample().withType() + dataSets = context.getApi().searchDataSets(context.getSessionToken(), dataSetSearchCriteria, fetchOptions).getObjects() + for dataSet in dataSets: + sampleTypeCode = dataSet.getSample().getType().getCode() + if not sampleTypeCode.endswith("_WELL"): + dataSetCode = dataSet.getCode() + content = context.getContentProvider().asContent(dataSetCode) + contentNode = content.getRootNode() + script.addDataSetFileNodes(path, dataSetCode, contentNode, response, acceptor, context) + script.addSampleSampleChildNodes(path, samplePermId, response, acceptor, context) + +for t in ["FACS_ARIA", "INFLUX", "MOFLO_XDP", "S3E", "SONY_SH800S", "SONY_MA900"]: acceptor.hideSampleType("%s_SPECIMEN" % t) acceptor.sampleChildrenHandlers["%s_EXPERIMENT" % t] = addSampleChildNodes + +for t in ["LSR_FORTESSA", "CYTOFLEX_S"]: + acceptor.hideSampleType("%s_SPECIMEN" % t) + acceptor.hideSampleType("%s_WELL" % t) + acceptor.hideSampleType("%s_TUBE" % t) + acceptor.hideSampleType("%s_TUBESET" % t) + acceptor.sampleChildrenHandlers["%s_EXPERIMENT" % t] = addSampleChildNodesWithPlates + acceptor.sampleChildrenHandlers["%s_PLATE" % t] = addSampleChildNodes diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/script.py b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/script.py index e530f7af482e37495e087a855bbf1a2ac0347328..8909b6834b1ed9594bcf7ce7e3563673100fe67f 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/script.py +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/script.py @@ -315,7 +315,9 @@ def addSampleChildNodes(path, samplePermId, sampleType, response, acceptor, cont dataSetSearchCriteria.withSample().withPermId().thatEquals(samplePermId) listDataSets(path, dataSetSearchCriteria, True, response, acceptor, context) + addSampleSampleChildNodes(path, samplePermId, response, acceptor, context) +def addSampleSampleChildNodes(path, samplePermId, response, acceptor, context): fetchOptions = SampleFetchOptions() fetchOptions.withExperiment() fetchOptions.withChildren().withType()