diff --git a/src/data/api-lapis.ts b/src/data/api-lapis.ts index 70e72a5e..24b451be 100644 --- a/src/data/api-lapis.ts +++ b/src/data/api-lapis.ts @@ -82,7 +82,7 @@ export async function checkSiloAvailability(signal?: AbortSignal): Promise { +export async function fetchLapisDataVersion(signal?: AbortSignal): Promise { let url = '/info'; if (ACCESS_KEY) { url += '?accessKey=' + ACCESS_KEY; @@ -92,8 +92,7 @@ export async function fetchLapisDataVersion(signal?: AbortSignal): Promise { diff --git a/src/layout/base/Footer.tsx b/src/layout/base/Footer.tsx index c6ea0057..20547cfc 100644 --- a/src/layout/base/Footer.tsx +++ b/src/layout/base/Footer.tsx @@ -3,6 +3,7 @@ import { sequenceDataSource } from '../../helpers/sequence-data-source'; import { ExternalLink } from '../../components/ExternalLink'; import React from 'react'; import styled from 'styled-components'; +import dayjs from 'dayjs'; const FooterStyle = styled.footer` margin-top: 50px; @@ -16,11 +17,15 @@ export function Footer({ lapisDataVersion, }: { nextcladeDatasetInfo?: NextcladeDatasetInfo; - lapisDataVersion?: string; + lapisDataVersion?: number; }) { + let lapisUpdateFormattedString = ''; + if (lapisDataVersion !== undefined) { + lapisUpdateFormattedString = dayjs.unix(lapisDataVersion).locale('en').calendar(); + } return ( - {lapisDataVersion &&
The sequence data was updated: {lapisDataVersion}
} + {lapisUpdateFormattedString &&
The sequence data was updated: {lapisUpdateFormattedString}
} {nextcladeDatasetInfo?.tag &&
Nextclade dataset version: {nextcladeDatasetInfo.tag}
} {sequenceDataSource === 'gisaid' && (
diff --git a/src/pages/ExplorePage.tsx b/src/pages/ExplorePage.tsx index 70b86e7a..852bdd18 100644 --- a/src/pages/ExplorePage.tsx +++ b/src/pages/ExplorePage.tsx @@ -17,6 +17,8 @@ import { useSingleSelectorsFromExploreUrl } from '../helpers/selectors-from-expl import { InternalLink } from '../components/InternalLink'; import { MdOutlineOpenInNew } from 'react-icons/md'; import { Link } from 'react-router-dom'; +import { sequenceDataSource } from '../helpers/sequence-data-source'; +import { fetchLapisDataVersion } from '../data/api-lapis'; type Props = { isSmallScreen: boolean; @@ -54,6 +56,7 @@ export const ExplorePage = ({ isSmallScreen }: Props) => { return (
+

Detect and analyze variants of SARS-CoV-2

@@ -100,6 +103,36 @@ export const ExplorePage = ({ isSmallScreen }: Props) => { ); }; +function MissingDataUpdateBanner() { + const { data: lapisDataVersion } = useQuery(fetchLapisDataVersion, []); + console.log(lapisDataVersion); + if (sequenceDataSource === 'gisaid' && lapisDataVersion === 1734968364) { + return ( +
+

Data feed interruption

+

+ Data on this dashboard has not been updated since{' '} + 23 December 2024 due to an interruption in the data feed. We have + contacted the data provider GISAID regarding this issue and hope for a resolution soon. In the + meantime, you can check out the{' '} + + Open instance of CoV-Spectrum + {' '} + or the new{' '} + + + GenSpectrum dashboard + + + {' '} + for more recent data from INSDC. +

+
+ ); + } + return <>; +} + function GenspectrumBanner() { return (