Skip to content

Commit

Permalink
feat: add version info to footer (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and frano-m committed Nov 20, 2024
1 parent 07ba9a8 commit 19104a4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site-config/hca-dcp/cc-ma-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PORTAL_URL = "https://data.humancellatlas.dev.clevercanary.com";

const config: SiteConfig = {
...makeManagedAccessConfig(
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, CATALOG)
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, undefined, CATALOG)
),
};

Expand Down
17 changes: 16 additions & 1 deletion site-config/hca-dcp/dev/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { APIEndpoints } from "@databiosphere/findable-ui/lib/apis/azul/common/entities";
import { VersionInfo } from "@databiosphere/findable-ui/lib/components/Layout/components/Footer/components/VersionInfo/types";
import { ANCHOR_TARGET } from "@databiosphere/findable-ui/lib/components/Links/common/entities";
import { SystemStatusBindResponseFn } from "@databiosphere/findable-ui/lib/config/entities";
import { tabletUp } from "@databiosphere/findable-ui/lib/theme/common/breakpoints";
Expand Down Expand Up @@ -26,19 +27,29 @@ import { floating } from "./layout/floating";
const APP_TITLE = "HCA Data Explorer";
const CATALOG = "dcp43";
const BROWSER_URL = "https://explore.data.humancellatlas.dev.clevercanary.com";
const BUILD_DATE = process.env.NEXT_PUBLIC_BUILD_DATE;
export const DATA_URL = "https://service.azul.data.humancellatlas.org";
export const EXPORT_TO_TERRA_URL = "https://app.terra.bio";
const FONT_FAMILY_DIN = "'din-2014', sans-serif";
const GIT_HASH = process.env.NEXT_PUBLIC_GIT_HASH;
const GIT_HUB_REPO_URL = "https://github.com/DataBiosphere/data-browser";
const HOME_PAGE_PATH = "/projects";
const ORG_URL = "https://www.humancellatlas.org";
const PAGINATION_PAGE_SIZE = "25";
export const PORTAL_URL = "https://data.humancellatlas.dev.clevercanary.com";
const VERSION = process.env.NEXT_PUBLIC_VERSION;

export function makeConfig(
browserUrl: string,
portalUrl: string,
dataUrl: string,
catalog: string = CATALOG
gitHubUrl: string = GIT_HUB_REPO_URL,
catalog: string = CATALOG,
versionInfo: VersionInfo = {
buildDate: BUILD_DATE,
gitHash: GIT_HASH,
version: VERSION,
}
): SiteConfig {
return {
analytics: {
Expand Down Expand Up @@ -66,6 +77,7 @@ export function makeConfig(
explorerTitle: "Explore Data",
export: exportConfig,
exportToTerraUrl: EXPORT_TO_TERRA_URL,
gitHubUrl,
layout: {
floating,
footer: {
Expand Down Expand Up @@ -95,6 +107,9 @@ export function makeConfig(
url: `${portalUrl}/contact`,
},
],
versionInfo: C.VersionInfo({
versionInfo: { ...versionInfo, catalog },
}),
},
header: {
announcements,
Expand Down
2 changes: 1 addition & 1 deletion site-config/hca-dcp/ma-dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const PORTAL_URL = "https://dev.singlecell.gi.ucsc.edu";

const config: SiteConfig = {
...makeManagedAccessConfig(
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, CATALOG)
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, undefined, CATALOG)
),
};

Expand Down
2 changes: 1 addition & 1 deletion site-config/hca-dcp/ma-prod/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const PORTAL_URL = "https://data.humancellatlas.org";

const config: SiteConfig = {
...makeManagedAccessConfig(
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, CATALOG)
makeConfig(BROWSER_URL, PORTAL_URL, DATA_URL, undefined, CATALOG)
),
};

Expand Down

0 comments on commit 19104a4

Please sign in to comment.