diff --git a/cmd/dhcp4d/dhcp4d.go b/cmd/dhcp4d/dhcp4d.go
index ae705a4..f78b19b 100644
--- a/cmd/dhcp4d/dhcp4d.go
+++ b/cmd/dhcp4d/dhcp4d.go
@@ -92,6 +92,9 @@ var (
}
return dur.Truncate(1 * time.Second).String()
},
+ "zero": func(t time.Time) bool {
+ return t.IsZero()
+ },
}).Parse(`
@@ -150,7 +153,7 @@ form {
Hostname |
MAC address |
Vendor |
-Expiry |
+Last ACK |
{{ range $idx, $l := . }}
@@ -166,27 +169,31 @@ form {
{{$l.HardwareAddr}} |
{{$l.Vendor}} |
-
-{{ if $l.Expired }}
-{{ since $l.Expiry }}
-expired
-{{ else }}
-{{ if $l.Static }}
-static
-{{ else }}
-{{ timefmt $l.Expiry }}
+ |
+{{ if (not (zero $l.LastACK)) }}
+{{ timefmt $l.LastACK }}
+{{ if $l.Active }}
active
{{ end }}
+{{ if $l.Expired }}
+expired
+{{ end }}
{{ end }}
|
{{ end }}
{{ end }}
+Static Leases
{{ template "table" .StaticLeases }}
+
+
+Dynamic Leases
+
{{ template "table" .DynamicLeases }}
+