Skip to content

Commit

Permalink
refactor: Update teamUtilizationDataResolver.Team to include environm…
Browse files Browse the repository at this point in the history
…ent information
  • Loading branch information
rbjornstad committed Sep 3, 2024
1 parent 7484331 commit 6108202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/resourceusage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ func (c *Client) TeamUtilization(ctx context.Context, teamSlug slug.Slug, resour
return nil, err
}

for _, samples := range used {
for env, samples := range used {
for _, sample := range samples {
for _, data := range ret {
if data.AppName == string(sample.Metric["container"]) {
if data.AppName == string(sample.Metric["container"]) && data.Env == env {
data.Used = float64(sample.Value)
}
}
Expand Down

0 comments on commit 6108202

Please sign in to comment.