You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
41 lines
1.3 KiB
import { parseLeases } from '@/app/lib/parseLeases';
|
|
|
|
export const metadata = {
|
|
title: 'DHCP Leases',
|
|
description: 'View current DHCP leases',
|
|
};
|
|
|
|
export default function LeasesPage() {
|
|
const leases = parseLeases();
|
|
|
|
return (
|
|
<div className="container mt-5">
|
|
<h1 className="mb-4">Current DHCP Leases</h1>
|
|
<table className="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">IP Address</th>
|
|
<th scope="col">Start Time</th>
|
|
<th scope="col">End Time</th>
|
|
<th scope="col">MAC Address</th>
|
|
<th scope="col">Hostname</th>
|
|
<th scope="col">State</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{leases.map((lease, index) => (
|
|
<tr key={index}>
|
|
<td>{lease.ip}</td>
|
|
<td>{lease.start}</td>
|
|
<td>{lease.end}</td>
|
|
<td>{lease.mac}</td>
|
|
<td>{lease.hostname}</td>
|
|
<td>{lease.state}</td>
|
|
</tr>
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
);
|
|
}
|