Show a finding by what identifies it, not by a key it may not have
This commit is contained in:
@@ -53,10 +53,17 @@ if ($status) {
|
|||||||
printf("autofix: %s\n", vv_ai_repair_autofix_enabled() ? 'enabled' : 'disabled (detect only)');
|
printf("autofix: %s\n", vv_ai_repair_autofix_enabled() ? 'enabled' : 'disabled (detect only)');
|
||||||
printf("last pass: %s\n", $last ? date('Y-m-d H:i:s', $last) : 'never');
|
printf("last pass: %s\n", $last ? date('Y-m-d H:i:s', $last) : 'never');
|
||||||
printf("open findings: %d\n", count($open));
|
printf("open findings: %d\n", count($open));
|
||||||
|
// 'ref' rather than 'conf_key' — it is the conf key for the kinds that have one, and the
|
||||||
|
// thing that identifies the finding for the kinds that do not. Printing the key left every
|
||||||
|
// arr health row with a blank column.
|
||||||
foreach ($open as $f) {
|
foreach ($open as $f) {
|
||||||
printf(" [%s] %-22s %-28s seen %d — %s\n",
|
printf(" %-7s %-9s %-28s seen %-4d %-14s %s\n",
|
||||||
$f['severity'] ?? '?', $f['subject'] ?? '?', $f['conf_key'] ?? '?',
|
'[' . ($f['severity'] ?? '?') . ']',
|
||||||
(int)($f['seen'] ?? 0), $f['state'] ?? '?');
|
$f['subject'] ?? '?',
|
||||||
|
$f['ref'] ?? ($f['conf_key'] ?? '?'),
|
||||||
|
(int)($f['seen'] ?? 0),
|
||||||
|
$f['state'] ?? '?',
|
||||||
|
mb_substr((string)($f['observed'] ?? ''), 0, 44));
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user