Skip to content

Commit

Permalink
chore: show configuration in cluster header (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
keidarcy authored Oct 10, 2024
1 parent d456370 commit ea26516
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/view/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ func (v *clusterView) headerPagesParam(c types.Cluster) (items []headerItem) {
if c.ServiceConnectDefaults != nil {
scd = *c.ServiceConnectDefaults.Namespace
}

// executeCommandConfiguration
ecc := utils.EmptyText
if c.Configuration != nil && c.Configuration.ExecuteCommandConfiguration != nil {
ecc = "On"
}
// managedStorageConfiguration
msc := utils.EmptyText
if c.Configuration != nil && c.Configuration.ManagedStorageConfiguration != nil {
msc = "On"
}
active, draining, running, pending, activeEC2, activeFargate := 0, 0, 0, 0, 0, 0
for _, statistic := range c.Statistics {
v, err := strconv.Atoi(*statistic.Value)
Expand Down Expand Up @@ -145,6 +156,8 @@ func (v *clusterView) headerPagesParam(c types.Cluster) (items []headerItem) {
{name: "Service connect defaults", value: scd},
{name: "Attachments status", value: utils.ShowString(c.AttachmentsStatus)},
{name: "Registered container instances", value: utils.ShowInt(&c.RegisteredContainerInstancesCount)},
{name: "Execute command configuration", value: ecc},
{name: "Managed storage configuration", value: msc},
{name: "Tags count", value: strconv.Itoa(len(c.Tags))},
}
return
Expand Down

0 comments on commit ea26516

Please sign in to comment.