From 062298db45b3d0c4ae7bded3998e547c6e6bc050 Mon Sep 17 00:00:00 2001 From: Bowen7 Date: Tue, 23 Sep 2025 19:05:09 +0800 Subject: [PATCH] [RMQ-2157] Update columns and dates in support timelines table --- docusaurus.config.js | 1 + .../CommercialSupportTimelines/index.js | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 7bd1743dc..67ead76d3 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -82,6 +82,7 @@ const config = { }, ], end_of_support: "2028-04-30", + end_of_community_support: "2026-01-31", }, '4.0': { releases: [ diff --git a/src/components/CommercialSupportTimelines/index.js b/src/components/CommercialSupportTimelines/index.js index 01dfe4bc4..6afa3b9cc 100644 --- a/src/components/CommercialSupportTimelines/index.js +++ b/src/components/CommercialSupportTimelines/index.js @@ -2,6 +2,7 @@ import Link from '@docusaurus/Link'; import {getReleaseBranches} from '../RabbitMQServerReleaseInfo'; import styles from "./index.module.css" +const releaseDateOptions = { year: 'numeric', month: 'short' }; const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' }; function getTimelineRows(releaseBranches) { @@ -17,9 +18,16 @@ function getTimelineRows(releaseBranches) { continue; } - const patchRelease = releases[0]; - const releaseDate = new Date(patchRelease.release_date); - const endOfCommunitySupportDate = previousReleaseDate; + const minorRelease = releases[releases.length - 1]; + const releaseDate = new Date(minorRelease.release_date); + + const endOfCommunitySupportDate = + releaseBranch.end_of_community_support + ? new Date( + releaseBranch.end_of_community_support + ) + : previousReleaseDate; + const endOfCommercialSupportDate = new Date(releaseBranch.end_of_support); const isCommunitySupported = endOfCommunitySupportDate === undefined || endOfCommunitySupportDate > now; @@ -33,15 +41,14 @@ function getTimelineRows(releaseBranches) { rows.push({ release: branch, - patch: patchRelease.version, - releaseDate: releaseDate.toLocaleDateString("en-GB", dateOptions), + releaseDate: releaseDate.toLocaleDateString("en-GB", releaseDateOptions), endOfCommunitySupport, endOfCommercialSupport, isCommunitySupported, isCommercialSupported }); - previousReleaseDate = new Date(releases[releases.length - 1].release_date); + previousReleaseDate = new Date(minorRelease.release_date); } return rows; @@ -59,7 +66,6 @@ export function CommercialSupportTimelines() { Release - Patch Date of Release End of Community Support End of Commercial Support* @@ -69,7 +75,6 @@ export function CommercialSupportTimelines() { {rows.map((row) => ( {row.release} - {row.patch} {row.releaseDate} {row.endOfCommunitySupport}