Skip to content

Commit

Permalink
feat: add version info to footer (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Nov 20, 2024
1 parent bea4af2 commit 24c3938
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export {
} from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/backPageView.styles";
export { BackPageHero } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero";
export { SubTitle } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/components/SubTitle/subTitle";
export { VersionInfo } from "@databiosphere/findable-ui/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo";
export { Logo } from "@databiosphere/findable-ui/lib/components/Layout/components/Header/components/Content/components/Logo/logo";
export { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
export { Links } from "@databiosphere/findable-ui/lib/components/Links/links";
Expand Down
17 changes: 16 additions & 1 deletion site-config/anvil-cmg/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 { SystemStatusBindResponseFn } from "@databiosphere/findable-ui/lib/config/entities";
import { CATALOG_DEFAULT } from "../../../app/apis/azul/anvil-cmg/common/constants";
import * as C from "../../../app/components/index";
Expand All @@ -21,15 +22,25 @@ import { floating } from "./layout/floating";

// Template constants
const APP_TITLE = "AnVIL Data Explorer";
const BUILD_DATE = process.env.NEXT_PUBLIC_BUILD_DATE;
const DATA_URL = "https://service.anvil.gi.ucsc.edu";
const BROWSER_URL = "https://explore.anvil.gi.ucsc.edu";
const GIT_HUB_REPO_URL = "https://github.com/DataBiosphere/data-browser";
const GIT_HASH = process.env.NEXT_PUBLIC_GIT_HASH;
const PORTAL_URL = "https://anvilproject.dev.clevercanary.com";
const VERSION = process.env.NEXT_PUBLIC_VERSION;

export function makeConfig(
browserUrl: string,
portalUrl: string,
dataUrl: string,
catalog: string = CATALOG_DEFAULT
gitHubUrl: string = GIT_HUB_REPO_URL,
catalog: string = CATALOG_DEFAULT,
versionInfo: VersionInfo = {
buildDate: BUILD_DATE,
gitHash: GIT_HASH,
version: VERSION,
}
): SiteConfig {
return {
analytics: {
Expand Down Expand Up @@ -148,6 +159,7 @@ export function makeConfig(
explorerTitle: "Explore Data",
export: exportConfig,
exportToTerraUrl: "https://bvdp-saturn-dev.appspot.com/",
gitHubUrl,
layout: {
floating,
footer: {
Expand All @@ -162,6 +174,9 @@ export function makeConfig(
url: `${browserUrl}/privacy`,
},
],
versionInfo: C.VersionInfo({
versionInfo: { ...versionInfo, catalog },
}),
},
header: {
announcements,
Expand Down
1 change: 1 addition & 0 deletions site-config/anvil-cmg/prod/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config: SiteConfig = {
"https://explore.anvilproject.org",
"https://anvilproject.org",
"https://service.explore.anvilproject.org",
undefined,
"anvil8"
),
exportToTerraUrl: "https://anvil.terra.bio/",
Expand Down
1 change: 1 addition & 0 deletions site-config/anvil-cmg/tempdev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const config: SiteConfig = {
"https://explore.temp.gi.ucsc.edu",
"https://anvilproject.org",
"https://service.temp.gi.ucsc.edu",
undefined,
"anvil"
),
exportToTerraUrl: "https://bvdp-saturn-dev.appspot.com/",
Expand Down

0 comments on commit 24c3938

Please sign in to comment.