In about:telemetry show the raw json ping in the firefox json viewer

RESOLVED FIXED in Firefox 57

Status

()

defect
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: flyingrub, Assigned: flyingrub)

Tracking

(Blocks 1 bug)

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
It could be usefull to display it in the firefox json viewer that is very convenient to deal with json.
Assignee

Updated

2 years ago
Assignee: nobody → flyinggrub
Status: NEW → ASSIGNED
Depends on: 1384534
Assignee

Updated

2 years ago
Blocks: 1384534
No longer depends on: 1384534
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Blocks: 1388695
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Priority: -- → P1

Comment 5

2 years ago
mozreview-review
Comment on attachment 8895322 [details]
Bug 1388691 - Use the firefox json viewer in about:telemetry

https://reviewboard.mozilla.org/r/166534/#review171804

Opening this in the Firefox JSON viewer is very convenient.
Some changes requested below though.

::: toolkit/content/aboutTelemetry.js:2042
(Diff revision 4)
> +  var data = new Blob([json], {type: "application/json"});
> +  var reader = new FileReader();
> +  reader.onloadend = (e) => window.open(reader.result)
> +  reader.readAsDataURL(data);

I think we don't need to use `Blob` or `FileReader` here, you can just do something like:
`window.open("data:application/json;base64," + btoa(json))`

::: toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd:23
(Diff revision 4)
> +<!ENTITY aboutTelemetry.showInFirefoxJsonViewer "
> +Open in the firefox JSON viewer
> +">

I don't see this being used anywhere?
Attachment #8895322 - Flags: review?(gfritzsche)
Comment hidden (mozreview-request)

Comment 7

2 years ago
mozreview-review
Comment on attachment 8895322 [details]
Bug 1388691 - Use the firefox json viewer in about:telemetry

https://reviewboard.mozilla.org/r/166534/#review172278

::: toolkit/content/aboutTelemetry.js:2042
(Diff revision 5)
>      }
>    }
>  }
>  
> +function openJsonInFirefoxJsonViewer(json) {
> +  window.open("data:application/json;base64," + btoa(json))

This line is missing a trailing ";".

::: toolkit/content/aboutTelemetry.xhtml:90
(Diff revision 5)
>          <span class="category-name">&aboutTelemetry.capturedStacksSection;</span>
>        </div>
>        <div class="category" value="late-writes-section">
>          <span class="category-name">&aboutTelemetry.lateWritesSection;</span>
>        </div>
> -      <div id="category-raw" class="category has-data" value="raw-ping-data-section">
> +      <div id="category-raw" class="category has-data" value="rawJSON">

Lets stay consistent with the existing naming styles, e.g. by using "open-raw-json" or similar.
Attachment #8895322 - Flags: review?(gfritzsche)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 11

2 years ago
mozreview-review
Comment on attachment 8895322 [details]
Bug 1388691 - Use the firefox json viewer in about:telemetry

https://reviewboard.mozilla.org/r/166534/#review172378

This looks good now.
Attachment #8895322 - Flags: review?(gfritzsche) → review+
Assignee

Updated

2 years ago
Keywords: checkin-needed
Autoland can't push this until all pending issues in MozReview are marked as resolved.
Keywords: checkin-needed
Assignee

Comment 13

2 years ago
fixed :)
Keywords: checkin-needed

Comment 14

2 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0d9cf59817bb
Use the firefox json viewer in about:telemetry r=gfritzsche
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/0d9cf59817bb
Status: ASSIGNED → RESOLVED
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.