Commit Graph

328 Commits

Author SHA1 Message Date
Pascal Hartig
434913de40 Add yarn lock
Summary: Gets generated when running yarn, let's check it in.

Reviewed By: danielbuechele

Differential Revision: D16131278

fbshipit-source-id: d604a0af148826818d89c95f5ef07b595f60dca3
2019-07-08 04:56:01 -07:00
Benjamin Elo
4d774ba252 Added navigation plugin
Summary: Adding the auto-genrated scarf files from creating the Flipper navigation plugin. GK for this plugin is flipper-navigation.

Reviewed By: jknoxville, danielbuechele

Differential Revision: D16119841

fbshipit-source-id: 74e19c82dc95e73fe2ae06d1eb8cef2456b81931
2019-07-04 05:20:51 -07:00
henry_zheng
1b3ae77c40 fix network stackoverflow #215 (#474)
Summary:
fixed issue: https://github.com/facebook/flipper/issues/215

## Changelog

1. use pako to inflate direct to unicode string to avoid 'stack size limit exceed' problem
Pull Request resolved: https://github.com/facebook/flipper/pull/474

Test Plan:
Tested with Meetup trace that crashes reproducibly without this fix:
{F165395994}

Tested gzipped body with fb4a:

{F165396053}

Reviewed By: jknoxville

Differential Revision: D16090209

Pulled By: passy

fbshipit-source-id: 64b8a61fa9d80d9e8b62105b3f1dc3289a29cc07
2019-07-04 05:15:22 -07:00
Mihaela Ogrezeanu
353f65cd7f Move Sections Plugin to OS folder
Summary: as title; we'd like to reuse this for the Litho sections plugin but not having it in OS makes setting up deps more difficult than it should be.

Reviewed By: danielbuechele

Differential Revision: D16052298

fbshipit-source-id: cd965688eff4fedbe57264e6676b6ca09b9deb45
2019-07-01 07:06:39 -07:00
Pritesh Nandgaonkar
81b71352dd Fix the bug related to the crash selection
Summary:
Fixes the bug when the crash options had same title. Selection was broken in that case. Look at the video.

{F163450316}

Reviewed By: jknoxville

Differential Revision: D15985919

fbshipit-source-id: 7366c8f5f33bbddc15c058b7d20d78d295161404
2019-06-27 06:58:08 -07:00
Pascal Hartig
7d4bd4e1f3 Track usage of leak switch
Summary:
Logging to see how many people use this feature in addition to the notification logs
we keep.

Reviewed By: oprisnik

Differential Revision: D15983761

fbshipit-source-id: db64bf97d0643f2bfce25a539ee10147924ee3f8
2019-06-25 05:42:08 -07:00
Pritesh Nandgaonkar
c86a6809cb Stacktrace rows now wrap into other line as it made difficult to read it with scroll bars
Summary:
When the stack trace is too long its difficult to read the stack trace as the scroll bar shows up. This diff makes the stack trace text to wrap onto the next line, inorder to avoid scrolling. Look at the attached image, to understand the bug.

{F162756039}

Reviewed By: passy

Differential Revision: D15921226

fbshipit-source-id: f7320951ccdcf531f4276088e3f3ee0f552ab2fc
2019-06-21 03:45:58 -07:00
Pascal Hartig
375e313736 Consider callstack as nullable
Summary:
I received an error like this while rendering:

So we should type the callstack accordingly.

Reviewed By: priteshrnandgaonkar

Differential Revision: D15921517

fbshipit-source-id: 5863c75af142f1c22d5b520db8d7c0283f401e11
2019-06-20 10:29:04 -07:00
John Knox
9c99211221 Rename regexSupported to allowRegexSearch
Summary: This was annoying me so I thought I'd rename it before anyone else starts to use the prop.

Reviewed By: danielbuechele

Differential Revision: D15919159

fbshipit-source-id: c351503797cedc5c11a158cec62515b1eb791a70
2019-06-20 06:29:10 -07:00
Pritesh Nandgaonkar
b3979e7012 Fix the scroll of the crash headers in the plugin
Summary:
When the text is too long either for the crash name and the crash reason, user is not able to see scroll and see the text.

Bug:

{F162636692}

Reviewed By: danielbuechele

Differential Revision: D15907908

fbshipit-source-id: a9557074e310728d4cb4825ec18740ca0ea0c12f
2019-06-20 06:15:44 -07:00
Pritesh Nandgaonkar
0f9845a647 Fix the wrong notification filtering confition
Summary:
Fixes the bug which didn't fire the crash notification.

Bug:

{F162618487}

Reviewed By: passy

Differential Revision: D15905154

fbshipit-source-id: 8b34cc567789fbf7f255663a14017cbe300ac387
2019-06-20 06:15:44 -07:00
Pritesh Nandgaonkar
3307576cb7 Use Buffer.bytelenght for calculating the length
Summary:
This diff fixes the bug which showed the length of characters as the byte length when the response headers didn't have `content-length` in it.

This diff uses `Buffer.bytelength` api to calculate the same.

Reviewed By: danielbuechele

Differential Revision: D15899547

fbshipit-source-id: 29f4e8a741f4dd550b9191cc31bf6930065653b3
2019-06-20 04:08:30 -07:00
Pascal Hartig
e3f88e2a7b Move events processing to PSR
Summary: Means that attribution is now part of the export, too.

Reviewed By: oprisnik

Differential Revision: D15877937

fbshipit-source-id: e089597269b8977320d06284179f72d40d01ebf2
2019-06-20 03:51:17 -07:00
Pascal Hartig
5c497d3eea Make the sidebar pretty
Summary:
Now that the events tracking works again, make sure that the padding is not all over the place in the sidebar.

Before:

{F162525912}

Reviewed By: priteshrnandgaonkar

Differential Revision: D15875758

fbshipit-source-id: a30f057c8c0dc2dc77fc40f416ff565cc6621109
2019-06-20 03:51:17 -07:00
John Knox
0e7aaaacff Add regex search to network plugin
Reviewed By: danielbuechele

Differential Revision: D15899077

fbshipit-source-id: 92f2edf31925d73be252128afa851bb3fcb633a5
2019-06-20 02:50:20 -07:00
John Knox
b7229b40ac Add regex search to logs plugin
Summary:
Adds regex support to the logs plugin.

You can now do the same for any other SearchableTable, just by adding the prop `regexSupported={true}`

For other types of searchables, like maybe the layout hierarchy, we'll need to modify the class that does the filtering for that type.

I've done what I can with the UI to make it usable, though it would be awesome to have some proper regex syntax parsing and highlighting going on. It will go red if it's not valid at least.

Reviewed By: danielbuechele

Differential Revision: D15898806

fbshipit-source-id: 425edb1834dcc14ca741ac7fc8d566b4f2763c63
2019-06-20 02:50:20 -07:00
Sidharth Guglani
5a6d978536 Search with both name and id of the component in layout inspector and handle deeplinkpayload
Summary:
deepLinkPayload is passed as initialQuery to Search component and in componentDidMount we perform search if initially query is defined.

This does not handle the case if node is not present in the layout inspector tree.

Reviewed By: danielbuechele

Differential Revision: D15874343

fbshipit-source-id: c604baea16838f07e8f8bfc0f1e67c5e830dfe97
2019-06-19 09:08:10 -07:00
Daniel Büchele
48b690169e Copy request details
Summary: Copying/Creating a Paste from a network request only copied the domain. Now we are including all request/response data.

Reviewed By: jknoxville

Differential Revision: D15898038

fbshipit-source-id: 570ca5bb76e65b90b2b467856e6d3747682cc20d
2019-06-19 09:00:59 -07:00
Pascal Hartig
d6bb5e5d32 Allow both subscriptions and persistedStateReducer
Summary:
The previous setup would first check for the presence of a `persistedStateReducer` and then skip the standard subscriptions if this was found. This is a bit of a foot gun because simply by introducing a new function, you'd silently lose your existing subscriptions.

There are still some good reasons to support both as some subscriptions may not require persisting as they're directly tied to the state in the app at a given point.

Reviewed By: danielbuechele

Differential Revision: D15856372

fbshipit-source-id: a36bf40b1ceac431964610571eb70fff687b7607
2019-06-19 03:45:52 -07:00
Chenhao Xu
b41c4967a8 Flipper CPU Plugin: Thermal Information
Summary: display thermal information of connected device in the CPU plugin on a sidebar

Reviewed By: charles011

Differential Revision: D15715680

fbshipit-source-id: 1216da7bf8e0e6277d06aa02f40e6278f8e7fa07
2019-06-18 09:45:36 -07:00
Pascal Hartig
977a304672 Fix sidebar display
Summary:
Before:

{F162109040}

Reviewed By: danielbuechele

Differential Revision: D15855444

fbshipit-source-id: c95ab1b0aa577dec5d493a0f6d166cb3aeeb7419
2019-06-18 03:14:14 -07:00
John Knox
ee3473c42a Show timestamp in logs by default
Summary:
Makes the timestamp column visible by default in the logs plugin.
Can still be hidden by right clicking the column name.

Reviewed By: passy

Differential Revision: D15855890

fbshipit-source-id: 349a224c6a0ddfe607e7d92ce11df07c42b5db36
2019-06-17 09:58:05 -07:00
Pritesh Nandgaonkar
347487a328 Fix fresco tests
Summary:
The test used to exit before the promise was fulfilled, so essentially all tests passed. For more details, read [here](https://jestjs.io/docs/en/asynchronous.html)

> Be sure to return the assertion—if you omit this return statement, your test will complete before the promise returned from fetchData is resolved and then() has a chance to execute the callback.

Reviewed By: jknoxville

Differential Revision: D15804017

fbshipit-source-id: 769caa8957737b4864c5888d28854920e6a1447a
2019-06-17 06:18:45 -07:00
Arthur Kushka
1444946afa Added retries information to Insights tab of Networking plugin
Summary:
In React VR we doing automatic retries in cases when request takes too much time. It helps in cases when network quality is poor. As long as this implicit for developer, we would like to highlight this information in insights. It helps to explain why request were so long.

This diff adds one more field to insights which displays amount of time spent on retries, count and limit of them.

https://pxl.cl/CntV

Reviewed By: passy

Differential Revision: D15845598

fbshipit-source-id: 3e0d1baf93b6be5c4d1c6c1d2b64c05852b843b7
2019-06-17 03:05:40 -07:00
Pascal Hartig
f0d7667b3e Add missing snapshot test
Summary: Don't know how this landed without?

Reviewed By: jknoxville

Differential Revision: D15826033

fbshipit-source-id: 4895d26620b868b99429c7a6f290c05e1e805b8d
2019-06-14 10:28:12 -07:00
Arthur Kushka
1e700b944c Implemented insights tab in sidebar of networking plugin
Summary:
https://pxl.cl/Cd84

In React VR we got a case to explain developers why their requests took so long. To do this we export timings from Curl and send them in Flipper. This diff added visualization for this data. Any other platforms can use this feature by extending json which they send to Flipper.

Reviewed By: jknoxville

Differential Revision: D15804247

fbshipit-source-id: 9deea5c9f5f7c5416b42c476f7f0ed431c8dea04
2019-06-14 09:29:34 -07:00
John Knox
08454c056b Allow multi-highlight in db plugin
Summary: Enable highlight of multiple rows so they can be copied

Reviewed By: passy

Differential Revision: D15822749

fbshipit-source-id: 2302ddd27a57574c1eaf1f1395939c9f006ba301
2019-06-14 09:13:52 -07:00
Pascal Hartig
0eca3ac1e1 Fix getActiveNotifications crash
Reviewed By: danielbuechele

Differential Revision: D15822750

fbshipit-source-id: 1f8f41437db842197e6ab74e0559a710f80ff786
2019-06-14 09:02:22 -07:00
Pascal Hartig
61365662f6 Fix icons
Summary:
`cross-outline` doesn't seem to be a thing anymore.

https://external.xx.fbcdn.net/assets/?name=cross-outline&variant=filled&size=16&set=facebook_icons&density=1x

Reviewed By: danielbuechele

Differential Revision: D15822731

fbshipit-source-id: d0becbd9faa60393a4be1ef9f4d6bf8da7e9bc20
2019-06-14 06:56:56 -07:00
Pascal Hartig
71575ce7cf Hook up stacktraces to leak notification
Summary: Transfer it from the device, reformat the notification to make use of it.

Reviewed By: danielbuechele

Differential Revision: D15779267

fbshipit-source-id: 747dc7f895528618ff6a07c15b7f72bf6a1adde9
2019-06-13 11:18:03 -07:00
Chenhao Xu
c225795b73 flipper CPU plugin sidebar
Summary: Add sidebar to the flipper CPU plugin. Sidebar displays detailed information about the selected CPU core

Differential Revision: D15696198

fbshipit-source-id: 47e687b4354653e6bef626cd3f27adcb219dbd28
2019-06-07 10:09:15 -07:00
Pascal Hartig
1973432f78 Add active leak tracking in Fresco
Summary:
Adds a "Track Leaks" option that will show notifications (even retroactively)
for `CloseableReferences` that were tracked.

Reviewed By: danielbuechele

Differential Revision: D15622596

fbshipit-source-id: ef610379aa96f9a5e541f741af608db30bee74e1
2019-06-05 11:34:55 -07:00
Pascal Hartig
bef1ff26bc Add test for closeable reference metrics reducer
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D15621850

fbshipit-source-id: 3b7ab83b7ed8dbfd75990194e909f78bd22ec45b
2019-06-05 11:34:55 -07:00
Pritesh Nandgaonkar
ace19e5d36 Unit tests for the metrics
Summary: Added unit tests for the "WASTED_BYTES" for the fresco plugin

Reviewed By: passy

Differential Revision: D15610871

fbshipit-source-id: dc9bd84363e1ba22fc96890b74e217372188a9d0
2019-06-04 14:15:46 -07:00
Pascal Hartig
b55ad41d97 let to const
Summary: Unrelated to what I was going to work on, so separate diff.

Reviewed By: jknoxville

Differential Revision: D15620643

fbshipit-source-id: a555bbd54adfe44fa7d566cb9cb6d31bd75be28e
2019-06-04 07:42:05 -07:00
Pascal Hartig
6e0121686c Add metrics for closeable reference leaks
Summary: Add a metric for the raw number of leaked closeable references.

Reviewed By: priteshrnandgaonkar

Differential Revision: D15603348

fbshipit-source-id: 03379e180b5822620e8e8347bef354edb3527d19
2019-06-04 06:02:23 -07:00
Pritesh Nandgaonkar
62c112c713 Fix the FlipperArray creation of events
Summary:
The FlipperArray creation from JSONArray used to create an array of `null`'s instead of the FlipperObject, which used to crash the Flipper. Thus added a check in the flipper to not crash in the case when it receives array of nulls. Also fixed the Fresco plugin in mobile to send the proper FlipperArray.

Bug:

{F160049909}

Reviewed By: passy

Differential Revision: D15608297

fbshipit-source-id: 625e017d3bce4135ac699ee5aee8d871db378749
2019-06-04 03:39:28 -07:00
Pascal Hartig
023135ad74 Reduce in metrics reducer
Summary: Actually reduce in the reducer step instead of using mutable state.

Reviewed By: jknoxville

Differential Revision: D15603095

fbshipit-source-id: f603ca548bb760db5423a4c1871d94284ece9521
2019-06-03 14:41:43 -07:00
Pascal Hartig
faf19452eb Send CloseableRef leaks to Flipper plugin (#455)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/455

Only logging to the console for now, but it's a good start.

Reviewed By: oprisnik

Differential Revision: D15535820

fbshipit-source-id: 8531ec5ef681d01b2428a1f016b2a1d9f1589a34
2019-05-31 16:58:16 -07:00
John Knox
bec5c2b20c Remove unused lodash dependency
Summary: This is a big dep, and wasn't even used. Removing.

Reviewed By: danielbuechele

Differential Revision: D15555949

fbshipit-source-id: 31a5430819592478b01548469fdbf58637c4de22
2019-05-30 08:19:19 -07:00
John Knox
cfbc84e5bc Add error bar
Summary: Red error bar at bottom when something goes wrong.

Reviewed By: danielbuechele

Differential Revision: D15536042

fbshipit-source-id: 6a20e22489f9346864b78f9102a0917f94c1c74f
2019-05-30 06:52:06 -07:00
John Knox
13e942f59a Add getStringFromErrorLike utility
Summary: I've found myself having to extract strings from things that *might* be Errors more than once. Centralising this so it's consistent and correct everywhere.

Reviewed By: danielbuechele

Differential Revision: D15536034

fbshipit-source-id: 8e054dd6122aff10f0aacdfaed65125df0aea99f
2019-05-30 04:02:39 -07:00
John Knox
076b52059e Fix index rendering
Summary: This hadn't been tested on any tables with indexes. It was using the wrong set of columns to index the rows. Fixed by using the right list.

Reviewed By: danielbuechele

Differential Revision: D15535864

fbshipit-source-id: 1842a0695715e947b7e28b59e65dcc1eb5b32695
2019-05-30 03:15:29 -07:00
John Knox
2221090037 Fix Select value/selected React warning
Summary:
React outputs the following error:
  Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.

This fixes it by using value instead of selected.

Reviewed By: danielbuechele

Differential Revision: D15535717

fbshipit-source-id: eb784ba2cdefe1c6744cc15592cd3e0191d237d0
2019-05-30 03:15:29 -07:00
John Knox
79902cd7cb Fix some react warnings
Summary: React is printing errors saying not to use "Span", and booleans in html properties

Reviewed By: danielbuechele

Differential Revision: D15535593

fbshipit-source-id: e074137c89abfa69625b370087c9c18b579ff279
2019-05-30 03:15:28 -07:00
John Knox
b78fb88dd7 Make 'Refresh' update database list
Summary: Previously it only reloaded the current page.

Reviewed By: danielbuechele

Differential Revision: D15535168

fbshipit-source-id: b8252c24ffa74fdf22b2d4b6d5b7f99b40db8e47
2019-05-29 08:49:22 -07:00
John Knox
a630b50a8f Add databases plugin v0 (android) (#441)
Summary:
Adds a plugin for listing the databases, tables and contents of those tables in an android app.
Right now, works with sqlite, but it should be generic enough to work with other db types.

## Changelog

Add initial version of android databases plugin

Creating a PR, I may need to do some cleaning up, but this is to kick off that process.
Pull Request resolved: https://github.com/facebook/flipper/pull/441

Reviewed By: danielbuechele

Differential Revision: D15288831

Pulled By: jknoxville

fbshipit-source-id: 6379ad60d640ea6b0a9473acc03dd6ea81a3a8d4
2019-05-28 10:17:56 -07:00
Daniel Büchele
1d6399c1b5 remove console from layout inspector
Summary: We removed the console already from the client side. So this causes all calls to isConsoleEnabled to fail. This diffs removes these calls.

Reviewed By: passy

Differential Revision: D15449571

fbshipit-source-id: b702a8fbc80af002e1d8b7d37d5acc664ea5be99
2019-05-24 03:29:41 -07:00
Daniel Büchele
c1bff77f50 recursively invalidate nodes
Summary: When a node invalidates, all its children need to be updated. This was the case in v1 of Layout Inspector (3141b954bf/src/plugins/layout/index.js (L684-L692)) but got lost when writing v2.

Reviewed By: passy

Differential Revision: D15469096

fbshipit-source-id: 9ef5368387ccbce6e5c71de28c24f5790906cee9
2019-05-24 03:09:53 -07:00
Pritesh Nandgaonkar
914cbf6ccd Request all metadata for Images plugin before export
Summary:
Fresco plugin on the desktop side used to ask for all the image list along with the metadata when it was mounted. The mobile side never sent the image list and other information if not requested from it. That means, although Fresco plugin is a background plugin, there weren't any messages sent from the mobile side. Thus there was no trace available for Images plugin when the trace was exported. This diff, adds a hook which gets called before the export, where we request all the metadata from the mobile SDK.

BUG:

{F159305887}

Reviewed By: passy

Differential Revision: D15407962

fbshipit-source-id: 0012de2ab29d0f62e92d00f4926b04b1e394b62a
2019-05-23 05:48:04 -07:00