Bug 1527599 - Always show the Events section in about:telemetry for main pings. r=janerik

It can be confusing to have the "Events" section here for some "main" and
"main"-like pings, but not there for others. Keep it around even if there's no
data there to show.

We have a lovely display for "No data here, boss" so we might as well use it.

Differential Revision: https://phabricator.services.mozilla.com/D20564

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris H-C 2019-02-21 11:43:54 +00:00
parent 0648e78f1c
commit fa1079ab70

View File

@ -1859,7 +1859,13 @@ var Events = {
let evts = aPayload.processes[value].events;
return evts && Object.keys(evts).length > 0;
});
setHasData("events-section", hasData);
// Don't specifically hide the events section if there's no data.
// It might be a "main" ping that needs to always show the section.
if (hasData) {
setHasData("events-section", true);
}
if (Object.keys(events).length > 0) {
const headings = [
"timestampHeader",