Skip to content
Open
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
3 changes: 2 additions & 1 deletion apps/platform/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_URL=https://dev.opentargets.xyz/api/v4/graphql
VITE_AI_API_URL=https://dev-ai-api-w37vlfsidq-ew.a.run.app
VITE_PROFILE=platform
VITE_PROFILE=platform
VITE_RELEASE_NOTES_URL="https://platform-docs.opentargets.org/release-notes"
4 changes: 4 additions & 0 deletions apps/platform/docs/CUSTOM_CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ URL for links to corresponding pages of the Open Targets Genetics portal,
no trailing slash;
defaults to `https://genetics.opentargets.org`

### configReleaseNotesURL

Release notes URL. Defaults to `https://platform-docs.opentargets.org/release-notes`.

#### configPrimaryColor

Define the primary colour used by the Material UI components and visualisations. Default Open Targets blue is `#3489ca`.
Expand Down
2 changes: 1 addition & 1 deletion apps/platform/src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function HomePage(): JSX.Element {
const { isPartnerPreview } = usePermissions();
const releaseNotesURL = isPartnerPreview
? "http://home.opentargets.org/ppp-release-notes"
: "https://platform-docs.opentargets.org/release-notes";
: config.releaseNotesUrl;
const classes = useStyles();

const handleScrollDown = (): void => {
Expand Down
4 changes: 4 additions & 0 deletions packages/ot-config/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const getEnvironmentConfig = (env: Environment): Config => {
googleTagManagerID: null,
geneticsPortalUrl: "https://genetics.opentargets.org",
gitVersion: "",
releaseNotesUrl: "https://platform-docs.opentargets.org/release-notes",
},
production: {
urlApi: "https://api.platform.opentargets.org",
Expand All @@ -17,6 +18,7 @@ export const getEnvironmentConfig = (env: Environment): Config => {
googleTagManagerID: "GTM-XXXXX",
geneticsPortalUrl: "https://genetics.opentargets.org",
gitVersion: "",
releaseNotesUrl: "https://platform-docs.opentargets.org/release-notes",
},
};

Expand All @@ -27,6 +29,7 @@ export const getEnvironmentConfig = (env: Environment): Config => {
const ENV_API_URL: string | undefined = import.meta.env.VITE_API_URL;
const ENV_AI_API_URL: string | undefined = import.meta.env.VITE_AI_API_URL;
const ENV_GIT_VERSION: string | undefined = import.meta.env.VITE_GIT_VERSION;
const ENV_RELEASE_NOTES_URL: string | undefined = import.meta.env.VITE_RELEASE_NOTES_URL;

export const getConfig = (): Config => {
return {
Expand All @@ -36,5 +39,6 @@ export const getConfig = (): Config => {
profile: window.configProfile ?? { isPartnerPreview: false },
googleTagManagerID: window.configGoogleTagManagerID ?? null,
geneticsPortalUrl: window.configGeneticsPortalUrl ?? "https://genetics.opentargets.org",
releaseNotesUrl: window.configReleaseNotesUrl ?? ENV_RELEASE_NOTES_URL ?? "https://platform-docs.opentargets.org/release-notes/production",
};
};
1 change: 1 addition & 0 deletions packages/ot-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ declare global {
configGoogleTagManagerID?: string;
configGeneticsPortalUrl?: string;
gitVersion?: string;
configReleaseNotesUrl?: string;
}
}
1 change: 1 addition & 0 deletions packages/ot-config/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface Config {
googleTagManagerID: string | null;
geneticsPortalUrl: string;
gitVersion: string;
releaseNotesUrl: string;
}

export type Environment = "development" | "production";