Skip to content

Commit 307be0a

Browse files
authored
Merge pull request #19485 from GordonSmith/HPCC-33042-MASTER_AGE
HPCC-33042 Change age warnings based on release type Reviewed-By: Jeremy Clements <[email protected]> Reviewed-by: Gavin Halliday <[email protected]> Merged-by: Gavin Halliday <[email protected]>
2 parents 3986e9c + 4f8e651 commit 307be0a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

esp/src/src-react/components/Title.tsx

+16-4
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,30 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
233233

234234
React.useEffect(() => {
235235
if (!features.timestamp) return;
236+
let ancient = 90;
237+
let veryOld = 60;
238+
let old = 30;
239+
if (features.maturity === "trunk") {
240+
ancient = 360;
241+
veryOld = 180;
242+
old = 90;
243+
} else if (features.maturity === "rc") {
244+
ancient = 28;
245+
veryOld = 21;
246+
old = 14;
247+
}
236248
const age = Math.floor((Date.now() - features.timestamp.getTime()) / DAY);
237249
const message = nlsHPCC.PlatformBuildIsNNNDaysOld.replace("NNN", `${age}`);
238-
if (age > 90) {
250+
if (age > ancient) {
239251
logger.alert(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
240-
} else if (age > 60) {
252+
} else if (age > veryOld) {
241253
logger.error(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
242-
} else if (age > 30) {
254+
} else if (age > old) {
243255
logger.warning(message + ` ${nlsHPCC.PleaseUpgradeToLaterPointRelease}`);
244256
} else {
245257
logger.info(message);
246258
}
247-
}, [features.timestamp]);
259+
}, [features.maturity, features.timestamp]);
248260

249261
React.useEffect(() => {
250262
if (!currentUser.username) return;

0 commit comments

Comments
 (0)