aboutsummaryrefslogtreecommitdiff
path: root/packages/dnsmasq-leases-html/templates/index.html
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-03-06 06:29:24 -0800
committerFranck Cuny <franck@fcuny.net>2024-03-06 06:29:24 -0800
commit1e4a5aa09c1c8f43722c9c260f011398799a8e8f (patch)
treecd73e0fb8ba53bd21cee6ccf2dcc85639bbbb93f /packages/dnsmasq-leases-html/templates/index.html
parentset correct git email in the profiles (diff)
downloadinfra-1e4a5aa09c1c8f43722c9c260f011398799a8e8f.tar.gz
rename `tools` to `packages` to follow convention
The convention is to use `pkgs` or `packages` for overlays and definition of custom packages. Since I'm already using `pkg` for go, I prefer to use `packages` for my scripts.
Diffstat (limited to 'packages/dnsmasq-leases-html/templates/index.html')
-rw-r--r--packages/dnsmasq-leases-html/templates/index.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/packages/dnsmasq-leases-html/templates/index.html b/packages/dnsmasq-leases-html/templates/index.html
new file mode 100644
index 0000000..913a0c9
--- /dev/null
+++ b/packages/dnsmasq-leases-html/templates/index.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Leases assigned by dnsmasq</title>
+ <style type="text/css">
+ body {
+ margin: auto;
+ width: 70%;
+ font-family: monospace;
+ font-size: 16px;
+ }
+ .center {
+ margin-left: auto;
+ margin-right: auto;
+ }
+ td, th {
+ padding-left: 1em;
+ padding-right: 1em;
+ padding-top: .5em;
+ padding-bottom: .5em;
+ }
+ td:first-child, th:first-child {
+ padding-left: .25em;
+ }
+ td:last-child, th:last-child {
+ padding-right: .25em;
+ }
+ th {
+ padding-top: 1em;
+ text-align: left;
+ }
+ tr:nth-child(even) {
+ background: #eee;
+ }
+ form {
+ display: inline;
+ }
+ </style>
+</head>
+
+<body>
+ <table>
+ <tr>
+ <th>IP address</th>
+ <th>MAC address</th>
+ <th>Hostname</th>
+ <th>Expire</th>
+ </tr>
+ {% for lease in leases %}
+ <tr>
+ <td>{{ lease.IP }}</td>
+ <td>{{ lease.MAC }}</td>
+ <td>{{ lease.hostname }}</td>
+ <td>{{ lease.expire }}</td>
+ </tr>
+ {% endfor %}
+ </table>
+</body>
+</html>