Merged PR 2247: added health endpoint to check pre prod container startup issues

added health endpoint to check pre prod container startup issues

Related work items: #22624
This commit is contained in:
Robert Bond
2026-04-15 09:52:15 +00:00
parent 15c35d201e
commit bb4c3ee054
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ const Header = (props) => {
const switchLocale = router.asPath.startsWith("/cy") ? "en" : "cy"; const switchLocale = router.asPath.startsWith("/cy") ? "en" : "cy";
console.log("switch locale", locale === "en" ? "cy" : "en"); //console.log("switch locale", locale === "en" ? "cy" : "en");
// const handleLocaleSwitch = () => { // const handleLocaleSwitch = () => {
// // const router = useRouter(); // // const router = useRouter();
+9
View File
@@ -0,0 +1,9 @@
export default function handler(req, res) {
if (req.method !== "GET") {
return res.status(405).json({ error: "Method not allowed" });
}
res.status(200).json({
status: "UP",
timestamp: new Date().toISOString()
});
}
+3 -5
View File
@@ -163,14 +163,14 @@ export const getServerSideProps = wrapper.getServerSideProps(
var relayToken = await getToken(); var relayToken = await getToken();
relayToken = relayToken.access_token; relayToken = relayToken.access_token;
console.log("\n////////////////////\nauth sess:", thisSession); //console.log("\n////////////////////\nauth sess:", thisSession);
const showLoginCheck = process.env.SHOWLOGIN || false; const showLoginCheck = process.env.SHOWLOGIN || false;
const showMapCheck = process.env.SHOWMAPS || false; const showMapCheck = process.env.SHOWMAPS || false;
const showReps = process.env.SHOWREPRESENTATIONS || false; const showReps = process.env.SHOWREPRESENTATIONS || false;
store.dispatch(setShowReps(showReps, showLoginCheck)); store.dispatch(setShowReps(showReps, showLoginCheck));
console.log("server checks :", showReps, showLoginCheck); //console.log("server checks :", showReps, showLoginCheck);
let hasLoginCode = thisSession != null; let hasLoginCode = thisSession != null;
console.log("server side has session:", thisSession != null); console.log("server side has session:", thisSession != null);
@@ -178,7 +178,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
let ggLocale = let ggLocale =
typeof query.ui_locales != "undefined" && query.ui_locales; typeof query.ui_locales != "undefined" && query.ui_locales;
console.log("hasloginCode:", hasLoginCode + "\n////////////////////\n"); //console.log("hasloginCode:", hasLoginCode + "\n////////////////////\n");
let ggToken = {}; let ggToken = {};
let ggUserInfo = {}; let ggUserInfo = {};
@@ -190,8 +190,6 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setContainerID(thisSession.user.id)); store.dispatch(setContainerID(thisSession.user.id));
portalUserObj = await getPortalLogin(thisSession.user.email); portalUserObj = await getPortalLogin(thisSession.user.email);
} else {
console.log("///////////////\nempty session \n///////////////\n");
} }
return { return {