Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions deploy/nginx/common/routes-core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ location ~ ^/ContentService/data/(orthology/[^/]+/species|orthologies/ids/specie
proxy_pass http://content_node;
}

# An accession's interactors from IntAct: the entity popup's list, the
# interactor tables' enhanced rows, the interactor page's rows with their
# Reactome entities, and the POST the diagram sends for every protein in it.
# Java's Cypher as written, so equal scores keep Java's order; byte-identical
# over 54 requests, errors and paging included. The other interactor
# endpoints -- PSICQUIC, uploads, tokens, summaries -- stay with Java.
location ~ ^/ContentService/interactors/static/molecule/((enhanced/)?[^/]+/details|[^/]+/withEntities)$ {
include /etc/nginx/common/upstream-proxy.conf;
proxy_pass http://content_node;
}

location = /ContentService/interactors/static/molecules/details {
include /etc/nginx/common/upstream-proxy.conf;
proxy_pass http://content_node;
}

# A person, by dbId or ORCID, and the publications they authored (by dbId,
# ORCID or e-mail address), written by the domain serialiser in each of Java's
# views. Java matches the person by a property no index serves -- 1.1s by dbId;
Expand Down
20 changes: 20 additions & 0 deletions projects/website-angular/src/scripts/proxy-order.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,19 @@ describe('the dev server proxy', () => {
});
}

for (const url of [
'/ContentService/interactors/static/molecule/P04637/details',
'/ContentService/interactors/static/molecule/P04637/details?page=1&pageSize=3',
'/ContentService/interactors/static/molecule/enhanced/Q9BXM7-1/details',
'/ContentService/interactors/static/molecule/P04637/withEntities',
// The diagram's POST, for every protein in it.
'/ContentService/interactors/static/molecules/details',
]) {
it(`sends ${url} to the content service`, async () => {
expect(await targetOf(url)).toBe(contentNode);
});
}

for (const other of [
// Other attributes of the same Java endpoint are not ported.
'/ContentService/data/query/70486/displayName',
Expand All @@ -207,6 +220,13 @@ describe('the dev server proxy', () => {
// Java's POST /query/ids (a batch of objects), which node does not serve.
'/ContentService/data/query/ids',
'/ContentService/data/query/abridged/70486',
// The interactor endpoints node does not serve.
'/ContentService/interactors/static/molecule/P04637/summary',
'/ContentService/interactors/static/molecules/summary',
'/ContentService/interactors/static/molecule/P04637/pathways',
'/ContentService/interactors/psicquic/molecules/IntAct/details',
'/ContentService/interactors/upload/tuple/content',
'/ContentService/interactors/static/molecule/P04637/details.pdf',
// Spring's own 404s: no species, or more after it.
'/ContentService/data/orthology/R-HSA-69620/species/',
'/ContentService/data/orthologies/ids/species/48892/x',
Expand Down
5 changes: 5 additions & 0 deletions proxy.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ module.exports = {
// up to twenty (POST), for the species selector.
'^/ContentService/data/(orthology/[^/?]+/species|orthologies/ids/species)/[^/?]+(\\?|$)':
contentNode,
// An accession's interactors (details, enhanced details, with entities), and
// the diagram's POST for many. PSICQUIC, uploads, tokens and summaries stay
// with Java.
'^/ContentService/interactors/static/(molecule/((enhanced/)?[^/?]+/details|[^/?]+/withEntities)|molecules/details)(\\?|$)':
contentNode,
// A person, and the publications they authored. Not the other attributes
// under /person/{id}/, which Java serves.
'^/ContentService/data/person/[^/?]+(/publications)?(\\?|$)': contentNode,
Expand Down
Loading
Loading