diff --git a/web-server/pages/api/internal/version.ts b/web-server/pages/api/internal/version.ts index 11cea8cc..1bc0cd7d 100644 --- a/web-server/pages/api/internal/version.ts +++ b/web-server/pages/api/internal/version.ts @@ -23,6 +23,7 @@ type CheckNewVersionResponse = { current_github_commit: string; is_update_available: boolean; latest_docker_image_build_date: Date; + current_docker_image_build_date: Date }; type DockerHubAPIResponse = { @@ -151,7 +152,8 @@ async function checkNewImageRelease(): Promise { dockerLatestRemoteTag: latestTag, localVersionInfo: versionInfo }), - latest_docker_image_build_date: latestRemoteDate + latest_docker_image_build_date: latestRemoteDate, + current_docker_image_build_date: new Date(versionInfo.current_build_date) }; } diff --git a/web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx b/web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx index b0e79146..8eb13522 100644 --- a/web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx +++ b/web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx @@ -14,6 +14,9 @@ import { SidebarContext } from '@/contexts/SidebarContext'; import SidebarMenu from './SidebarMenu'; import SidebarTopSection from './SidebarTopSection'; +import { useSelector } from '@/store'; +import { FlexBox } from '@/components/FlexBox'; +import { format } from 'date-fns'; const SidebarWrapper = styled(Box)( ({ theme }) => ` @@ -60,6 +63,10 @@ function Sidebar() { const SidebarContent = () => { const theme = useTheme(); + + const imageStatus = useSelector((s)=>s.app.latestImageStatus) + + const formattedDate = format(new Date(imageStatus.current_docker_image_build_date), "dd MMM yyyy HH:mm:ss"); return ( <> @@ -75,6 +82,9 @@ const SidebarContent = () => { + + Image TimeStamp : {formattedDate} + ); }; diff --git a/web-server/src/types/resources.ts b/web-server/src/types/resources.ts index 0e397019..4258888d 100644 --- a/web-server/src/types/resources.ts +++ b/web-server/src/types/resources.ts @@ -1020,6 +1020,7 @@ export type IntegrationsLinkedAtMap = Record; export type ImageStatusApiResponse = { latest_docker_image: string; is_update_available: boolean; + current_docker_image_build_date: DateString }; export type DB_OrgRepo = {