headplane
headplane copied to clipboard
Expiry information
Hey @tale,
thank you for your work on this nice looking admin ui for the latest alpha of headscale!
I am recreating my network using preauth keys with a 5 years expiration
docker compose exec headscale headscale preauthkey create --user <username> --expiration 5y --reusable
After registering the node I have a fully connected node with the given expiration of 0001-01-01 00:00:00 and Expired no.
But the UI shows an expired tag.
Maybe the API also sends the expired column?
Keep up your work its awesome!
The API doesn't actually send the expired column, it's calculated here: https://github.com/juanfont/headscale/blob/main/hscontrol/types/node.go#L138. I'll fix this soon!
Following up, I'm actually not sure what an expired date looks like on here. Because JS engines traditionally have had interesting Date parsing, 0001-01-01 00:00:00 becomes January 1, 2001. My thinking is I might need to add a date library to check if its a valid datestamp after 1970.
3bd5cc99aa3b1ee7649e6979cb55726f8477b77f fixes it for me (available in 0.1.8). Can you confirm this also resolves the issue for you?
I'm on the latest docker image and it does not work for me. My headscale Version is on 0.23.0-alpha11.
I can confirm that my non expiring nodes sends 0001-01-01T00:00:00Z in the routes/_data.machines._index route which is different from 0001-01-01 00:00:00.
Ugh, okay, I just pushed a fix for it, but it might be a little while before I cut a release.
If you want to try it now, ghcr.io/tale/headplane:edge.
Looks good to me now. :)
Stable in 0.1.9.
But I got another wrong information showing the expiration date on the headplane UI. The node has an expiration date, not '0001-01-01', but headplane also shows 'Never' for 'Expiry' in Machine Details. I think it should show the actual expiration date here, but not.