diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js index 15b78c26f733c96e2ed9eb605fcedcf4ad3dc780..7d391954cc0df567cf89c6b69f04a80c54a70634 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js @@ -903,24 +903,26 @@ function ServerFacade(openbisServer) { //Setting the fetchOptions given standard settings var fetchOptions = new EntityFetchOptions(); - if(fetchOptions.withType) { - fetchOptions.withType(); - } - if(fetchOptions.withSpace) { - fetchOptions.withSpace(); - } - if(fetchOptions.withRegistrator) { - fetchOptions.withRegistrator(); - } - if(fetchOptions.withModifier) { - fetchOptions.withModifier(); - } - if(fetchOptions.withProperties) { - fetchOptions.withProperties(); - } + //Optional fetchOptions - if(!advancedFetchOptions || !advancedFetchOptions.minTableInfo) { + if(!advancedFetchOptions) { + if(fetchOptions.withType) { + fetchOptions.withType(); + } + if(fetchOptions.withSpace) { + fetchOptions.withSpace(); + } + if(fetchOptions.withRegistrator) { + fetchOptions.withRegistrator(); + } + if(fetchOptions.withModifier) { + fetchOptions.withModifier(); + } + if(fetchOptions.withProperties) { + fetchOptions.withProperties(); + } + if(fetchOptions.withProject) { fetchOptions.withProject(); } @@ -952,6 +954,22 @@ function ServerFacade(openbisServer) { fetchOptions.withChildrenUsing(fetchOptions); } } else if(advancedFetchOptions.minTableInfo) { + if(fetchOptions.withType) { + fetchOptions.withType(); + } + if(fetchOptions.withSpace) { + fetchOptions.withSpace(); + } + if(fetchOptions.withRegistrator) { + fetchOptions.withRegistrator(); + } + if(fetchOptions.withModifier) { + fetchOptions.withModifier(); + } + if(fetchOptions.withProperties) { + fetchOptions.withProperties(); + } + if(advancedFetchOptions.withExperiment && fetchOptions.withExperiment) { fetchOptions.withExperiment(); } @@ -968,6 +986,28 @@ function ServerFacade(openbisServer) { childrenFetchOptions.withProperties(); } } + } else if(advancedFetchOptions.only) { + if(advancedFetchOptions.withProperties) { + fetchOptions.withProperties(); + } + if(advancedFetchOptions.withType) { + fetchOptions.withType(); + } + if(advancedFetchOptions.withExperiment) { + fetchOptions.withExperiment(); + } + if(advancedFetchOptions.withParents) { + var parentFetchOptions = fetchOptions.withParents(); + if(advancedFetchOptions.withParentsType) { + parentFetchOptions.withType(); + } + } + if(advancedFetchOptions.withChildren) { + var childrenFetchOptions = fetchOptions.withChildren(); + if(advancedFetchOptions.withChildrenType) { + childrenFetchOptions.withType(); + } + } } if(advancedFetchOptions && advancedFetchOptions.cache) { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js index 199eb4440372c18726a5cfa5d14c301316ca60ab..fa864991bef28ab37e9b52d10babad4b353a6df5 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js @@ -169,7 +169,7 @@ var Util = new function() { "isEnvironmentError: " + isEnvironmentError + "%0D%0A" + "href: " + location.href.replace(new RegExp("&", 'g'), " - ") + "%0D%0A" + "error: " + withHTML; - debugger; + var withHTMLToShow = userErrorWarning + withHTML + "<br><br>" + warning + "<br><br>"; withHTMLToShow += "<a class='btn btn-default'>Dismiss</a>" + "<a class='btn btn-default' href='mailto:" + profile.devEmail + "?subject=ELN Error Report [" + location.hostname +"] ["+ mainController.serverFacade.openbisServer.getSession() + "]&body=" + report +"'>Send error report</a>"; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js index 1ec0ea1eaeed4728cfb247d384ad4e23123956bd..5e46a44fe5586a70a7b7f06d15c48f5d6f2d8c59 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js @@ -398,7 +398,8 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { break; case "EXPERIMENT": var sampleRules = { "UUIDv4" : { type : "Experiment", name : "ATTR.PERM_ID", value : permId } }; - mainController.serverFacade.searchForSamplesAdvanced({ entityKind : "SAMPLE", logicalOperator : "AND", rules : sampleRules }, null, + mainController.serverFacade.searchForSamplesAdvanced({ entityKind : "SAMPLE", logicalOperator : "AND", rules : sampleRules }, + { only : true, withProperties : true, withType : true, withExperiment : true, withParents : true, withChildren : true, withParentsType : true, withChildrenType : true}, function(searchResult) { var samples = searchResult.objects; var samplesToShow = []; @@ -419,7 +420,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { } if(!parentIsExperiment) { samplesToShow.push(sample); - } + } } } @@ -430,7 +431,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { var sample = samples[i]; var sampleDisplayName = sample.code; if(sample.properties && sample.properties[profile.propertyReplacingCode]) { - sampleDisplayName = sample.properties[profile.propertyReplacingCode]; + sampleDisplayName = sample.properties[profile.propertyReplacingCode]; } var sampleLink = _this.getLinkForNode(sampleDisplayName, sample.getPermId().getPermId(), "showViewSamplePageFromPermId", sample.getPermId().getPermId()); @@ -446,18 +447,18 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { for (var i = 0; i < datasets.length; i++) { var dataset = datasets[i]; if(!dataset.sample) { - experimentDatasets.push(dataset); + experimentDatasets.push(dataset); } } if(experimentDatasets.length > 50) { - Util.showInfo("More than 50 Datasets, please use the dataset viewer on the experiment to navigate them."); + Util.showInfo("More than 50 Datasets, please use the dataset viewer on the experiment to navigate them."); } else { - for (var i = 0; i < experimentDatasets.length; i++) { + for (var i = 0; i < experimentDatasets.length; i++) { var dataset = experimentDatasets[i]; var datasetDisplayName = dataset.code; if(dataset.properties && dataset.properties[profile.propertyReplacingCode]) { - datasetDisplayName = dataset.properties[profile.propertyReplacingCode]; + datasetDisplayName = dataset.properties[profile.propertyReplacingCode]; } var datasetLink = _this.getLinkForNode(datasetDisplayName, dataset.getPermId().getPermId(), "showViewDataSetPageFromPermId", dataset.getPermId().getPermId()); @@ -473,27 +474,29 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { } var getCancelResultsFunction = function(dfd) { - return function() { - dfd.resolve([]); - } + return function() { + dfd.resolve([]); + } } if(samplesToShow.length > 50) { - var toExecute = function() { - Util.blockUIConfirm("Do you want to show " + samplesWithoutELNParents.length + " " + ELNDictionary.Samples + " on the tree?", - getOkResultsFunction(dfd, samplesToShow), - getCancelResultsFunction(dfd)); + var toExecute = function() { + Util.blockUIConfirm("Do you want to show " + samplesWithoutELNParents.length + " " + ELNDictionary.Samples + " on the tree?", + getOkResultsFunction(dfd, samplesToShow), + getCancelResultsFunction(dfd)); } - setTimeout(toExecute, 1000); + setTimeout(toExecute, 1000); } else { - getOkResultsFunction(dfd, samplesToShow)(); + getOkResultsFunction(dfd, samplesToShow)(); } }); break; case "SAMPLE": var sampleRules = { "UUIDv4" : { type : "Attribute", name : "PERM_ID", value : permId } }; - mainController.serverFacade.searchForSamplesAdvanced({ entityKind : "SAMPLE", logicalOperator : "AND", rules : sampleRules }, null, function(searchResult) { + mainController.serverFacade.searchForSamplesAdvanced({ entityKind : "SAMPLE", logicalOperator : "AND", rules : sampleRules }, + { only : true, withProperties : true, withType : true, withExperiment : true, withParents : true, withChildren : true, withParentsType : true, withChildrenType : true} + , function(searchResult) { var results = []; var samples = searchResult.objects; if(samples && samples[0] && samples[0].children) {