Closed Bug 1396836 Opened 2 years ago Closed 2 years ago

"no search results" shown for about:telemetry "raw payload" section


(Toolkit :: Telemetry, defect, P1)




Tracking Status
firefox57 --- fixed


(Reporter: gfritzsche, Assigned: chutten|PTO)




(2 files)

- select any custom ping ("bhr", "health", etc.)
- go to the "raw payload" section

Result: both the raw payload JSON as well as the "sorry, no search results" message are shown (see attached screenshot).

Expected: no "sorry, no search results message".
Assignee: nobody → chutten
Priority: P2 → P1
Comment on attachment 8906080 [details]
bug 1396836 - Tidy up about:telemetry search

::: toolkit/content/aboutTelemetry.js:1378
(Diff revision 1)
>      let section = sectionParam;
>      if (!section) {
>        let sectionId = document.querySelector(".category.selected").getAttribute("value");
>        section = document.getElementById(sectionId);
>      }
> +    if (Search.blacklist.includes( {

Not stricly related to this patch, but would you mind adding a comment where "blacklist" is defined to explain what it is for?
Attachment #8906080 - Flags: review?(alessio.placitelli) → review+
I'll do that the next time I'm in the file. FWIW, it's a list of ids for sections that don't support search.
Pushed by
Tidy up about:telemetry search r=Dexter
Backed out for eslint failures in aboutTelemetry.js:

Push with failures:
Failure log:

TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/toolkit/content/aboutTelemetry.js:1383:7 | Method 'search' expected no return value. (consistent-return)
TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/toolkit/content/aboutTelemetry.js:1424:5 | Method 'search' expected no return value. (consistent-return)
Flags: needinfo?(chutten)
Apparently I'll get to that comment in this revision after all...

The failure is that search() returns a value (mostly unused, but still) but I introduced an empty early return without specifically returning false (meaning that there isn't no search results (double negative sadly necessary)). I'll add the false and the comment and get this back in, likely tomorrow given my meeting load today.
Flags: needinfo?(chutten)
Pushed by
Tidy up about:telemetry search r=Dexter
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.