|
14 | 14 | use crate::prelude::*; |
15 | 15 |
|
16 | 16 | use indenter::indented; |
| 17 | +use owo_colors::{AnsiColors, OwoColorize}; |
17 | 18 | use std::fmt::Debug; |
18 | 19 | use std::fmt::{Display, Write}; |
19 | 20 | use std::hash::Hash; |
@@ -274,14 +275,17 @@ impl<K, S, C: ResourceSetupStatusCheck> std::fmt::Display for ResourceSetupInfo< |
274 | 275 | Some(SetupChangeType::Invalid) => "INVALID", |
275 | 276 | None => "USER MANAGED", |
276 | 277 | }; |
277 | | - writeln!(f, "[ {:^9} ] {}", status_code, self.description)?; |
| 278 | + let status_str = format!("[ {:^9} ]", status_code); |
| 279 | + let status_full = status_str.color(AnsiColors::Cyan); |
| 280 | + let desc_colored = self.description.color(AnsiColors::BrightWhite); |
| 281 | + writeln!(f, "{} {}", status_full, desc_colored)?; |
278 | 282 | if let Some(status_check) = &self.status_check { |
279 | 283 | let changes = status_check.describe_changes(); |
280 | 284 | if !changes.is_empty() { |
281 | 285 | let mut f = indented(f).with_str(INDENT); |
282 | | - writeln!(f, "TODO:")?; |
| 286 | + writeln!(f, "{}", "TODO:".color(AnsiColors::BrightBlack))?; |
283 | 287 | for change in changes { |
284 | | - writeln!(f, " - {}", change)?; |
| 288 | + writeln!(f, " - {}", change.color(AnsiColors::BrightBlack))?; |
285 | 289 | } |
286 | 290 | writeln!(f)?; |
287 | 291 | } |
@@ -385,7 +389,12 @@ impl std::fmt::Display for FormattedFlowSetupStatusCheck<'_> { |
385 | 389 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
386 | 390 | let flow_ssc = self.1; |
387 | 391 |
|
388 | | - write!(f, "{} Flow: {}\n", ObjectSetupStatusCode(flow_ssc), self.0)?; |
| 392 | + write!( |
| 393 | + f, |
| 394 | + "{} {}\n", |
| 395 | + ObjectSetupStatusCode(flow_ssc).to_string().color(AnsiColors::Cyan), |
| 396 | + format!("Flow: {}", self.0).color(AnsiColors::White) |
| 397 | + )?; |
389 | 398 |
|
390 | 399 | let mut f = indented(f).with_str(INDENT); |
391 | 400 | write!(f, "{}", flow_ssc.tracking_table)?; |
|
0 commit comments