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 d6274e6a0e0852e77638e43db936530b60ed0c15..45c27d4ea9cb72ad174c1c86078c0d0afd63988e 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 @@ -477,14 +477,21 @@ function ServerFacade(openbisServer) { }; // - // Gets submission types + // Gets archiving info for specified data set codes // - this.listSubmissionTypes = function(callbackFunction) { + this.getArchivingInfo = function(dataSets, callbackFunction) { this.customELNApi({ - "method" : "getSubmissionTypes", - }, callbackFunction, "rc-exports-api"); + "method" : "getArchivingInfo", + "args" : dataSets.join(","), + }, function(error, result) { + if (error) { + Util.showError(error); + } else { + callbackFunction(result.data); + } + }, "archiving-api"); }; - + // // Metadata Related Functions // diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js index 9200b7d98eed890fe5c6015d6f4183813772d64c..50cc7345502b82bbe102206aca63d7801a162443 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js @@ -266,6 +266,24 @@ function DataSetFormController(parentController, mode, entity, dataSet, isMini, this.unarchive = function() { var _this = this; var dataSetPermId = this._dataSetFormModel.dataSetV3.permId.permId; + mainController.serverFacade.getArchivingInfo([dataSetPermId], function(info) { + var containerSize = info[dataSetPermId]["container"].length; + if (containerSize > 1) { + var warning = "Unarchiving this data set leads to unarchiving of additional " + + (containerSize - 1) + " data sets. All these data sets need " + + (info["total size"]/1e9).toFixed(1) + " GB memory.\n Do you want to unarchive this data set anyway?"; + Util.showWarning(warning, function() { + _this.forceUnarchiving(dataSetPermId) + }); + } else { + _this.forceUnarchiving(dataSetPermId); + } + + }); + } + + this.forceUnarchiving = function(dataSetPermId) { + var _this = this; Util.blockUI(); mainController.serverFacade.unarchiveDataSet(dataSetPermId, function() { _this._reloadView();