Skip to content

Commit

Permalink
Merge pull request #29 from jbovet/fix-warnings
Browse files Browse the repository at this point in the history
minor fix with thresholds
  • Loading branch information
jbovet authored Feb 5, 2024
2 parents 33d66f5 + affef15 commit 2f5f863
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ impl Formatter for SummaryFormat {

for rs in tls {
let custom_cell: Cell = match rs.certificate.validity_days {
days if days <= 0 => Cell::new("Error")
days if days <= 15 => Cell::new("Critical")
.add_attribute(Attribute::Bold)
.fg(Color::Red)
.set_alignment(CellAlignment::Center),
days if days <= 15 => Cell::new("Warning")
days if days <= 30 => Cell::new("Warning")
.add_attribute(Attribute::Bold)
.fg(Color::Yellow)
.set_alignment(CellAlignment::Center),
_ => Cell::new("Ok")
_ => Cell::new("Healthy")
.add_attribute(Attribute::Bold)
.fg(Color::Green)
.set_alignment(CellAlignment::Center),
Expand Down

0 comments on commit 2f5f863

Please sign in to comment.