Skip to content

Commit

Permalink
fix panic on ecs-container screen
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanaReddy0M committed Nov 23, 2023
1 parent 41fe621 commit 598cd73
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions internal/render/ecs_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,37 @@ func (ecs EcsContainers) Render(o interface{}, ns string, row *Row) error {
return fmt.Errorf("expected EcsServiceResp, but got %T", o)
}
row.ID = ns
name, runtimeId, image, imageDigest, lastStatus, cpu, memory := "", "", "", "", "", "", ""
if container.Name != nil {
name = *container.Name
}
if container.RuntimeId != nil {
runtimeId = *container.RuntimeId
}
if container.Image != nil {
image = *container.Image
}
if container.ImageDigest != nil {
imageDigest = *container.ImageDigest
}
if container.LastStatus != nil {
lastStatus = *container.LastStatus
}
if container.Cpu != nil {
cpu = *container.Cpu
}
if container.Memory != nil {
memory = *container.Memory
}
row.Fields = Fields{
*container.Name,
*container.RuntimeId,
*container.Image,
*container.ImageDigest,
*container.LastStatus,
name,
runtimeId,
image,
imageDigest,
lastStatus,
fmt.Sprintf("%v", container.HealthStatus),
*container.Cpu,
*container.Memory,
cpu,
memory,
}
return nil
}

0 comments on commit 598cd73

Please sign in to comment.