Unverified Commit 32005090 authored by Manoj Pandian Sakthivel's avatar Manoj Pandian Sakthivel Committed by GitHub
Browse files

Client web thoas (#312)



* Use web thoas endpoint

* Use proper genomeID

* Remove TODO

* Use helper to parse stable_id

* Get objectId

* Change to .build-nginx-wp

* Update Ngnixreview

* Add thoas proxy in dev config

* Remove /thoas from target URL

* Sample date for homo_sapiens_GCA_000001405_14

* Change thoas url
Co-authored-by: Kamal Dodiya's avatarKamal Dodiya <kamal@ebi.ac.uk>
parent afb88c7c
Pipeline #84205 passed with stages
in 7 minutes and 33 seconds
......@@ -277,7 +277,7 @@ Nginx:Internal-WP:
- Test_N_Build:internal
Nginx:review:
extends: .build-nginx-ehk
extends: .build-nginx-wp
variables:
DEPLOYENV: dev
CONTAINER_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_REF_SLUG}
......
......@@ -32,7 +32,7 @@ type Props = {
};
const client = new ApolloClient({
uri: 'http://hx-rke-wp-webadmin-13-worker-1.caas.ebi.ac.uk:31497'
uri: '/thoas'
});
const GeneViewSidebar = (props: Props) => {
......
......@@ -39,6 +39,7 @@ import {
import { EntityViewerParams } from 'src/content/app/entity-viewer/EntityViewer';
import styles from './GeneExternalReferences.scss';
import { parseEnsObjectIdFromUrl } from 'src/shared/state/ens-object/ensObjectHelpers';
const QUERY = gql`
query Gene($stable_id: String!, $genome_id: String!) {
......@@ -113,15 +114,16 @@ const buildCrossReferenceGroups = (crossReferences: CrossReference[]) => {
const GeneExternalReferences = () => {
const params: EntityViewerParams = useParams();
const entityId = params.entityId?.split(':').pop();
const { entityId, genomeId } = params;
const stableId = entityId ? parseEnsObjectIdFromUrl(entityId).objectId : null;
// TODO: The genomeId is temporarily hardcoded here as Thoas does ot have date for homo_sapiens_GCA_000001405_27.
const { data, loading } = useQuery<{ gene: Gene }>(QUERY, {
variables: {
stable_id: entityId,
genome_id: 'homo_sapiens_GCA_000001405_28'
stable_id: stableId,
genome_id: genomeId
},
skip: !entityId
skip: !stableId
});
if (loading) {
......
......@@ -666,9 +666,14 @@ export const entityViewerSidebarSampleData: {
entities: { [entityId: string]: EntityViewerSidebarPayload };
};
} = {
homo_sapiens_GCA_000001405_27: {
homo_sapiens_GCA_000001405_14: {
entities: {
'homo_sapiens_GCA_000001405_27:gene:ENSG00000139618': entityViewerHomoSapiensSampleResponse
'homo_sapiens_GCA_000001405_14:gene:ENSG00000139618': entityViewerHomoSapiensSampleResponse
}
},
homo_sapiens_GCA_000001405_28: {
entities: {
'homo_sapiens_GCA_000001405_28:gene:ENSG00000139618': entityViewerHomoSapiensSampleResponse
}
},
......
......@@ -40,6 +40,11 @@ const devServerConfig = {
target: 'https://staging-2020.ensembl.org',
changeOrigin: true,
secure: false
},
'/thoas': {
target: 'https://staging-2020.ensembl.org',
changeOrigin: true,
secure: false
}
},
......
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