|
<h2><%= @subnet %></h2>
|
|
<h3>Records</h3>
|
|
<table>
|
|
<th> IP </th>
|
|
<th> MAC </th>
|
|
<th> TFTP Server </th>
|
|
<th> Boot Filename </th>
|
|
<th> Hostname </th>
|
|
<th> Delete </th>
|
|
<% @subnet.reservations.sort.each do |record| %>
|
|
<tr>
|
|
<td><%= record.ip %></td>
|
|
<td><%= record.mac %></td>
|
|
<td><%= record.nextServer %></td>
|
|
<td><%= record.filename %></td>
|
|
<td><%= record.name %></td>
|
|
<td>
|
|
<form action="<%= "/dhcp/#{@subnet.network}/#{record.mac}" %>" method="post">
|
|
<input name='_method' type='hidden' value='delete' />
|
|
<div>
|
|
<input name='commit' type='submit' value='delete' />
|
|
</div>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<%= "Total of #{@subnet.reservations.size} reservations" %>
|
|
<br>
|
|
<h3>Leases</h3>
|
|
<table>
|
|
<th> IP </th>
|
|
<th> MAC </th>
|
|
<th> Lease Starts </th>
|
|
<th> Lease Ends </th>
|
|
<th> Lease State </th>
|
|
<% @subnet.leases.sort.each do |record| %>
|
|
<tr>
|
|
<td><%= record.ip %></td>
|
|
<td><%= record.mac %></td>
|
|
<td><%= record.starts %></td>
|
|
<td><%= record.ends %></td>
|
|
<td><%= record.state %></td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<%="Total of #{@subnet.leases.size} leases" %>
|
|
<br>
|
|
<%="Total of #{@subnet.size} records" %>
|