Commit Graph

37 Commits

Author SHA1 Message Date
Michel Weststrate
e7ac579d1c Fix exception initial databaseList request failed: T.sort is not a function
Summary: Exception showed up in our monitoring. The only `.sort` that happens in that request/response sequence is the one updated. Didn't get to the root of this, but likely the plugin returns nothing rather than an empty array when no databases present?

Reviewed By: LukeDefeo

Differential Revision: D47665268

fbshipit-source-id: 3f8dea591db3e6cb5d4e0d09f893a177ad4f642e
2023-07-24 07:46:34 -07:00
Carlos Moreno
b3850c75c7 Update setup.mdx (#4789)
Summary:
Adding missing semicolon.

Added a missing semicolon in java code.

## Changelog
Update documentation.

Pull Request resolved: https://github.com/facebook/flipper/pull/4789

Test Plan: Does not require a test plan.

Reviewed By: antonk52

Differential Revision: D46355062

Pulled By: passy

fbshipit-source-id: 20c398018b1d2deffb9b1a755d2c5a1543e48c21
2023-06-01 07:05:55 -07:00
Kevin Strider
21dfeca756 setup.mdx (setup - Databases)
Summary: Add reference to Features page

Reviewed By: passy

Differential Revision: D36344280

fbshipit-source-id: ef6df2fd647f30bddf53d3c00ea0fa09e54583d6
2022-05-13 02:48:47 -07:00
Kevin Strider
b38591a35c features docs
Summary:
Remove reference to limitation of an API to a particular platform or app.

We show in Flipper whether the plugin is compatible or not. For example, if an iOS device is connected, for plugins that don't support iOS, Flipper marks them as disabled and show a message.

Reviewed By: lblasa

Differential Revision: D36241811

fbshipit-source-id: 4f936279c8dd616fc95a4e6c3e149a0b74b98bd6
2022-05-09 05:46:04 -07:00
Lorenzo Blasa
0327282313 Fixes an issue with no database selected
Summary:
^

Not exactly sure how to reproduce the issue. Having said that:
- A database id is a non-zero number (1..n)
- If there's no selected database and/or there's no databases, then selectedDatabase is '0', which is an invalid database id.
- It is safer to check if the selected database id falls within bounds before attempting to obtain the tables from it.

From Logview, if the database id is '0', which is invalid, then we attempt to access a database at index -1 (database[selectedDatabase - 1]) which is definitely invalid. The returned object is undefined and hence the error.

Changelog: Fixes an issue on the databases plugin when there is no selected database.

Reviewed By: mweststrate

Differential Revision: D35810827

fbshipit-source-id: 4c9f112eebcd0aa3fcd5df316749f48f3922381c
2022-04-22 03:59:00 -07:00
Kevin Strider
82c59515b1 databases (Features)
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D35579752

fbshipit-source-id: c06ac9a812b244a9ace5c829df5c347d450f5e3b
2022-04-13 02:46:19 -07:00
Kevin Strider
567fb5d623 databases (setup)
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D35579365

fbshipit-source-id: cb04b5e839b3d4ae74c4a20dd4a2fadd853d4181
2022-04-13 02:44:11 -07:00
Michel Weststrate
d0d0b68e0b Fixes NPE in page.columns
Summary: From stack trace seems that we don't always get columns from the plugin, in which case we can't display anything

Reviewed By: lawrencelomax

Differential Revision: D33981285

fbshipit-source-id: 0d6bf2d9364f7dac93e2179e372308da51699bd3
2022-02-04 01:15:41 -08:00
Michel Weststrate
c0fac38282 Fix horizontal scroll in Databases plugin
Summary:
changelog: make sure database plugin is horizontally scrollable

fixes https://github.com/facebook/flipper/issues/2306

(assumed that'd be fixed by previous diff, but the plugin doesn't use the `DataTable` abstraction yet, athough it has a component with the same name :')

Reviewed By: cekkaewnumchai

Differential Revision: D33368215

fbshipit-source-id: f6a9b876ba3cd4aea7faa85b045a7614278e1c86
2022-01-04 09:06:15 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Michel Weststrate
7e50c0466a Move app/src (mostly) to flipper-ui-core/src
Summary:
This diff moves all UI code from app/src to app/flipper-ui-core. That is now slightly too much (e.g. node deps are not removed yet), but from here it should be easier to move things out again, as I don't want this diff to be open for too long to avoid too much merge conflicts.

* But at least flipper-ui-core is Electron free :)
* Killed all cross module imports as well, as they where now even more in the way
* Some unit test needed some changes, most not too big (but emotion hashes got renumbered in the snapshots, feel free to ignore that)
* Found some files that were actually meaningless (tsconfig in plugins, WatchTools files, that start generating compile errors, removed those

Follow up work:
* make flipper-ui-core configurable, and wire up flipper-server-core in Electron instead of here
* remove node deps (aigoncharov)
* figure out correct place to load GKs, plugins, make intern requests etc., and move to the correct module
* clean up deps

Reviewed By: aigoncharov

Differential Revision: D32427722

fbshipit-source-id: 14fe92e1ceb15b9dcf7bece367c8ab92df927a70
2021-11-16 05:29:21 -08:00
Pascal Hartig
47099cfd31 Fix Flipper lints #16
Summary: Larger list of fixes. Adding another package to the flipper export is a bit nasty but it unblocks us for now and centralises `remote` access which seems like a win for FAAS.

Reviewed By: mweststrate

Differential Revision: D30785421

fbshipit-source-id: 931297e8566b5d8a213b69ae87d0cda7648b3ed4
2021-09-08 08:44:19 -07:00
Anton Nikolaev
039d3a4a08 Move plugin docs to plugin folders
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website.

Reviewed By: passy

Differential Revision: D29465567

fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
2021-06-29 17:40:38 -07:00
Michel Weststrate
6fb28df855 Make Store initialization independent of module order
Summary: Changed some imports, and again the Flipper initialisation broke. Refactored the store initialization to create nowhere module local constants, which prevents generally against module loading issues, making it possible to load all code first, and then intialise things through the `init()` method, which should make Flipper initialisation a lot more robust to changes

Reviewed By: passy

Differential Revision: D29233603

fbshipit-source-id: 322cb87cba23228b1d7a88634b7b3995e27cc277
2021-06-21 08:37:20 -07:00
Anton Nikolaev
a87069fa4f Fix Edit button layout
Summary: Edit button was not visible which blocked editing of databases

Reviewed By: passy

Differential Revision: D29139000

fbshipit-source-id: d0e8d22ca1a1a39697ec70e94e3eb7422e32de48
2021-06-16 03:31:51 -07:00
Michel Weststrate
bc14b047cd Fix database names being truncated
Summary: Changelog: [Database] Fix database names not being readable in selection dropdowns

Reviewed By: jknoxville

Differential Revision: D29130379

fbshipit-source-id: 7212e6869efe5f501aa76e6836dad839319204fd
2021-06-15 06:28:48 -07:00
Pascal Hartig
33d5d0082c Move tests
Summary: We somehow had both `__test__` and `__tests__`. Moving over to the more common place.

Reviewed By: mweststrate

Differential Revision: D29062420

fbshipit-source-id: 1589fcda18609dcc61b1ca4ef80cbf48c9e8d170
2021-06-11 08:31:50 -07:00
Pascal Hartig
7ebdfa5822 Increase dropdown width
Summary: Changelog: Increase width of database name and table name dropdowns

Reviewed By: fabiomassimo

Differential Revision: D29062064

fbshipit-source-id: 46278ae6587d2feadea20fd1c5b4e04400034362
2021-06-11 06:34:02 -07:00
Anton Nikolaev
76701565ac Cleanup public plugins metadata
Summary: Now we support splitting metadata to public and fb-internal (see the previous diff in the stack), and this diff actually cleans up all public plugin metadata from fb-specific things.

Reviewed By: passy

Differential Revision: D28568413

fbshipit-source-id: eae699eabaae489c4bcfbfcc407c3bef42bfd338
2021-05-21 07:15:28 -07:00
Pascal Hartig
69c7876be9 Enforce react/jsx-boolean-value
Summary: yarn fix results.

Reviewed By: nikoant

Differential Revision: D28329714

fbshipit-source-id: 564aa24bcdb4bc6cdea67dfad10a077a9c817a2d
2021-05-11 10:14:05 -07:00
dependabot[bot]
674f71a426 Bump prettier from 2.2.1 to 2.3.0 in /desktop (#2300)
Summary:
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p>
<blockquote>
<h2>2.3.0</h2>
<p><a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">diff</a></p>
<p>{emoji:1f517} <a href="https://prettier.io/blog/2021/05/09/2.3.0.html">Release Notes</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's changelog</a>.</em></p>
<blockquote>
<h1>2.3.0</h1>
<p><a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">diff</a></p>
<p>{emoji:1f517} <a href="https://prettier.io/blog/2021/05/09/2.3.0.html">Release Notes</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2afc3b9ae6"><code>2afc3b9</code></a> Release 2.3.0</li>
<li><a href="7cfa9aa89b"><code>7cfa9aa</code></a> Fix pre-commit hook setup command (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10710">#10710</a>)</li>
<li><a href="c8c02b4753"><code>c8c02b4</code></a> Build(deps-dev): Bump concurrently from 6.0.2 to 6.1.0 in /website (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10834">#10834</a>)</li>
<li><a href="6506e0f50e"><code>6506e0f</code></a> Build(deps-dev): Bump webpack-cli from 4.6.0 to 4.7.0 in /website (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10836">#10836</a>)</li>
<li><a href="69fae9c291"><code>69fae9c</code></a> Build(deps): Bump flow-parser from 0.150.0 to 0.150.1 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10839">#10839</a>)</li>
<li><a href="164a6e2351"><code>164a6e2</code></a> Switch CLI to async (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10804">#10804</a>)</li>
<li><a href="d3e7e2f634"><code>d3e7e2f</code></a> Build(deps): Bump codecov/codecov-action from v1.4.1 to v1.5.0 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10833">#10833</a>)</li>
<li><a href="9e09845da0"><code>9e09845</code></a> Build(deps): Bump <code>@​angular/compiler</code> from 11.2.12 to 11.2.13 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10838">#10838</a>)</li>
<li><a href="1bfab3d045"><code>1bfab3d</code></a> Build(deps-dev): Bump eslint from 7.25.0 to 7.26.0 (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10840">#10840</a>)</li>
<li><a href="387fce4ed8"><code>387fce4</code></a> Minor formatting tweaks (<a href="https://github-redirect.dependabot.com/prettier/prettier/issues/10807">#10807</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/2.2.1...2.3.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Pull Request resolved: https://github.com/facebook/flipper/pull/2300

Reviewed By: passy

Differential Revision: D28323849

Pulled By: cekkaewnumchai

fbshipit-source-id: 1842877ccc9a9587af7f0d9ff9432c2075c8ee22
2021-05-11 05:51:56 -07:00
Anton Nikolaev
bef1885395 Fix broken layout on Databases plugin load
Summary: Somehow emotion styling of Typography.Text component from antd breaks the entire layout

Reviewed By: cekkaewnumchai

Differential Revision: D28226743

fbshipit-source-id: 7bdba33b7b02e4272cc9478c66fcc13ab74a0fc3
2021-05-05 11:00:16 -07:00
Michel Weststrate
d903a862d2 Use DataTable as list base
Summary:
Changelog: Standardized DataList component

This diff standardizes the DataList component, by reusing the DataList. This is done to be able to take full advantage of all its features like virtualisation, keyboard support, datasource support, etc.

Also cleaned up DataTable properties a bit, by prefixing all flags with `enableXXX` and setting clear defaults

Reviewed By: passy

Differential Revision: D28119721

fbshipit-source-id: b7b241ea18d788bfa035389cc8c6ae7ea95ecadb
2021-05-04 13:50:31 -07:00
Anton Nikolaev
3586f8ebbb UI Conversion: extracted plugin UI root component into a separate file
Summary: Extracted plugin UI root coomponent to a separate file to avoid falling back to full reloads even when "--fast-refresh" flag provided

Reviewed By: mweststrate

Differential Revision: D28119498

fbshipit-source-id: 18ef891512cbe5ddc34cacf7010dfd82f86c4fcc
2021-04-30 09:38:15 -07:00
Anton Nikolaev
45397fd2f4 UI Conversion: use DetailsSidebar from "flipper-plugin"
Summary: Use DetailsSidebar from "flipper-plugin"

Reviewed By: mweststrate

Differential Revision: D28110484

fbshipit-source-id: 0b9e3c07fc642242f2846f024895e740078779f7
2021-04-30 09:38:15 -07:00
Anton Nikolaev
368dd4a5ab Remove Value/renderValue public API from "flipper"
Summary:
Moving Value/renderValue API to "database" plugin as these APIs used exclusively by this plugin.

Alternative to that could be moving this API to "flipper-plugin" instead, but I think it doesn't make sense to expose public API which is only used in one plugin.

Reviewed By: mweststrate

Differential Revision: D28110483

fbshipit-source-id: 1576444681c1e0531fe45f0c15f442d65a28f803
2021-04-30 09:38:15 -07:00
Anton Nikolaev
23102b1997 UI Conversion: Use DataTable to show DB table structure
Summary: Use DataTable to show table structure

Reviewed By: mweststrate

Differential Revision: D28110485

fbshipit-source-id: 81f843a4763e1fbf5acf870621bc9049f719fd2c
2021-04-30 09:38:15 -07:00
Anton Nikolaev
84b48ff7e9 UI Conversion: Cleanup margins / paddings
Summary:
Cleaned up margins and paddings by removing hardcoded values and use constant sizes from "themes" instead.

Changelog: Database plugin UI aligned with the new Flipper UI

Reviewed By: mweststrate

Differential Revision: D28094217

fbshipit-source-id: 6514b2f1ea7073ca658a86e49c2be029f054ddf0
2021-04-29 12:04:04 -07:00
Anton Nikolaev
e1afe9d6b9 UI Conversion: Use TextArea from antd
Summary: Replaced Text and TextArea components by antd analogues

Reviewed By: mweststrate

Differential Revision: D28088959

fbshipit-source-id: 87f867f04f34a9b026045b34467a35437d132317
2021-04-29 12:04:04 -07:00
Anton Nikolaev
71d827288f UI Conversion: Replace buttons and dropdowns to antd analogues
Summary: Replaced favorite query dropdown to antd analogue

Reviewed By: mweststrate

Differential Revision: D28089366

fbshipit-source-id: 0d6e01bf6169f100ba7c9e612f0da8240ca3218d
2021-04-29 12:04:04 -07:00
Anton Nikolaev
1a315c510e UI Conversion: Switched ButtonGroup to Radio
Summary: Switched button group to Ant's radio buttons

Reviewed By: mweststrate

Differential Revision: D28068173

fbshipit-source-id: bcde8f32d76f76c18cf8bc8c8742bc3e01c54c7c
2021-04-29 12:04:04 -07:00
Anton Nikolaev
f743bd68a1 UI Conversion: Use Select from antd
Summary: Used Antd's Select component instead of the old one. In addition to that also enabled search in Select which can be quite handly as there might be many databases / tables.

Reviewed By: mweststrate

Differential Revision: D28068179

fbshipit-source-id: 4ff337a532e035c8b53a23858b5ba6d900e65ebd
2021-04-29 12:04:04 -07:00
Anton Nikolaev
24ac075d76 UI Conversion: Replaced all usages of FlexRow / FlexColumn to Layout
Summary: Replaced all usages of FlexRow / FlexColumn to new Layout component

Reviewed By: mweststrate

Differential Revision: D28055698

fbshipit-source-id: ad50762b068c897e5c4c182ac2d575d7e3a5f166
2021-04-29 12:04:04 -07:00
Anton Nikolaev
00fb573ba2 Extracted and memoized components
Summary: Just small refactoring to extract / memoize some of components

Reviewed By: mweststrate

Differential Revision: D28055699

fbshipit-source-id: 3d689a4e41e3f3c4c4e2e8cc2887cb255b4c4dc2
2021-04-29 12:04:04 -07:00
Anton Nikolaev
c4887e638b Fixed adding queries to favorites
Summary: I found a bug after migration to Sandy. It is now not possible to add queries to favorites. This diff fixes the issue.

Reviewed By: mweststrate

Differential Revision: D28066435

fbshipit-source-id: 129a62dab9521160f8957abba70e5c7a6e609839
2021-04-29 01:27:54 -07:00
Anton Nikolaev
c2a07e7638 Databases plugin migrated to Sandy functional API
Summary: Converted Databases plugin to Sandy functional API

Reviewed By: mweststrate

Differential Revision: D27999205

fbshipit-source-id: e9d2c7aa5858b9da3c1672efbb558fb6b1077b6b
2021-04-27 09:31:11 -07:00
Anton Nikolaev
b3274a8450 Plugin folders re-structuring
Summary:
Here I'm changing plugin repository structure to allow re-using of shared packages between both public and fb-internal plugins, and to ensure that public plugins has their own yarn.lock as this will be required to implement reproducible jobs checking plugin compatibility with released flipper versions.

Please note that there are a lot of moved files in this diff, make sure to click "Expand all" to see all that actually changed (there are not much of them actually).

New proposed structure for plugin packages:
```
- root
- node_modules - modules included into Flipper: flipper, flipper-plugin, react, antd, emotion
-- plugins
 --- node_modules - modules used by both public and fb-internal plugins (shared libs will be linked here, see D27034936)
 --- public
---- node_modules - modules used by public plugins
---- pluginA
----- node_modules - modules used by plugin A exclusively
---- pluginB
----- node_modules - modules used by plugin B exclusively
 --- fb
---- node_modules - modules used by fb-internal plugins
---- pluginC
----- node_modules - modules used by plugin C exclusively
---- pluginD
----- node_modules - modules used by plugin D exclusively
```
I've moved all public plugins under dir "plugins/public" and excluded them from root yarn workspaces. Instead, they will have their own yarn workspaces config and yarn.lock and they will use flipper modules as peer dependencies.

Reviewed By: mweststrate

Differential Revision: D27034108

fbshipit-source-id: c2310e3c5bfe7526033f51b46c0ae40199fd7586
2021-04-09 05:22:00 -07:00