From 4abffc8fbcc7fcccaa8696b3d560cbadac41acf9 Mon Sep 17 00:00:00 2001 From: Dan Luhring Date: Tue, 13 Apr 2021 09:22:13 -0400 Subject: [PATCH] Expose column index for UI handler consumers Signed-off-by: Dan Luhring --- ui/event_handlers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/event_handlers.go b/ui/event_handlers.go index 1b1e2c0fe..b7a6363e9 100644 --- a/ui/event_handlers.go +++ b/ui/event_handlers.go @@ -25,15 +25,18 @@ const maxBarWidth = 50 const statusSet = common.SpinnerDotSet // SpinnerCircleOutlineSet const completedStatus = "✔" // "●" const tileFormat = color.Bold -const statusTitleTemplate = " %s %-31s " const interval = 150 * time.Millisecond +// StatusTitleColumn is the column index in a given row where status text will be displayed. +const StatusTitleColumn = 31 + var ( auxInfoFormat = color.HEX("#777777") dockerPullCompletedColor = color.HEX("#fcba03") dockerPullDownloadColor = color.HEX("#777777") dockerPullExtractColor = color.White dockerPullStageChars = strings.Split("▁▃▄▅▆▇█", "") + statusTitleTemplate = fmt.Sprintf(" %%s %%-%ds ", StatusTitleColumn) ) // startProcess is a helper function for providing common elements for long-running UI elements (such as a