Child pages
  • ELN-LIMS Administrators Guide
Skip to end of metadata
Go to start of metadata

Settings


Most of the possible customisations which can be done in profile.js are now directly available in the ELN user interface by instance admins, for those any modification on the profile.js file is discouraged since any changes made on the live system will override what is given by the profile.js file.

Profile concept


All configuration parameters are contained in a Javascript object called Profile. The profile to use is defined in  /eln-lims/1/as/webapps/eln-lims/html/index.html.

The StandardProfile is used by default.

 

 // Configurations Available (Available under the js/config folder)

 // Use StandardProfile as a standard default for new installations.

 // Use ExampleProfile as a start point to develop new profiles.

 

 var profile = new StandardProfile();

 

Custom profiles are stored in  /eln-lims/1/as/webapps/eln-lims/html/etc under the plugin directory.

NOTE: All profiles should inherit from StandardProfile as shown in the example below.

 

//Example profile with basic configuration that doesn't requires any programming
function ExampleProfile(serverFacade) {
this.init(serverFacade);
}

$.extend(ExampleProfile.prototype, StandardProfile.prototype, {
init: function(serverFacade){
DefaultProfile.prototype.init.call(this, serverFacade);


//The properties you want to appear on the tables, if you don't specify the list, all of them will appear by default.
this.typePropertiesForTable = {};

//The configuration for the visual storages.
this.storagesConfiguration = {
"isEnabled" : false
};
}
});

Profile basic configuration 


Some configuration parameters do not require programming, but they require some basic editing of Javascript lists and maps. 

Parents and children annotations configuration

To add predefined parents and children from the ELN for a specific sample type, the property ANNOTATIONS_STATE has to be created (if not existing yet) and assigned to the sample type. This is of type XML.

We then need to create in openBIS the properties that we want to use for the annotation, for example QUANTITY and COMMENTS. These do not have to be assigned to the sample type, they just need to be existing properties in openBIS. In the configuration file we then specify which annotation we want for each sample type.

In the example below, for the sample type MEDIA we define CHEMICAL, SOLUTION_BUFFER and MEDIA as parents and we annotate each of them with QUANTITY and COMMENTS. It is possible to make one particular parent mandatory, in cases where it is necessary to have at least one parent of a particular type defined, by setting the MIN_COUNT to 1. It is also possible to make a particular annotation mandatory, by setting MANDATORY to true.

If you want to have a parent without any annotations, leave the ANNOTATIONS_STATE field empty, as shown in the example below.

 

 /* New Sample definition tests*/

  this.sampleTypeDefinitionsExtension = {

    "MEDIA" : {

     "SAMPLE_PARENTS_HINT" : [

                                   {

              "LABEL" : "Chemical",

              "TYPE": "CHEMICAL",

              "MIN_COUNT" : 1,

              "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : true }, {"TYPE" : "COMMENTS", "MANDATORY" : false }]

             },

                                   {

              "LABEL" : "Solution/Buffer",

              "TYPE": "SOLUTION_BUFFER",

              "MIN_COUNT" : 0,

              "ANNOTATION_PROPERTIES" : [{"TYPE" : "QUANTITY", "MANDATORY" : false }, {"TYPE" : "COMMENTS", "MANDATORY" : false }]

             },

                                   {

              "LABEL" : "Media",

              "TYPE": "MEDIA",

              "MIN_COUNT" : 0,

              "ANNOTATION_PROPERTIES" : []

             }                        

            ],

    },

}

Plate wells colour annotations configuration



To use this particular feature the next two conditions should be met.

 

1. The vocabulary COLOR_ENCODED_ANNOTATIONS

Should be present following the scheme shown below for terms, if this vocabulary is not present on the system, no options will be shown.

The description of a term is very important since it follows the format "<HTML Color> : <Description>".

CodeLabelDescription
DEFAULTDefault

#ddd : Used when no code is selected or obviously when this is selected.

 

2. The property COLOR_ENCODED_ANNOTATION

Should be present on each well sample type to enable that particular well type to have colour annotations and use the COLOR_ENCODED_ANNOTATIONS vocabulary.

If this property is not assigned, when making a change in a well and pressing the update button the system will report an error.

 

Profile advanced extensions


 

It is possible to extend the behaviour of some components creating some Javascript functions in the Profile, as described below.

 

FeatureDefaultAlternative configurations
Data set zip upload configurationTo use zip as a folder the "ZIP Compressed Folder" checkbox needs to be checked.

It is possible to hide this checkbox and select it for the user by data set type.

Example:

//Null: Show checkbox to manually input
//True: Automatic configuration, will unzip the file before atacching the files
//False: Will do nothing to the file before attaching
this.isZipDirectoryUpload = function(dataSetType) {
return null;
}
Data set type upload configurationTo select the data set type automatically to avoid user errors.

It is possible to force a selection giving a type depending on the file names.

Example:

this.getDataSetTypeForFileName = function(allDatasetFiles, fileName) {
if(fileName.endsWith("gb") || fileName.endsWith("fasta") || fileName.endsWith("xdna") || fileName.endsWith("fa")) {
return "SEQ_FILE";
} else if(fileName.endsWith("ab1")) {
return "RAW_DATA";
} else {
return null;
}
}
Adding HTML to the sample formNothing is embedded.

To embed any laboratory specific information, like a specific widget.

Example:

 this.sampleFormContentExtra = function(sampleTypeCode, sample, containerId) {

var isExperiment = false;
this.ELNExperiments.forEach(function(experimentTypeCode){
if(experimentTypeCode === sampleTypeCode) {
isExperiment = true;
}
});

if(isExperiment) {
var dilutionWidget = new DilutionWidget(containerId, this.serverFacade);
dilutionWidget.init();
}
}

 

Password reset


When the file based authentication is used, it is possible for users to reset their passwords in case they have forgotten them. For this to work, the following things needs to be in place.

In openBIS is necessary to have:

  1. New space with code: ANONYMOUS
  2. New user with userId: anonymous and password: anonymous
  3. New Rights assignment from userId: anonymous to space: ANONYMOUS with role SPACE_OBSERVER
  4. User anonymous must be configured as user-for-anonymous-login in service.properties

When everything is set up and the users enter a wrong password, a link is shown which starts the password reset process. They will get an email with a link to trigger a second email containing a new password.

Rich Text editor image upload


By default the rich text editor will allow to upload only files not bigger than 10Mb and in a directory that is most probably suboptimal.

Files should be stored on the same NAS/Server as your datasets are stored to ensure the same level of backup and security, since more typical than not, often on typical installations only the database is backup on the main application server.

To change this defaults is necessary to edit the next properties at eln-lims/1/as/miscellaneous/file-service/plugin.properties:

Property KeyDefault ValueDescription
file-server.maximum-file-size-in-MB10 Max size of files.
file-server.repository-path ../../../data/file-serverPath where files will be stored, ideally should be a folder on the same NAS you are storing the DataSets.

 

 

  • No labels