mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-19 11:07:24 +02:00
feat: center section divider to match table width (#2698)
The '========== Updated Releases ==========' header was a fixed 38 chars regardless of the table width below it. Now the divider line is extended to match the table's visual width, with the title text centered within the '=' borders. - Add TableVisualWidth() to measure table width via runewidth - Add HeaderDividerCentered() and HeaderDividerCenteredStyled() for centered dividers with optional bold+blue ANSI styling - Refactor DisplayAffectedReleases to build the table first, then compute its width before logging the header - Update all test snapshots and integration test output files Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -8,7 +8,7 @@ hook[preapply] logs |
|
||||
hook[presync] logs | foo
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 0s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
hook[presync] logs | foo
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 0s
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
hook[preapply] logs | foo
|
||||
hook[preapply] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 0s
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ hook[preapply] logs |
|
||||
hook[presync] logs | foo
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 3.1.0 0s
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ hook[preapply] logs |
|
||||
hook[presync] logs | foo
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 0s
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ hook[presync] logs |
|
||||
hook[presync] logs | bar
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 0s
|
||||
bar default incubator/raw 0s
|
||||
|
||||
+2
-2
@@ -14,12 +14,12 @@ hook[presync] logs |
|
||||
hook[presync] logs | foo
|
||||
hook[presync] logs |
|
||||
|
||||
[1m[34m========== Updated Releases ==========[0m
|
||||
[1m[34m================= Updated Releases ==================[0m
|
||||
NAME NAMESPACE CHART VERSION DURATION
|
||||
foo default incubator/raw 3.1.0 0s
|
||||
|
||||
|
||||
[1m[34m========== Deleted Releases ==========[0m
|
||||
[1m[34m==== Deleted Releases =====[0m
|
||||
NAME NAMESPACE DURATION
|
||||
bar default 0s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user