From 815abcc766ce3e5f599fc429f96e58e66df941c2 Mon Sep 17 00:00:00 2001 From: crgisch Date: Wed, 22 Nov 2023 14:06:19 -0300 Subject: [PATCH] fix: autoscale cpu trigger info --- tsuru/client/apps.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tsuru/client/apps.go b/tsuru/client/apps.go index 3927deca..596c108d 100644 --- a/tsuru/client/apps.go +++ b/tsuru/client/apps.go @@ -762,10 +762,13 @@ func (a *app) String(simplified bool) string { "Trigger details", }) - autoScaleTable.AddRow(tablecli.Row([]string{ - "CPU", - "Target: 20%", - })) + if as.AverageCPU != "" { + cpu := cpuValue(as.AverageCPU) + autoScaleTable.AddRow(tablecli.Row([]string{ + "CPU", + fmt.Sprintf("Target: %s", cpu), + })) + } for _, schedule := range as.Schedules { scheduleInfo := buildScheduleInfo(schedule)