Conneted Monitor page to backend. Added data normailization to Checks. Added JSdocs and proptypes
This commit is contained in:
1 parent
2f1053bd05
commit
171b1b8059
7 files changed
+92
-35
No files matched your search
@@ -1,12 +1,14 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Host from "../../Components/Host";
|
||||
import HostStatus from "../../Components/HostStatus";
|
||||
import HostActions from "../../Components/HostActions";
|
||||
import BarChart from "../../Components/Charts/BarChart/BarChart";
|
||||
import Button from "../../Components/Button";
|
||||
import ServerStatus from "../../Components/Charts/Servers/ServerStatus";
|
||||
import CurrentMonitors from "../../Components/CurrentMonitors";
|
||||
import MockData from "../../Mock/sample_data.json";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
/**
|
||||
* CurrentStats displays the current status of monitor
|
||||
*
|
||||
* @component
|
||||
* @param {Array<Monitor>} monitors - An array of monitor objects to be displayed.
|
||||
*/
|
||||
|
||||
const CurrentStats = ({ monitors }) => {
|
||||
return (
|
||||
@@ -33,4 +35,8 @@ const CurrentStats = ({ monitors }) => {
|
||||
);
|
||||
};
|
||||
|
||||
CurrentStats.propTypes = {
|
||||
monitors: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
};
|
||||
|
||||
export default CurrentStats;
|
||||
@@ -18,7 +18,6 @@ const Monitors = () => {
|
||||
return (
|
||||
<div className="monitors">
|
||||
<CurrentStats monitors={monitorState.monitors} />
|
||||
{/* <CreateNewMonitor /> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user