mirror of
https://github.com/gravitational/teleport
synced 2024-10-20 17:23:22 +00:00
Brought back "list nodes" functionality to tctl
This commit is contained in:
parent
02c6786521
commit
9704899dfd
|
@ -685,7 +685,7 @@ func (s *tunnelSite) handleHeartbeat(ch ssh.Channel, reqC <-chan *ssh.Request) {
|
|||
s.log.Infof("agent disconnected")
|
||||
return
|
||||
}
|
||||
s.log.Debugf("ping")
|
||||
//s.log.Debugf("ping")
|
||||
s.lastActive = time.Now()
|
||||
}
|
||||
}()
|
||||
|
|
|
@ -224,18 +224,16 @@ func (u *NodeCommand) ListActive(client *auth.TunClient) error {
|
|||
if len(nodes) == 0 {
|
||||
return t.String()
|
||||
}
|
||||
/*
|
||||
for _, n := range nodes {
|
||||
labels := make(configure.KeyVal, len(n.Labels)+len(n.CmdLabels))
|
||||
for key, val := range n.Labels {
|
||||
labels[key] = val
|
||||
}
|
||||
for key, val := range n.CmdLabels {
|
||||
labels[key] = val.Result
|
||||
}
|
||||
fmt.Fprintf(t, "%v\t%v\t%v\n", n.Hostname, n.Addr, labels.String())
|
||||
for _, n := range nodes {
|
||||
labels := []string{}
|
||||
for key, val := range n.Labels {
|
||||
labels = append(labels, fmt.Sprintf("%s:%s", key, val))
|
||||
}
|
||||
*/
|
||||
for key, val := range n.CmdLabels {
|
||||
labels = append(labels, fmt.Sprintf("%s:%s", key, val.Result))
|
||||
}
|
||||
fmt.Fprintf(t, "%v\t%v\t%v\n", n.Hostname, n.Addr, strings.Join(labels, ","))
|
||||
}
|
||||
return t.String()
|
||||
}
|
||||
fmt.Printf(nodesView(nodes))
|
||||
|
|
1
web/dist/app/app
vendored
Symbolic link
1
web/dist/app/app
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/ekontsevoy/go/src/github.com/gravitational/teleport/web/dist/app
|
Loading…
Reference in a new issue