diff --git a/Client/src/Components/Charts/ResponseTimeChart/index.jsx b/Client/src/Components/Charts/ResponseTimeChart/index.jsx
index 0518ebee8..2121169b6 100644
--- a/Client/src/Components/Charts/ResponseTimeChart/index.jsx
+++ b/Client/src/Components/Charts/ResponseTimeChart/index.jsx
@@ -54,7 +54,7 @@ const ResponseTimeChart = ({ checks = [] }) => {
-
+
{normalizedChecks.map((check, index) => (
| {
* @returns {React.Component} Returns a table with the monitor data.
*/
const MonitorTable = ({ monitors = [] }) => {
- const mappedRows = monitors.map((monitor) => {
- const params = {
- url: monitor.url,
- title: monitor.name,
- precentage: 100,
- percentageColor:
- monitor.status === true
- ? "var(--env-var-color-17)"
- : "var(--env-var-color-19)",
- status: monitor.status === true ? "up" : "down",
- backgroundColor:
- monitor.status === true
- ? "var(--env-var-color-20)"
- : "var(--env-var-color-21)",
- statusDotColor:
- monitor.status === true
- ? "var(--env-var-color-17)"
- : "var(--env-var-color-19)",
- };
+ const [page, setPage] = useState(0);
+ const [rowsPerPage, setRowsPerPage] = useState(5);
- return (
-
-
-
-
-
-
-
-
-
-
- TODO Add Actions
-
- );
- });
+ const handleChangePage = (event, newPage) => {
+ setPage(newPage);
+ };
+
+ const handleChangeRowsPerPage = (event) => {
+ setRowsPerPage(parseInt(event.target.value, 10));
+ setPage(0);
+ };
+
+ const mappedRows = monitors
+ .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
+ .map((monitor) => {
+ const params = {
+ url: monitor.url,
+ title: monitor.name,
+ precentage: 100,
+ percentageColor:
+ monitor.status === true
+ ? "var(--env-var-color-17)"
+ : "var(--env-var-color-19)",
+ status: monitor.status === true ? "up" : "down",
+ backgroundColor:
+ monitor.status === true
+ ? "var(--env-var-color-20)"
+ : "var(--env-var-color-21)",
+ statusDotColor:
+ monitor.status === true
+ ? "var(--env-var-color-17)"
+ : "var(--env-var-color-19)",
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ TODO Add Actions
+
+ );
+ });
return (
@@ -132,6 +148,18 @@ const MonitorTable = ({ monitors = [] }) => {
{mappedRows}
+
+
+
+
+
);
|