Skip to content

Commit 0c04450

Browse files
committed
feat: show passed policies first then failed
Signed-off-by: Demolus13 <[email protected]>
1 parent 384303c commit 0c04450

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/macaron/console.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,25 +418,25 @@ def make_layout(self) -> Group:
418418
]
419419
elif self.command == "verify-policy":
420420
if self.policy_summary_table.row_count > 0:
421-
if self.components_violates_table.row_count > 0:
421+
if self.components_satisfy_table.row_count > 0:
422422
layout = layout + [
423-
"[bold red] Components Violate Policy[/]",
424-
self.components_violates_table,
423+
"[bold green] Components Satisfy Policy[/]",
424+
self.components_satisfy_table,
425425
]
426426
else:
427427
layout = layout + [
428-
"[bold red] Components Violate Policy[/] [white not italic]None[/]",
428+
"[bold green] Components Satisfy Policy[/] [white not italic]None[/]",
429429
]
430-
if self.components_satisfy_table.row_count > 0:
430+
if self.components_violates_table.row_count > 0:
431431
layout = layout + [
432432
"",
433-
"[bold green] Components Satisfy Policy[/]",
434-
self.components_satisfy_table,
433+
"[bold red] Components Violate Policy[/]",
434+
self.components_violates_table,
435435
]
436436
else:
437437
layout = layout + [
438438
"",
439-
"[bold green] Components Satisfy Policy[/] [white not italic]None[/]",
439+
"[bold red] Components Violate Policy[/] [white not italic]None[/]",
440440
]
441441
layout = layout + ["", self.policy_summary_table]
442442
if self.verification_summary_attestation:

0 commit comments

Comments
 (0)