diff --git a/src/layout/MainLayout/index.js b/src/layout/MainLayout/index.js
index 5e0b641..c8c21d1 100644
--- a/src/layout/MainLayout/index.js
+++ b/src/layout/MainLayout/index.js
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react';
import { Outlet } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
+import { useLocation } from 'react-router-dom';
// material-ui
import { useTheme } from '@mui/material/styles';
@@ -31,7 +32,8 @@ const MainLayout = () => {
const theme = useTheme();
const matchDownLG = useMediaQuery(theme.breakpoints.down('lg'));
const dispatch = useDispatch();
-
+ const location = useLocation();
+ const hideNavbarRoutes = ['/databaseHealthCheck']
const { drawerOpen } = useSelector((state) => state.menu);
// drawer toggler
@@ -55,18 +57,26 @@ const MainLayout = () => {
}, [drawerOpen]);
return (
-
-
- {/* */}
-
- {/* */}
- {/* */}
-
-
-
-
-
-
+ <>
+ {!hideNavbarRoutes.includes(location.pathname) && (
+
+
+ {/* */}
+
+ {/* */}
+ {/* */}
+
+
+
+
+
+
+ )}
+ {hideNavbarRoutes.includes(location.pathname) && (
+
+ )}
+ >
+
);
};
diff --git a/src/pages/extra-pages/DatabaseHealthCheck/index.js b/src/pages/extra-pages/DatabaseHealthCheck/index.js
index dbd12ff..606c32b 100644
--- a/src/pages/extra-pages/DatabaseHealthCheck/index.js
+++ b/src/pages/extra-pages/DatabaseHealthCheck/index.js
@@ -1,31 +1,10 @@
-import { Grid, Typography, Stack, } from '@mui/material';
-import { useState, useEffect, lazy } from "react";
+import { useState, useEffect } from "react";
-import Loadable from 'components/Loadable';
-// import { useIntl, FormattedMessage } from "react-intl";
import { get } from "utils/HttpUtils"
-import {GET_SYS_SETTING} from "utils/ApiPathConst"
-
-import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
-const BackgroundHead = {
- backgroundImage: `url(${titleBackgroundImg})`,
- width: 'auto',
- height: 'auto',
- backgroundSize: 'contain',
- backgroundRepeat: 'no-repeat',
- backgroundColor: '#0C489E',
- backgroundPosition: 'right'
-}
-
-const LoadingComponent = Loadable(lazy(() => import('pages/extra-pages/LoadingComponent')));
-
-// import DownloadIcon from '@mui/icons-material/Download';
+import {GET_SYS_CHECKING} from "utils/ApiPathConst"
const DatabaseHealthCheck = () => {
- // const intl = useIntl();
- // const { locale } = intl;
- const [onReady, setOnReady] = useState(false);
- const [sysEnv, setSysEnv] = useState("");
+ const [sysEnv, setSysEnv] = useState("'N/A");
useEffect(() => {
loadSysSetting();
@@ -37,41 +16,16 @@ const DatabaseHealthCheck = () => {
const loadSysSetting = () => {
get({
- url: GET_SYS_SETTING,
+ url: GET_SYS_CHECKING,
onSuccess: (responseData) => {
// console.log(responseData)
setSysEnv(responseData.sysEnv);
- setOnReady(true);
}
});
}
return (
- !onReady ?
-
-
-
-
-
- :
- (
-
-
-
-
-
- Database Health Check
-
-
-
-
-
-
- {sysEnv}
Connection OK
-
-
-
- )
+
{sysEnv}
);
}
diff --git a/src/utils/ApiPathConst.js b/src/utils/ApiPathConst.js
index c9d6c7b..152b3b8 100644
--- a/src/utils/ApiPathConst.js
+++ b/src/utils/ApiPathConst.js
@@ -13,6 +13,7 @@ export const PRIVACY_POLICY_PATH = apiPath+'/privacyPolicy';
export const I_AM_SMART_PATH = apiPath+'/smart/call/iAmSmart';
export const I_AM_SMART_APP_PATH = apiPath+'/smart/call/app/iAmSmart';
export const GET_SYS_SETTING = apiPath+'/sys';
+export const GET_SYS_CHECKING = apiPath+'/sysCheck';
//Group Config
export const GET_GROUP_LIST_PATH = apiPath+'/group';