Commit Graph

17 Commits

Author SHA1 Message Date
Pascal Hartig
c588b650ae Prefer const wherever possible
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.

This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.

Used `eslint --fix` to change all existing cases.

Reviewed By: jknoxville

Differential Revision: D16131329

fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
2019-07-10 03:28:25 -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
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
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
8684812907 check for the empty string
Summary:
Bug:

{F157985015}

Reviewed By: danielbuechele

Differential Revision: D15260689

fbshipit-source-id: c43cdc0fc0d3e624ad930af60a9c95996579acb6
2019-05-09 07:21:45 -07:00
Pritesh Nandgaonkar
e19d6a723e Fix open log bug
Summary:
For the native crash, the crash log is logged as seperate messages. So crash reporter plugin merges them together and fires one notification. The merrging logic is timer based, so if multiple crash log message is posted in 50ms, it will be combined in one notification.

For the above case, the "Open in Logs" functionality was broken, as we used to compare the entire callstack in one entry rather than in the multiple rows. This diff fixes this issue.

Bug:

{F155167144}

Reviewed By: jknoxville

Differential Revision: D14748956

fbshipit-source-id: d24db6d47fa3cd633a9002ac77f37c267ca4924f
2019-04-04 04:39:48 -07:00
Daniel Büchele
79124891a9 url handler downloads
Summary:
Adding support for downloading archived Flipper data using a URL handler.
A URL looks like `flipper://import/?url=` and will download the file specified in the url param. While downloading the file, a spinner is shown in the app's titlebar.

Reviewed By: jknoxville

Differential Revision: D14262763

fbshipit-source-id: 6538fc78c07a48cef7b71b3f7bdbcb712d054593
2019-03-01 04:30:22 -08:00
Pascal Hartig
edbe2555fc Clear adb logcat when clearing Flipper logs
Summary: When using "Clear logs" in Flipper, also flush the native Android buffer.

Reviewed By: jknoxville

Differential Revision: D14225722

fbshipit-source-id: f41ff9013b95fc3271d3ae44910da18023708d2d
2019-02-26 16:33:19 -08:00
Daniel Büchele
88cc299811 don't trim messages
Summary: Don't trim messages to allow indentation using spaces. (e.g. for dispalying hierarchical data)

Reviewed By: jknoxville

Differential Revision: D13895630

fbshipit-source-id: 2c0e075bdecb6ab850a8ed7ed52c8423fa9343f2
2019-01-31 05:47:35 -08:00
Daniel Büchele
1fc73ad2fb update plugin's package.json
Summary:
For all plugins:
- move static fields `title`, `id` and `icon` to `package.json`
- adds "bugs" field for all plugins containing links to support groups/oncalls.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13417286

fbshipit-source-id: 7b341176915f3ed7b473b95c1d879f21d7d634ef
2018-12-18 10:36:35 -08:00
Pascal Hartig
c9131963d5 Remove debug log
Summary: Leftover from logs refactoring I suppose. Missed it in review too. :D

Reviewed By: danielbuechele

Differential Revision: D13465385

fbshipit-source-id: 42508e8981f12ca43f4b56a6ecc2e53078f49c1a
2018-12-14 07:22:23 -08:00
Daniel Büchele
cbfbd0dd98 add test coverage for log processing
Summary: as per title

Reviewed By: passy

Differential Revision: D13376522

fbshipit-source-id: 4746d3234a13abdf81a23387e57d877714c94b44
2018-12-11 07:57:58 -08:00
Daniel Büchele
4546e64509 refactor logs processing
Summary:
The log plugin subscribed to the device logs, when it was mounted. Then, the device replayed all log messages that happened in before the plugin became active. While this works, this was not the most performant way to handle this, because it caused multiple rerenders.

In this diff, a method is added to `BaseDevice` to get all buffered logs. This method is called once the logs plugin becomes active. The processing of the logs is split into a couple smaller functions.

Reviewed By: jknoxville

Differential Revision: D13376393

fbshipit-source-id: bb151659c3335e10f647ae2dbf66e93b32d22913
2018-12-11 07:57:58 -08:00
Pritesh Nandgaonkar
e84e859fc1 Limit the size of the containers and make it scrollable
Summary:
Improves the UI of crash reporter plugin

- Added max height on the value container with scrollable capabilities
- Fixed the bug in UI of the plugin where it showed the latest crash data even though one navigated to the plugin from old crash notification

Reviewed By: danielbuechele

Differential Revision: D13307302

fbshipit-source-id: 97eb96d3d9947a2835cd5572053256e0bdc01e27
2018-12-04 05:51:59 -08:00
Pritesh Nandgaonkar
06588b3d1f Adds crashreporter plugin to fb4a
Summary: Adds crashreporter plugin to fb4a

Reviewed By: jknoxville

Differential Revision: D13278471

fbshipit-source-id: 1baa7520b2806bebdc960077bfda0699b290109b
2018-12-03 05:27:28 -08:00
Pritesh Nandgaonkar
fd022e3c73 Improvise UI of crash reporter plugin
Summary:
- New improved UI
- Instead of sending the callstack as a string from android, now sending it as an array
- Deeplink to Logs support just for android. In iOS crash is not automatically logged in Logs plugin, atleast thats what happens in sample app

Reviewed By: jknoxville

Differential Revision: D13216477

fbshipit-source-id: d8b77549c83572d0442e431ce88a8f01f42c9565
2018-11-30 05:28:46 -08:00
Alex Langenfeld
f3d2e0983e support user defined device plugins
Summary:
* move CPU and Logs plugin to plugins directory, set up package.json for them
* adjust plugins/index.js to expose device and client plugins in the same place, adding two new exports

Reviewed By: danielbuechele

Differential Revision: D10247606

fbshipit-source-id: 347bf8b3f9629987ad29d1d2ed025e0c88b9c967
2018-10-10 18:43:21 -07:00