diff --git a/src/pages/JVM/index.js b/src/pages/JVM/index.js index a719cad..c79c0b9 100644 --- a/src/pages/JVM/index.js +++ b/src/pages/JVM/index.js @@ -11,7 +11,7 @@ import { Button } from '@mui/material'; import * as React from "react"; -import { GET_JVM_INFO } from "utils/ApiPathConst"; +import { GET_JVM_INFO, GET_NOTIFICATION_QUEUE_STATUS } from "utils/ApiPathConst"; import axios from "axios"; import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' @@ -20,7 +20,11 @@ const JVMDefault = () => { const [jvmInfo, setJvmInfo] = React.useState(null); const [loading, setLoading] = React.useState(true); const [error, setError] = React.useState(null); - + + const [queueStatus, setQueueStatus] = React.useState(null); + const [queueLoading, setQueueLoading] = React.useState(false); + const [queueError, setQueueError] = React.useState(null); + const fetchJvmInfo = () => { setLoading(true); setError(null); @@ -37,6 +41,24 @@ const JVMDefault = () => { }); }; + const fetchNotificationQueueStatus = () => { + setQueueLoading(true); + setQueueError(null); + setQueueStatus(null); + axios.get(`${GET_NOTIFICATION_QUEUE_STATUS}`) + .then((response) => { + if (response.status === 200) { + setQueueStatus(response.data); + } + }) + .catch(err => { + setQueueError(err); + }) + .finally(() => { + setQueueLoading(false); + }); + }; + React.useEffect(() => { localStorage.setItem('searchCriteria', ""); setLoading(false); @@ -66,25 +88,40 @@ const JVMDefault = () => {