57 lines
3.2 KiB
HTML
57 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ subnet.name }} - Subnet Details</title>
|
|
<link rel="icon" type="image/png" href="/static/logo.png">
|
|
<link href="/static/css/output.css" rel="stylesheet">
|
|
<script src="/static/js/subnet.js"></script>
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
|
|
{% include 'header.html' %}
|
|
<div class="flex-1 flex items-center justify-center mx-4">
|
|
<div class="container py-8 max-w-3/4 pt-20">
|
|
<div class="flex items-center mb-6 relative">
|
|
<a href="javascript:window.history.back()" class="absolute left-0 bg-gradient-to-r from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-500 text-white flex items-center justify-center rounded-full w-11 h-11"><i class="fas fa-arrow-left"></i></a>
|
|
<h1 class="text-3xl font-bold text-center w-full">{{ subnet.name }} ({{ subnet.cidr }})</h1>
|
|
<button type="button" id="export-csv" class="absolute right-0 bg-gradient-to-r from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-500 text-white flex items-center justify-center rounded-full w-11 h-11 export-csv-btn" title="Export as CSV" data-subnet-id="{{ subnet.id }}">
|
|
<i class="fas fa-file-csv fa-lg"></i>
|
|
</button>
|
|
</div>
|
|
<form action="" method="POST">
|
|
<table class="table-auto w-full mb-6">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center text-gray-400">IP Address</th>
|
|
<th class="text-center text-gray-400">Hostname</th>
|
|
<th class="text-center text-gray-400">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-700">
|
|
{% for ip in ip_addresses %}
|
|
<tr>
|
|
<td class="text-gray-300 font-bold text-center">{{ ip[1] }}</td>
|
|
<td class="text-white text-center">
|
|
{% if ip[2] and ip[3] %}
|
|
<a href="/device/{{ ip[3] }}" class="hover:text-blue-300">{{ ip[2] }}</a>
|
|
{% elif ip[2] %}
|
|
{{ ip[2] }}
|
|
{% else %}
|
|
{{ '' }}
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-white text-left align-top">
|
|
<textarea readonly rows="1" class="bg-gray-800 text-gray-100 border border-gray-600 rounded w-full resize-y cursor-pointer p-2">{{ ip[4].split('\n')[0] if ip[4] else '' }}</textarea>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script src="/static/js/export_csv.js"></script>
|
|
</body>
|
|
</html> |