Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version issue #480

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
4 changes: 3 additions & 1 deletion web-server/pages/api/internal/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -151,7 +152,8 @@ async function checkNewImageRelease(): Promise<CheckNewVersionResponse> {
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)
};
}

Expand Down
10 changes: 10 additions & 0 deletions web-server/src/layouts/ExtendedSidebarLayout/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => `
Expand Down Expand Up @@ -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 (
<>
Expand All @@ -75,6 +82,9 @@ const SidebarContent = () => {
<SidebarMenu />
</Scrollbar>
<Divider sx={{ background: theme.colors.alpha.trueWhite[10] }} />
<FlexBox justifyCenter alignCenter>
Image TimeStamp : {formattedDate}
</FlexBox>
</>
);
};
Expand Down
1 change: 1 addition & 0 deletions web-server/src/types/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ export type IntegrationsLinkedAtMap = Record<keyof IntegrationsMap, DateString>;
export type ImageStatusApiResponse = {
latest_docker_image: string;
is_update_available: boolean;
current_docker_image_build_date: DateString
};

export type DB_OrgRepo = {
Expand Down