Commit Graph

13 Commits

Author SHA1 Message Date
John Knox
0479309dd1 Don't fail when dir doesn't exist
Summary:
Noticed a bunch of failures [here](https://our.intern.facebook.com/intern/scuba/query/?dataset=flipper_session_event_stats_scuba&drillstate=%7B%22sampleCols%22%3A[%22errors%22%2C%22event%22]%2C%22cols%22%3A[]%2C%22derivedCols%22%3A[%7B%22name%22%3A%22perfect_session%22%2C%22sql%22%3A%22CAST_AS_DOUBLE(no_failures)%22%2C%22type%22%3A%22Numeric%22%7D]%2C%22mappedCols%22%3A[]%2C%22enumCols%22%3A[]%2C%22return_remainder%22%3Afalse%2C%22should_pivot%22%3Afalse%2C%22is_timeseries%22%3Atrue%2C%22hideEmptyColumns%22%3Afalse%2C%22start%22%3A%22-90%20days%22%2C%22samplingRatio%22%3A1%2C%22compare%22%3A%22comparison%22%2C%22axes%22%3A%22linked%22%2C%22bucket%22%3A%221%22%2C%22overlay_types%22%3A[]%2C%22minBucketSamples%22%3A%22%22%2C%22dimensions%22%3A[%22time%22%2C%22event%22]%2C%22scale_type%22%3A%22absolute%22%2C%22num_samples%22%3A%22100%22%2C%22metric%22%3A%22avg%22%2C%22fill_missing_buckets%22%3A%22connect%22%2C%22smoothing_bucket%22%3A%221%22%2C%22top%22%3A20%2C%22markers%22%3A%22%22%2C%22timezone%22%3A%22America%2FLos_Angeles%22%2C%22end%22%3A%22now%22%2C%22time_bucket%22%3A%22604800%22%2C%22compare_mode%22%3A%22normal%22%2C%22aggregateList%22%3A[]%2C%22param_dimensions%22%3A[]%2C%22modifiers%22%3A[]%2C%22order%22%3A%22none%22%2C%22order_desc%22%3Atrue%2C%22filterMode%22%3A%22DEFAULT%22%2C%22constraints%22%3A[[%7B%22column%22%3A%22plugin%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A[%22[%5C%22null%5C%22]%22]%7D%2C%7B%22column%22%3A%22is_headless%22%2C%22op%22%3A%22!substr%22%2C%22value%22%3A[%22[%5C%22true%5C%22]%22]%7D%2C%7B%22column%22%3A%22event%22%2C%22op%22%3A%22substr%22%2C%22value%22%3A[%22[%5C%22getInstalledPlugins%5C%22]%22]%7D]]%2C%22c_constraints%22%3A[[]]%2C%22b_constraints%22%3A[[]]%2C%22metrik_view_params%22%3A%7B%22xaxis_type%22%3A%22auto%22%2C%22should_use_legacy_colors%22%3Afalse%2C%22view%22%3A%22Samples%22%2C%22width%22%3A%222126%22%2C%22height%22%3A%221132%22%2C%22y_max_hint%22%3A%221%22%2C%22yaxis_settings%22%3A[%7B%22yaxis_title%22%3A%22%22%2C%22yaxis_series_name%22%3A%22%22%2C%22yaxis_width%22%3A%220%22%2C%22yaxis_format%22%3A%22%25P%22%7D]%2C%22tooltip_outside%22%3Atrue%2C%22state%22%3A%22published%22%2C%22use_y_axis_hints_as_limits%22%3Atrue%2C%22legend_mode%22%3A%22nongrid%22%2C%22connect_nulls%22%3Atrue%2C%22yaxismin%22%3A0%2C%22title%22%3A%22Operation%20success%20rate%20over%20time%20(human)%22%2C%22tooltip_disabled%22%3Atrue%2C%22timezone_offset%22%3A420%2C%22y_min_hint%22%3A0%2C%22legend_position%22%3A%22none%22%2C%22title_use_v2%22%3Atrue%7D%7D&pool=uber&view=Samples&dashboard_id&tab_id&widget_id&widget_piece_id).

This fixes it.

Reviewed By: passy

Differential Revision: D17877108

fbshipit-source-id: 85586a1ce65033b98d793746c611b44f68e13eff
2019-10-11 06:21:47 -07:00
Pascal Hartig
208752b15e Fix glyph centering
Summary:
Before:

{F216059409}
(info circle!)

After:

{F216059417}

Reviewed By: jknoxville

Differential Revision: D17808879

fbshipit-source-id: 4408ba11919e70958f2d8123f913973d106996a7
2019-10-08 08:45:06 -07:00
Pascal Hartig
04e12a28a0 Refactor PluginInstaller component
Summary:
- Made side-effecting elements injectable via props.
- Added default props so usage doesn't change.
- Added testing-library/react snapshot test that waits for test data to appear in the list.

One slightly annoying part here is that this now that we have an `autoHeight` prop which is only useful for testing it as it prevents a problem with a height-detection in the test runner. We could even change the default as it doesn't affect the display in prod, but this still feels slightly cleaner.

Reviewed By: jknoxville

Differential Revision: D17808510

fbshipit-source-id: 2ae70886c58282d5bdc98ba4215e8248e4c7f159
2019-10-08 08:45:06 -07:00
Pascal Hartig
8f719b17e3 Add instrumentation, fix typo
Summary:
- plugns -> plugins
- Report platform failures from second invocation.

Reviewed By: jknoxville

Differential Revision: D17787179

fbshipit-source-id: 041325f572dd839bd268612269f3774518a409b2
2019-10-08 00:23:29 -07:00
Pascal Hartig
e074898d46 Basic error handling
Summary:
Adds some very basic error handling. It's not great
because once you hit an error, you're basically stuck
and there's no retry yet, but it's still strictly
an improvement over being stuck with the looping
spinner, so I think it's worth shipping it in this state.

Reviewed By: jknoxville

Differential Revision: D17763467

fbshipit-source-id: b5b7996554dd1dce682fba87f96e3806432a475a
2019-10-07 08:12:10 -07:00
Pascal Hartig
ff76b17a5b Add metrics
Summary:
Add some usage and failure rate stats to the PluginInstaller. Small
typo fix and added a helper to the metrics utils to make simple
usage tracking a little more intuitive.

Reviewed By: jknoxville

Differential Revision: D17760511

fbshipit-source-id: 957031d428f3124435925415619b1555a0c2dc2a
2019-10-04 08:26:26 -07:00
Daniel Büchele
2c66e3d4d0 install dependencies
Summary:
In the previous implementation plugins were downloaded from npm, but dependencies weren't. This diff uses the `live-plugin-manager` which does mostly what we want. It install a package from NPM with all its dependencies.
live-plugin-manager puts the plugin and its dependencies in the same folder. We expect the plugins to be in `node_modules`. For this reason, we are installing the plugin into `$pluginName/node_modules` and move the plugin after the installation out of the `node_modules` folder.

* Fixed plugin loading path for thirdparty plugins.
* Disabled hot reloading for plugins in the flipper folder to prevent reloads when moving around files and installing dependencies here.
* an empty `.watchmanconfig` is created, because metro requires it
* tsx files are added to the list of supported extensions for metro

Reviewed By: passy

Differential Revision: D17570413

fbshipit-source-id: ecbedc60841b36188fec9c83da41ef1f27e5e155
2019-09-26 07:57:54 -07:00
Daniel Büchele
8c623867bd PluginManager
Summary: Adding the plugin installer to the plugin sheet as a second tab

Reviewed By: passy

Differential Revision: D17450842

fbshipit-source-id: 211c9f15ed2614a1dd46d974b86f50c825f81fb0
2019-09-19 02:34:18 -07:00
Daniel Büchele
a72eac27a7 add flipper-plugin keyword to package.json
Summary: For plugins to be discoverable through NPM, they need to have `flipper-plugin` as a keyword. This adds this keyword to all existing plugins (although they are currently not distributed via NPM) and the webside/docs.

Reviewed By: passy

Differential Revision: D17395079

fbshipit-source-id: e42dd31ca39c3754cf729052ee783687748bafe8
2019-09-17 06:21:29 -07:00
Daniel Büchele
97b814d70e installed plugins
Summary: Checking `~/.flipper/thirdparty` for already installed plugins and displaying them on top of the table

Reviewed By: jknoxville

Differential Revision: D17394821

fbshipit-source-id: 65f392c8beaf72d9effcae9f47a60bcbb9194025
2019-09-17 06:21:29 -07:00
Daniel Büchele
f3326f8874 install/remove
Summary: Installing/removing plugins in/from `~/.flipper/thirdparty`.

Reviewed By: jknoxville

Differential Revision: D17394822

fbshipit-source-id: b62f62fa2415403e4377fba445e77534be87350d
2019-09-17 06:21:29 -07:00
Daniel Büchele
3b46eb82d8 NPM search
Summary: Using yarn's algolia index to search NPM packages with the tag `flipper-plugin`.

Reviewed By: jknoxville

Differential Revision: D17394823

fbshipit-source-id: d7c88ddf5d4ce017f2672755436ef3ae7ed4e7f0
2019-09-17 06:21:28 -07:00
Daniel Büchele
109e871a76 UI
Summary: Setting up a sheet to list plugins that can be installed from NPM

Reviewed By: jknoxville

Differential Revision: D17394824

fbshipit-source-id: 26c6ffea9de9cf3fe8488ea1a757eae7b7aaa7ef
2019-09-17 06:21:28 -07:00