Mark certificates that will expire in the next 7 days as "EXPIRING"

This commit is contained in:
2021-11-11 10:11:34 +01:00
parent 1f402a5055
commit c823778cee
3 changed files with 11 additions and 2 deletions

View File

@@ -273,7 +273,13 @@ sub add_list {
$column->set_cell_data_func ($renderer, sub {
my ($column, $cell, $model, $iter) = @_;
$text = $model->get($iter, 7);
$color = $text eq _("VALID")?'green':'red';
if ($text eq _("VALID")) {
$color = 'green';
} elsif ($text eq _("EXPIRING")) {
$color = 'orange';
} else {
$color = 'red';
}
$cell->set (text => $text, foreground => $color);
});
}