Skip to content

Commit 67ccc0d

Browse files
Merge pull request #2367 from Bowen7/RMQ-2157
[RMQ-2157] Update columns and dates in support timelines table
2 parents b39c53b + d8fafad commit 67ccc0d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const config = {
8787
},
8888
],
8989
end_of_support: "2028-04-30",
90+
end_of_community_support: "2026-01-31",
9091
},
9192
'4.0': {
9293
releases: [

src/components/CommercialSupportTimelines/index.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Link from '@docusaurus/Link';
22
import {getReleaseBranches} from '../RabbitMQServerReleaseInfo';
33
import styles from "./index.module.css"
44

5+
const releaseDateOptions = { year: 'numeric', month: 'short' };
56
const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
67

78
function getTimelineRows(releaseBranches) {
@@ -17,9 +18,16 @@ function getTimelineRows(releaseBranches) {
1718
continue;
1819
}
1920

20-
const patchRelease = releases[0];
21-
const releaseDate = new Date(patchRelease.release_date);
22-
const endOfCommunitySupportDate = previousReleaseDate;
21+
const minorRelease = releases[releases.length - 1];
22+
const releaseDate = new Date(minorRelease.release_date);
23+
24+
const endOfCommunitySupportDate =
25+
releaseBranch.end_of_community_support
26+
? new Date(
27+
releaseBranch.end_of_community_support
28+
)
29+
: previousReleaseDate;
30+
2331
const endOfCommercialSupportDate = new Date(releaseBranch.end_of_support);
2432

2533
const isCommunitySupported = endOfCommunitySupportDate === undefined || endOfCommunitySupportDate > now;
@@ -33,15 +41,14 @@ function getTimelineRows(releaseBranches) {
3341

3442
rows.push({
3543
release: branch,
36-
patch: patchRelease.version,
37-
releaseDate: releaseDate.toLocaleDateString("en-GB", dateOptions),
44+
releaseDate: releaseDate.toLocaleDateString("en-GB", releaseDateOptions),
3845
endOfCommunitySupport,
3946
endOfCommercialSupport,
4047
isCommunitySupported,
4148
isCommercialSupported
4249
});
4350

44-
previousReleaseDate = new Date(releases[releases.length - 1].release_date);
51+
previousReleaseDate = new Date(minorRelease.release_date);
4552
}
4653

4754
return rows;
@@ -59,7 +66,6 @@ export function CommercialSupportTimelines() {
5966
<thead>
6067
<tr>
6168
<th>Release</th>
62-
<th>Patch</th>
6369
<th>Date of Release</th>
6470
<th>End of Community Support</th>
6571
<th>End of Commercial Support*</th>
@@ -69,7 +75,6 @@ export function CommercialSupportTimelines() {
6975
{rows.map((row) => (
7076
<tr key={row.release}>
7177
<td>{row.release}</td>
72-
<td>{row.patch}</td>
7378
<td>{row.releaseDate}</td>
7479
<td className={row.isCommunitySupported ? styles.supported : styles.unsupported}>
7580
{row.endOfCommunitySupport}

src/components/RabbitMQServerReleaseInfo/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ export function RabbitMQServerReleaseInfoTable() {
155155
var hasOSSSupport = false;
156156
if (releaseBranch.end_of_support) {
157157
/* Release branch is supported. */
158-
if (previousReleaseBranch) {
158+
if (releaseBranch.end_of_community_support) {
159+
endOfCommunitySupportDate = new Date(releaseBranch.end_of_community_support);
160+
} else if (previousReleaseBranch) {
159161
const prevReleases = previousReleaseBranch.releases;
160162
const initialPrevRelease = prevReleases[prevReleases.length - 1];
161163
endOfCommunitySupportDate = new Date(initialPrevRelease.release_date);

0 commit comments

Comments
 (0)