mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 16:29:04 -04:00
# Backport This will backport the following commits from `main` to `8.8`: - [fix console errors in inspector (#156894)](https://github.com/elastic/kibana/pull/156894) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2023-05-15T15:02:27Z","message":"fix console errors in inspector (#156894)\n\nSteps to view problem\r\n* install sample data set\r\n* Open lens visualization\r\n* Open inspector. Notice console errors\r\n<img width=\"300\" alt=\"Screen Shot 2023-05-05 at 11 03 25 AM\"\r\nsrc=\"https://user-images.githubusercontent.com/373691/236521366-d8fb9302-e93b-4047-a0bf-d7c09dcc3ffb.png\">\r\n\r\nhttps://github.com/elastic/eui/pull/6566 removed `closeButtonAriaLabel`\r\nprop from [EuiFlyout](https://elastic.github.io/eui/#/layout/flyout) EUI\r\n75.0.0 (Effecting 8.8 and 8.9). FlyoutService spreads options into\r\n`EuiFlyout`, resulting in `closeButtonAriaLabel` getting added to dom\r\nand causing error.\r\n\r\n`OverlayFlyoutOpenOptions` type added by\r\nhttps://github.com/elastic/kibana/issues/37894. I replaced\r\n`OverlayFlyoutOpenOptions` with `EuiFlyoutProps` to make it more clear\r\nwhat props are accepted and provide stronger typing that stays in sync\r\nwith EUI typings\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b803ba9d7b69250d8bfb0567919128f954c1e935","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Inspector","Team:Presentation","release_note:skip","v8.8.0","v8.9.0"],"number":156894,"url":"https://github.com/elastic/kibana/pull/156894","mergeCommit":{"message":"fix console errors in inspector (#156894)\n\nSteps to view problem\r\n* install sample data set\r\n* Open lens visualization\r\n* Open inspector. Notice console errors\r\n<img width=\"300\" alt=\"Screen Shot 2023-05-05 at 11 03 25 AM\"\r\nsrc=\"https://user-images.githubusercontent.com/373691/236521366-d8fb9302-e93b-4047-a0bf-d7c09dcc3ffb.png\">\r\n\r\nhttps://github.com/elastic/eui/pull/6566 removed `closeButtonAriaLabel`\r\nprop from [EuiFlyout](https://elastic.github.io/eui/#/layout/flyout) EUI\r\n75.0.0 (Effecting 8.8 and 8.9). FlyoutService spreads options into\r\n`EuiFlyout`, resulting in `closeButtonAriaLabel` getting added to dom\r\nand causing error.\r\n\r\n`OverlayFlyoutOpenOptions` type added by\r\nhttps://github.com/elastic/kibana/issues/37894. I replaced\r\n`OverlayFlyoutOpenOptions` with `EuiFlyoutProps` to make it more clear\r\nwhat props are accepted and provide stronger typing that stays in sync\r\nwith EUI typings\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b803ba9d7b69250d8bfb0567919128f954c1e935"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156894","number":156894,"mergeCommit":{"message":"fix console errors in inspector (#156894)\n\nSteps to view problem\r\n* install sample data set\r\n* Open lens visualization\r\n* Open inspector. Notice console errors\r\n<img width=\"300\" alt=\"Screen Shot 2023-05-05 at 11 03 25 AM\"\r\nsrc=\"https://user-images.githubusercontent.com/373691/236521366-d8fb9302-e93b-4047-a0bf-d7c09dcc3ffb.png\">\r\n\r\nhttps://github.com/elastic/eui/pull/6566 removed `closeButtonAriaLabel`\r\nprop from [EuiFlyout](https://elastic.github.io/eui/#/layout/flyout) EUI\r\n75.0.0 (Effecting 8.8 and 8.9). FlyoutService spreads options into\r\n`EuiFlyout`, resulting in `closeButtonAriaLabel` getting added to dom\r\nand causing error.\r\n\r\n`OverlayFlyoutOpenOptions` type added by\r\nhttps://github.com/elastic/kibana/issues/37894. I replaced\r\n`OverlayFlyoutOpenOptions` with `EuiFlyoutProps` to make it more clear\r\nwhat props are accepted and provide stronger typing that stays in sync\r\nwith EUI typings\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b803ba9d7b69250d8bfb0567919128f954c1e935"}}]}] BACKPORT--> Co-authored-by: Nathan Reese <reese.nathan@elastic.co> |
||
---|---|---|
.. | ||
common | ||
public | ||
server | ||
config.ts | ||
jest.config.js | ||
kibana.jsonc | ||
README.md | ||
tsconfig.json |
Graph app
This is the main source folder of the Graph plugin. It contains all of the Kibana server and client source code. x-pack/test/functional/apps/graph
contains additional functional tests.
Graph shows only up in the side bar if your server is running on a platinum or trial license. You can activate a trial license in Management > License Management
.
Common commands
- Run tests
yarn test:jest x-pack/plugins/graph --watch
- Run type check
node scripts/type_check.js --project=x-pack/tsconfig.json
- Run linter
node scripts/eslint.js x-pack/plugins/graph
- Run functional tests (make sure to stop dev server)
- Server
node ./scripts/functional_tests_server.js --config x-pack/test/functional/apps/graph/config.ts
- Tests
node scripts/functional_test_runner.js --config x-pack/test/functional/apps/graph/config.ts
- Server
Folder structure
Client public/
Currently state handled by react/redux/saga and the core mutable GraphWorkspace
instance, which managing the nodes and edges state. It should be rewritten in typescript and integrated into redux store.
apps/
contains all graph app routescomponents/
contains react components for various parts of the interface. Components can hold local UI state (e.g. current form data), everything else should be passed in from the caller. Styles should reside in a component-specific stylesheetservices/
contains the core workspace logic and functions that encapsule other parts of Kibana. Stateful dependencies are passed in from the outside. Components should not rely on services directly but have callbacks passed in. Once the migration to redux/saga is complete, only sagas will use serviceshelpers/
contains side effect free helper functions that can be imported and used from components and servicesstate_management/
contains reducers, action creators, selectors and sagas. It also exports the central store creator- Each file covers one functional area (e.g. handling of fields, handling of url templates...)
- Generally there is no file separation between reducers, action creators, selectors and sagas of the same functional area
- Sagas may contain cross-references between multiple functional areas (e.g. the loading saga sets fields and meta data). Because of this it is possible that circular imports occur. In this case the sagas are moved to a separate file
<functional area>.sagas.ts
.
types/
contains type definitions for unmigratedGraphWorkspace
methodsrouter.tsx
is the central entrypoint of the app
Server server/
The Graph server is only forwarding requests to Elasticsearch API and contains very little logic. It will be rewritten soon.