mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-04 04:34:07 +09:00
cli: show a node's own ephemeral flag instead of its key's
This commit is contained in:
1 parent
898b42c4f7
commit
534368a786
1 file changed
+1
-5
@@ -358,10 +358,6 @@ func nodesToPtables(nodes []clientv1.Node) (pterm.TableData, error) {
|
||||
tableData[0] = tableHeader
|
||||
|
||||
for _, node := range nodes {
|
||||
// An absent pre-auth key decodes into a zero NodePreAuthKey, so guard
|
||||
// on Id before reading its flags.
|
||||
ephemeral := node.PreAuthKey.Id != "" && node.PreAuthKey.Ephemeral
|
||||
|
||||
var lastSeenTime string
|
||||
if node.LastSeen != nil {
|
||||
lastSeenTime = node.LastSeen.Format(HeadscaleDateTimeFormat)
|
||||
@@ -422,7 +418,7 @@ func nodesToPtables(nodes []clientv1.Node) (pterm.TableData, error) {
|
||||
node.User.Name,
|
||||
tags,
|
||||
ipAddresses,
|
||||
strconv.FormatBool(ephemeral),
|
||||
strconv.FormatBool(node.Ephemeral),
|
||||
lastSeenTime,
|
||||
expiryTime,
|
||||
online,
|
||||
|
||||
Reference in new issue
Block a user