/dhcp/status -- give out hostname for UI
This commit is contained in:
parent
86d79ae232
commit
7acb107cbf
7
dhcp.go
7
dhcp.go
|
@ -21,9 +21,10 @@ func handleDHCPStatus(w http.ResponseWriter, r *http.Request) {
|
|||
leases := []map[string]string{}
|
||||
for i := range rawLeases {
|
||||
lease := map[string]string{
|
||||
"mac": rawLeases[i].HWAddr.String(),
|
||||
"ip": rawLeases[i].IP.String(),
|
||||
"expires": rawLeases[i].Expiry.Format(time.RFC3339),
|
||||
"mac": rawLeases[i].HWAddr.String(),
|
||||
"ip": rawLeases[i].IP.String(),
|
||||
"hostname": rawLeases[i].Hostname,
|
||||
"expires": rawLeases[i].Expiry.Format(time.RFC3339),
|
||||
}
|
||||
leases = append(leases, lease)
|
||||
|
||||
|
|
Loading…
Reference in New Issue