0):
$snapshotDisplayTerm = $snapshotSummary['display_term'] ?? ($extension ?? 'Current search');
$strengthMeta = [
'strong' => ['label' => 'Strong', 'color' => '#00A86B'],
'medium' => ['label' => 'Medium', 'color' => '#FFEF34'],
'weak' => ['label' => 'Weak', 'color' => '#F66D44'],
'very_weak' => ['label' => 'Very weak', 'color' => '#5C1A8D'],
];
?>
Analytics dashboard snapshot for
Breakdown of compromised accounts discovered for this search.
Compromised Accounts
(int) ($b['summary_count'] ?? 0) > 0
);
$visibleCount = max(1, count($visibleBuckets));
$colXxl = match ($visibleCount) {
1 => 'col-xxl-12',
2 => 'col-xxl-6',
3 => 'col-xxl-4',
default => 'col-xxl-3',
};
?>
$bucketData):
$totalBucket = (int)($bucketData['summary_count'] ?? 0);
$rawStrengthCounts = $bucketData['strength_summary'] ?? [];
$strengthCounts = [
'strong' => (int)($rawStrengthCounts['strong'] ?? 0),
'medium' => (int)($rawStrengthCounts['medium'] ?? 0),
'weak' => (int)($rawStrengthCounts['weak'] ?? 0),
'very_weak' => (int)($rawStrengthCounts['very_weak'] ?? 0),
];
$totalStrength = array_sum($strengthCounts);
$hasStrengthData = $totalStrength > 0;
$safeTotalStrength = $hasStrengthData ? $totalStrength : 1;
$percent = function ($count) use ($safeTotalStrength) {
return round(($count / $safeTotalStrength) * 100, 1);
};
?>
Accounts
Password Strength Distribution
$metaInfo):
$countPerStrength = $strengthCounts[$strengthKey] ?? 0;
if ($countPerStrength <= 0) {
continue;
}
$classKey = str_replace('_', '-', $strengthKey);
$segmentStyle = 'flex: ' . max(1, $countPerStrength) . '; background-color: ' . $metaInfo['color'] . ';';
?>
$metaInfo):
$countPerStrength = $strengthCounts[$strengthKey] ?? 0;
if ($countPerStrength <= 0) {
continue;
}
$percentValue = $percent($countPerStrength);
$classKey = str_replace('_', '-', $strengthKey);
?>
-
-
No data
-
No data
Total records found: