Overview of the customization options available via config for partners's or private instances and the process to configure them.
The Open Targets Platform allows for easy customisation of the interface via config file and environmental variables at run time. This is particularly useful for partners or those running their own instance of the platform. Here we will look at the various options and how to configure them.
The front end code has a number of options configured in config.js
: here default values are defined.
Defaults can be overwritten via environmental variables - in Open Targets this is implemeneted by the back end team.
Below is the list of the options available. These only accept primitive values. In certain cases we can pass a comma separated list of values.
In a private instance of the platform
The following options work regardless of whether isPartnerPreview
is set to true
or false
.
URL of the platform API
URL for links to corresponding pages of the Open Targets Genetics portal,
no trailing slash;
defaults to https://genetics.opentargets.org
Define the primary colour used by the Material UI components and visualisations. Default Open Targets blue is #3489ca
.
Define a custom colour range to be used in the visualisations such as the heatmaps on the associations pages. Default Open Targets blues scale is '#e5edf4,#ccdcea,#b2cbe0,#99b9d6,#7fa8cc,#6697c1,#4c85b7,#3274ad,#1963a3,#005299'
.
Boolean flag to enable the use of customizations. The options below work only if isPartnerPreview
mode is enabled.
On the evidence, target profile page, disease profile page and drug profile page we can specify:
- which widgets are private (if any)
- which widgets we want to hide (if any) Private widgets will show a "lock" icon next to the widget name. The lock icon is also displaied in the page header.
Note: these options only work if isPartnerPreview
is set to true
.
Comma separated (no spaces) list of ids of widgets to hide on the disease profile page. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets on the disease profile page that are private
. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets to hide on the target profile page. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets on the target profile page that are private
. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets to hide on the drug profile page. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets on the drug profile page that are private
. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets to hide on the evidence profile page. Example: 'bibliography,otProjects'
.
Comma separated (no spaces) list of ids of widgets on the evidence profile page that are private
. Example: 'bibliography,otProjects'
.
On the target and disease association pages we can customize datatypes, in a similar way to widgets on profile pages.
Comma separated (no spaces) list of datatypes ids to hide on the associations pages. Hidden datatypes won't show in the facets and also in the heatmap (i.e. the relevant column will be hidden). Example: 'literature,animal_model'
.
Comma separated (no spaces) list of datatypes (ids) that are private
.
Partner datatypes show lock the icon next to the name in the facets. Example: 'ot_partner'
.
Comma separated (no spaces) list of datasources (ids) that are private
.
Partner datasources show the lock icon next to the name in the facets. Example: 'ot_crispr'
.