2024-06-13 10:44:16 +03:30
|
|
|
import React from "react";
|
|
|
|
|
|
2024-06-18 22:39:58 +03:30
|
|
|
const HostsTable = ({ monitors }) => {
|
2024-06-13 10:44:16 +03:30
|
|
|
return (
|
|
|
|
|
<div className="current-monitors-table-holder">
|
|
|
|
|
<table className="current-monitors-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr className="theader-row">
|
|
|
|
|
<td className="theader-row-cell">Host</td>
|
|
|
|
|
<td className="theader-row-cell">Status</td>
|
|
|
|
|
<td className="theader-row-cell">Team</td>
|
|
|
|
|
<td className="theader-row-cell">Actions</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-06-21 11:08:31 -07:00
|
|
|
{monitors.map((monitor, index) => {
|
|
|
|
|
console.log(monitor);
|
|
|
|
|
return (
|
|
|
|
|
<tr className="tbody-row" key={index}>
|
|
|
|
|
<td className="tbody-row-cell">{monitor.url}</td>
|
|
|
|
|
<td className="tbody-row-cell">
|
|
|
|
|
{monitor.isActive ? "Active" : "Down"}
|
|
|
|
|
</td>
|
|
|
|
|
<td className="tbody-row-cell">{monitor.team}</td>
|
|
|
|
|
<td className="tbody-row-cell actions-cell">
|
|
|
|
|
{monitor.actions}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2024-06-13 10:44:16 +03:30
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2024-06-18 22:39:58 +03:30
|
|
|
};
|
2024-06-13 10:44:16 +03:30
|
|
|
|
|
|
|
|
export default HostsTable;
|