Commit Graph

5 Commits

Author SHA1 Message Date
Michel Weststrate
b7cfb509f1 Improve request formatting
Summary:
This diff adds several improvements to displaying requests / responses in the network plugin

1. If there is no formatter rendering the data, the data is rendered 'raw'
2. For binary data, `(binary data)` text is printed, rather than an empty box
3. For request that have an empty request / response, `(empty)` is printed, rather than an empty box
4. If a formatter is applied, we show which formatter was used, which makes it easier to debug / spot / report issues
5. If the graphql formatter can't parse the data because it is truncated, it won't return anything, so that it falls back to the next formatter (urlencoder) to take care of the presentation

Changelog: [Network plugin] Improved presentation of request / response bodies and fixed issues where they would sometimes not be displayed.

Reviewed By: jknoxville

Differential Revision: D22865373

fbshipit-source-id: 912d2f27269a4c9edbf62f2039d46ccf90a008af
2020-08-03 11:39:49 -07:00
John Knox
45d461a3b8 Don't escape and decode network response payloads
Summary:
This was originally done in https://github.com/facebook/flipper/pull/377 to support chinese characters, but it's not clear how it works, or what problem specifically it is trying to solve.

It's causing some problems where valid responses are failing to be "decoded", so I'm removing it.

Reviewed By: mweststrate

Differential Revision: D22866879

fbshipit-source-id: a19a57b0ddba2b9f434eb3c37e6b92da1dfbef01
2020-08-03 10:21:54 -07:00
Pascal Hartig
fc9ed65762 prettier 2
Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Michel Weststrate
ef653100ed Don't try to print large network bodies
Summary:
The network plugin warns about network requests that cannot be properly deflated if they are big and binary. Not sure yet why that is the case and if that is something that should be addressed (planned T63909985 for that), but if the body is big and binary it causes problems for our logging.

While testing I had some requests that where 45m large, and Electron literally hang for a few minutes before recovering. Failed to capture that, but the test plan shows smaller cases of the problem

Reviewed By: jknoxville

Differential Revision: D20560083

fbshipit-source-id: 324eb180b203dd585814dba5c94373d8daee5dde
2020-03-23 06:46:00 -07:00
Anton Nikolaev
10d990c32c Move plugins to "sonar/desktop/plugins"
Summary:
Plugins moved from "sonar/desktop/src/plugins" to "sonar/desktop/plugins".

Fixed all the paths after moving.

New "desktop" folder structure:
- `src` - Flipper desktop app JS code executing in Electron Renderer (Chrome) process.
- `static` - Flipper desktop app JS code executing in Electron Main (Node.js) process.
- `plugins` - Flipper desktop JS plugins.
- `pkg` - Flipper packaging lib and CLI tool.
- `doctor` - Flipper diagnostics lib and CLI tool.
- `scripts` - Build scripts for Flipper desktop app.
- `headless` - Headless version of Flipper desktop app.
- `headless-tests` - Integration tests running agains Flipper headless version.

Reviewed By: mweststrate

Differential Revision: D20344186

fbshipit-source-id: d020da970b2ea1e001f9061a8782bfeb54e31ba0
2020-03-14 14:35:18 -07:00