Add "blockedDetails" section to troubleshooting information

This will allow to find out what is specifically blocked on the
page reported as having issues, potentially saving time
when volunteers try to diagnose issues.
This commit is contained in:
Raymond Hill 2022-01-07 07:32:54 -05:00
parent e9058370b8
commit affdde02a9
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -856,6 +856,19 @@ const gotoReport = function() {
if ( popupData[prop] === expected ) { continue; }
popupPanel[name] = !expected;
}
if ( hostnameToSortableTokenMap.size !== 0 ) {
const blockedDetails = {};
const hostnames =
Array.from(hostnameToSortableTokenMap.keys()).sort(hostnameCompare);
for ( const hostname of hostnames ) {
const entry = popupData.hostnameDict[hostname];
if ( entry.counts.blocked.any === 0 ) { continue; }
blockedDetails[hostname] = entry.counts.blocked.any;
}
if ( Object.keys(blockedDetails).length !== 0 ) {
popupPanel.blockedDetails = blockedDetails;
}
}
messaging.send('popupPanel', {
what: 'launchReporter',
tabId: popupData.tabId,