Skip to content

Commit

Permalink
cluster: add Cluster API objects to webview payload (#5630)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizzthabet committed Mar 28, 2022
1 parent d609f8f commit f4ae5b3
Show file tree
Hide file tree
Showing 5 changed files with 282 additions and 94 deletions.
11 changes: 11 additions & 0 deletions internal/hud/webview/convert.go
Expand Up @@ -66,6 +66,17 @@ func CompleteView(ctx context.Context, client ctrlclient.Client, st store.RStore
ret.UiButtons = append(ret.UiButtons, &item)
}

clusterList := &v1alpha1.ClusterList{}
err = client.List(ctx, clusterList)
if err != nil {
return nil, err
}

for _, item := range clusterList.Items {
item := item
ret.Clusters = append(ret.Clusters, &item)
}

s := st.RLockState()
defer st.RUnlockState()
logList, err := s.LogStore.ToLogList(0)
Expand Down

0 comments on commit f4ae5b3

Please sign in to comment.