Add tooltips and info for group exclusions

This commit is contained in:
Agoston Szepessy 2025-12-22 20:51:21 -08:00
parent 79ad4a6ae9
commit b1fa002bef
6 changed files with 23 additions and 6 deletions

View file

@ -76,6 +76,10 @@ void DatabaseStats::gatherStats(const QList<Group*>& groups)
++groupCount;
if (group->excludeFromReports()) {
++excludedGroups;
}
for (const auto* entry : group->entries()) {
// Don't count anything in the recycle bin
if (entry->isRecycled()) {
@ -107,7 +111,7 @@ void DatabaseStats::gatherStats(const QList<Group*>& groups)
++weakPasswords;
}
if (entry->excludeFromReports()) {
if (entry->excludeFromReports() || group->excludeFromReports()) {
++excludedEntries;
}

View file

@ -30,6 +30,7 @@ public:
int entryCount = 0; // Number of entries (across all groups)
int expiredEntries = 0; // Number of expired entries
int excludedEntries = 0; // Number of known bad entries
int excludedGroups = 0; // Number of excluded groups from reports
int weakPasswords = 0; // Number of weak or poor passwords
int shortPasswords = 0; // Number of passwords 8 characters or less in size
int uniquePasswords = 0; // Number of unique passwords

View file

@ -159,7 +159,11 @@ void ReportsWidgetBrowserStatistics::addStatisticsRow(bool hasUrls,
row[3]->setToolTip(allowedUrlsToolTip);
row[4]->setToolTip(deniedUrlsToolTip);
if (excluded) {
row[0]->setToolTip(tr("This entry is being excluded from reports"));
if (group->excludeFromReports()) {
row[0]->setToolTip(tr("The group for this entry is being excluded from reports"));
} else {
row[0]->setToolTip(tr("This entry is being excluded from reports"));
}
}
// Store entry pointer per table row (used in double click handler)

View file

@ -219,7 +219,12 @@ void ReportsWidgetHealthcheck::addHealthRow(QSharedPointer<PasswordHealth> healt
// Set tooltips
row[0]->setToolTip(tip);
if (excluded) {
row[1]->setToolTip(tr("This entry is being excluded from reports"));
if (group->excludeFromReports()) {
row[1]->setToolTip(tr("The group for this entry is being excluded from reports"));
}
else {
row[1]->setToolTip(tr("This entry is being excluded from reports"));
}
}
row[4]->setToolTip(health->scoreDetails());

View file

@ -169,9 +169,7 @@ void ReportsWidgetHibp::makeHibpTable()
if (entry->excludeFromReports()) {
row[1]->setToolTip(tr("This entry is being excluded from reports"));
}
if(entry->group()->excludeFromReports()) {
} else if(entry->group()->excludeFromReports()) {
row[1]->setToolTip(tr("The group for this entry is being excluded from reports"));
}

View file

@ -121,6 +121,11 @@ void ReportsWidgetStatistics::calculateStats()
stats->excludedEntries > 0,
tr("Excluding entries from reports, e. g. because they are known to have a poor password, isn't "
"necessarily a problem but you should keep an eye on them."));
addStatsRow(tr("Groups excluded from reports"),
QString::number(stats->excludedGroups),
stats->excludedGroups > 0,
tr("Excluding entire groups from reports isn't necessarily a problem but please exercise caution"
"when excluding entire groups."));
addStatsRow(tr("Average password length"),
tr("%1 character(s)", "", stats->averagePwdLength()).arg(stats->averagePwdLength()),
stats->isAvgPwdTooShort(),