Skip to content

Commit

Permalink
Remove retrieving nodes and proxies when getting details for each clu…
Browse files Browse the repository at this point in the history
…ster in list (#4326)
  • Loading branch information
Lisa Kim committed Sep 15, 2020
1 parent 908bf4a commit 6675152
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/web/ui/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ type Cluster struct {
func NewClusters(remoteClusters []reversetunnel.RemoteSite) ([]Cluster, error) {
clusters := []Cluster{}
for _, site := range remoteClusters {
cluster, err := GetClusterDetails(site)
if err != nil {
return nil, trace.Wrap(err)
// Other fields such as node count, url, and proxy/auth versions are not set
// because each cluster will need to make network calls to retrieve information
// which does not scale well (ie: 1k clusters, each request will take seconds).
cluster := &Cluster{
Name: site.GetName(),
LastConnected: site.GetLastConnected(),
Status: site.GetStatus(),
}

clusters = append(clusters, *cluster)
Expand Down

0 comments on commit 6675152

Please sign in to comment.