Commit 86719779 authored by Lukas Pravda's avatar Lukas Pravda
Browse files

add dev environemnt for components

parent e947420c
......@@ -222,7 +222,7 @@ class Visualization {
* @memberof Visualization
*/
public async initLigandDisplay(ligandId: string) {
const ligandUrl = Resources.ligandAnnotationAPI(ligandId);
const ligandUrl = Resources.ligandAnnotationAPI(ligandId, this.environment);
return d3.json(ligandUrl)
.catch(e => this.processError(e, `Component ${ligandId} was not found.`))
......
......@@ -3,14 +3,30 @@ namespace Resources {
export const devAPI: string = 'https://wwwdev.ebi.ac.uk/pdbe/graph-api';
export const intAPI: string = 'https://wwwint.ebi.ac.uk/pdbe/graph-api';
export const glycanSymbols: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/pdb-snfg-visuals.xml';
export const glycanMapping: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/het_mapping.json';
export const componentSvgCss: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/pdb-ligand-env-svg.css';
// export const glycanSymbols: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/pdb-snfg-visuals.xml';
// export const glycanMapping: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/het_mapping.json';
// export const componentSvgCss: string = 'https://pdbe.gitdocs.ebi.ac.uk/web-components/ligand-env/pdb-ligand-env-svg.css';
export const glycanSymbols: string = 'https://www.ebi.ac.uk/pdbe/pdb-component-library/data/ligand-env/pdb-snfg-visuals.xml';
export const glycanMapping: string = 'https://www.ebi.ac.uk/pdbe/pdb-component-library/data/het_mapping.json';
export const componentSvgCss: string = 'https://www.ebi.ac.uk/pdbe/pdb-component-library/data/pdb-ligand-env-svg.css';
export const residueTypeURL: string = "https://www.ebi.ac.uk/pdbe/api/pdb/compound/summary/";
export function ligandAnnotationAPI(ligandName: string): string {
return `https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/${ligandName}/annotation`;
export function ligandAnnotationAPI(ligandName: string, env: Model.Environment): string {
let url = '';
switch (env) {
case Model.Environment.Production: {
url = `https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/${ligandName}/annotation`;
break;
}
case Model.Environment.Development:
case Model.Environment.Internal:
url = `https://wwwdev.ebi.ac.uk/pdbe/static/files/pdbechem_v2/${ligandName}/annotation`;
}
return url;
}
export function boundMoleculeAPI(pdbId: string, bmId: string, env: Model.Environment): string {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment