Commit graph

82 commits

Author SHA1 Message Date
Tyler Smalley b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Tyler Smalley aba2068291
Consolidates Jest configuration files and scripts (#82671)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-12 16:19:56 -08:00
Yulia Čech 1de3a02a46
Fix ilm navigation (#81664)
* Fix edit policy page navigation

* Fix edit policy page navigation

* Add links to PR for explanation

* Added more tests and linked to a github issue about navigation issues

* Fix decoding function for undefined values

* Fix type check issues

* Renamed dollar sign to percent sign, added a method for (double) encoded paths and better description in test names

* Deleted Index Management from required bundles in ILM

* Fixed merge conflicts

* Revert "Deleted Index Management from required bundles in ILM"

This reverts commit 5a735dfe

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-10 11:09:37 +01:00
Greg Thompson 6fdc7eb1fa
Upgrade EUI to v30.1.1 (#81499)
* eui to v30.0.0

* removed unused RecentLinks component

* update compressed -> display prop

* euiformrow compressed -> display

* euipopover remove withtitle

* euibuttongroup prop updates

* remove euibuttontoggle

* src snapshot updates

* tutorial euibuttongroup update

* x-pack snapshot updates

* euibuttongroup test updates

* TODO

* misc. js file updates

* remove euinavdrawer scss references

* translation removals

* more x-pack snapshot updates

* update data-test-subj lookup

* icons logoAMP -> logoObservability

* cypress selector updates

* update euibuttontoggle onchange, test interaction

* Fix auto-update toggle in Visualize

* some more change -> click test updates

* idtoselectedmap change

* Fix feature table button group

* Remove empty SASS file

* Fix feature table button group II

* Using `compressed` to also dictate dual range row

* Fix a few security labels

* An ML fix

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* remove unused translation

* update view_type_toggle snapshot

* more snapshot updates

* eui to 30.1.0

* undo temp ts-ignore

* more x-pack snapshot updates

* eui to 30.1.1

* update feature privilege text

* Update x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* reuse i18n token

* Adapt log entry action button to new `minWidth` prop

* clean up label

* Combine auto apply strings into one

* ternary fix

* cases status useCallback

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2020-10-30 16:18:27 -06:00
Yulia Čech 2a94139d30
Add uri decode to es_ui_shared and fix navigation issues with special characters (#80835)
* Add uri decode to es_ui_shared and fix data stream issue with % name

* Add a test for data streams tab opened for name with a dollar sign

* Import uri decode function from es_ui_shared and fix navigation issues for filters

* Add tests for data streams with special characters in name

* Revert react router navigate changes (is done in a separate PR)

* Reverting changes to dataManagement es client and get data stream api route

* Fix data stream name filter when activated from a url parameter

* Clean up for better consistency and fixes after
https://github.com/elastic/kibana/pull/81664

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 14:04:32 +01:00
Sébastien Loix 702e0c7d73
[Form lib] Export internal state instead of raw state (#80842) 2020-10-20 13:51:11 +02:00
Alison Goryachev e7ed40b0a2
remove duplicate tab states (#79501)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 09:24:29 -04:00
Jean-Louis Leysens e98e2796d5
[Ingest Pipelines] Fix description field bug (#79445)
* rendering optimisation of text fields

* fix description disappearing bug

* refactor fix to get value from form serializer
2020-10-05 19:40:19 +02:00
Sébastien Loix 0d378e488c
Form lib enhancements (#78588)
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 18:09:50 +02:00
Jean-Louis Leysens f6729dc3f4
[Ingest Pipelines] Processors editor a11y focus states (#79122)
* Fix showing of accessibility border

- fix use of flex items (removed unnecessary use thereof)
- also fixed overflow when tabbing through drop zones (compressed)

* refactor isLast to compressed

* optimize keyboard focus states in move mode

* fix jest test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 17:05:10 +02:00
Alison Goryachev 18a67b68b1
[Ingest pipelines] Clean up component integration tests (#78838) 2020-10-05 10:52:08 -04:00
Alison Goryachev 272e850483
[Ingest pipelines] Update readmes (#78350) 2020-09-30 08:42:29 -04:00
Alison Goryachev caa260527b
[Ingest pipelines] Address copy review feedback (#78796) 2020-09-30 08:38:02 -04:00
Alison Goryachev 6f3301232c
[Ingest pipelines] Add ability to stop pipeline simulation (#78183) 2020-09-29 09:29:07 -04:00
Alison Goryachev 88df93bed5
[Ingest pipelines] Upload indexed document to test a pipeline (#77939) 2020-09-28 08:47:05 -04:00
Jean-Louis Leysens 6345acaf35
[Ingest Node Pipelines] New patterns component for Grok processor (#76533)
* wip, issues with use fields getting cleared somehow

* New drag and drop text list component

- updated use array to add its own field so that we hook into form
- added new drag and drop list component
- wip on validation (empty lists validate immediately, which it should not)

* remove box shadow from editor fields

* Style grok patterns based on drag and drop in component templates

- still have the issue with validation
- need to get some design review at this point

* fix i18n

* update use_array - maintain the same API though

* Grok processor should use the new use array interface

- also fix the documentation using links in the processor type
  description. react was unhappy about hook order changing

* fix patterns field validation to check validity of pattern entires

* fix drag item styling

* fix use of form in use effect and update behaviour of submit button

* added smoke test for grok component

* fix i18n

* Implement PR feedback

* Implemented design feedback

- decreased spacing between list items and button
- fixed a11y issue between label and first text field
- moved help text to under label
- refactored all of the field layout logic into drag and drop
  text list component.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 16:51:26 +02:00
Jean-Louis Leysens 38e63d1029
[ES UI Shared] Remove 'brace' from es_ui_shared public (#78033)
* major wip

* major wip

* fix worker creation leak

* just copy the file over for now

* Remove xjson from static and from es_ui_shared entirely

- moved expand and collapse logic back to es_ui_shared. It has
  nothing to do with ace
- refactor the useXJson hook which bundled XJsonMode with it.
  This was convenient but ultimately inflates the amount of code
  Kibana needs to first load up in the client. Users will need to
  import XJsonMode and instantiate it when they want to use it.
  Updated existing usage.
- Cleaned up Monaco namespace from es_ui_shared because of how
  useXJsonMode was refactored -- no longer exporting an editor
  specific instance means this code does not know about anything
  to do with code editors so it is decoupled from ace and monaco.

* fix export of collapse and expand string literals

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 16:02:14 +02:00
Alison Goryachev 8c9c4c442c
[Ingest pipelines] Implement empty prompt for processors editor (#77655) 2020-09-23 08:48:38 -04:00
Yulia Čech 2c6cae7b9a
[Ingest Pipelines] Add url generator for ingest pipelines app (#77872)
* [Ingest Pipelines] Add url generator for ingest pipelines app

* [Ingest Pipelines] Fix type check error

* [Ingest Pipelines] Fix import errors

* [Ingest Pipelines] Fix type check errors

* [Ingest Pipelines] Fix type check errors

* [ILM] Update UrlGenerator interface, clean up internal navigation service

* [ILM] Fix function export

* [ILM] Update functions signatures

* [ILM] Fix errors

* [ILM] Fix errors

* [ILM] Rename ROUTES_CONFIG and export MANAGEMENT_APP_ID

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-23 14:12:49 +02:00
James Rodewig 37465f5c8c
[Ingest Pipelines] Add descriptions for ingest processors T-U (#77497) 2020-09-16 13:36:56 -04:00
Alison Goryachev 309fe76742
[Ingest pipelines] Polish pipeline debugging workflow (#76058) 2020-09-15 16:24:04 -04:00
Alison Goryachev 7dca537382
[Ingest pipelines] Forms for processors T-U (#76710) 2020-09-14 11:25:18 -04:00
Larry Gregory 2e34eb239f
Hide management sections based on cluster/index privileges (#67791)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 09:30:47 -04:00
Jean-Louis Leysens 97813b29dd
[Ingest Pipelines] Drop into an empty tree (#76885)
* add ability to drop processor into empty tree

* added a test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 12:46:12 +02:00
Jean-Louis Leysens 1ea61ec478
fix double hline under drop processor (#76929)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 12:45:08 +02:00
CJ Cenizal e2cbd89e66
Rename useRequest's sendRequest return function to resendRequest and remove return value (#76795) 2020-09-10 08:23:13 -07:00
James Rodewig 86582a5501
[Ingest Pipelines] Add descriptions for ingest processors K-S (#76981) 2020-09-09 12:01:28 -04:00
James Rodewig e8803d86f4
[Ingest Pipelines] Add descriptions for ingest processors E-J (#76113)
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2020-09-08 10:01:47 -04:00
Adam Locke 6d4e772cec
[Ingest Pipelines] Add descriptions for ingest processors A-D (#75975)
* Fixing formatting issues identified by Prettier, part 2.

* Fixing helpText labels.

* Adding {value} object for dissect processor.

* Incorporating reviewer feedback.

* fix dropdown not rendering

* Fixing typo.

* add support for FormattedMessage in help text

* fix TS

* Updating some strings and trying to add code formatting.

* fix formatted message

* Editing some field descriptions.

* Apply suggestions from code review

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Trying to add EuiLink, plus edits.

* fix help text for dissect processor

* Incorporating reviewer feedback.

* Trying to add another EUI element, plus edits.

* fix date_index_name description text

* Minor edit.

* Fixing linter error.

* Removing FunctionComponent, which was not read and caused build errors.

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-09-04 15:26:05 -04:00
Jean-Louis Leysens 2326f3ffad
[Ingest Pipelines] Processor forms for processors K-S (#75638)
* added kv processor form

* added lowercase processor form

* Added pipeline processor form

* added remove processor form

* added rename processor form

* Add script processor form

Also:

- Also refactored name of defaultBoolToUndef to undefinedIfValue
  to make it more broadly applicable for deserializing when
  default values have been provided
- Refactor to pass in original processor options value so that
  a form can initialize based on those values

* Updated the existing set processor form

- also fixed a bug that would render a horizontal line even if
  the form has no fields of its own (like the drop processor form)

* Added set_security_user form

* Added split processor form

- also added comments to set_security_user processor

* added sort processor form

* fix: duplicate i18n identifier

* added field to kv processor form for trim value

* replaced all editor heights with a clearer indication of the source of common heights

* remove unused translations

* remove unused translation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-04 14:11:17 +02:00
Sébastien Loix 8b085b9eac
[es_ui_shared] Fix eslint exhaustive deps rule (#76392)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-03 18:45:32 +02:00
Pierre Gayvallet e70ef657d4
Delete src/legacy/ui/public folder (#76085)
* delete src/legacy/ui/public folder

* remove jest.mock('ui/XXX'); from tests

* adapt stubbedLogstashIndexPatternService

* remove delete keys from translation files

* fix types import with Capabilities

* remove legacy test utils

* remove dead file referencing ui/newPlatform

* move saved-object-finder styles to timelion plugin
2020-09-01 09:23:22 +02:00
Alison Goryachev 833d76442f
[Ingest pipelines] Tests for pipeline debugging enhancement (#75606) 2020-08-31 09:34:39 -04:00
Sébastien Loix ec1516064c
[Form lib] Correctly add field to form on component mount (#75796)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-27 14:02:03 +02:00
Mikhail Shustov 37ec1e1053
Update to TS v4 (#73924)
* bump ts to v4

* MOAR RAM

* fix type errors for OSS

* first pass on x-pack errors

* second pass on x-pack type errors

* 3rd pass on x-pack type-errors

* mute errors if complex cases

* don't delete if spread suffices

* mute other complex cases

* make User fields optional

* fix optional types

* fix tests

* fix typings for time_range

* fix type errors in x-pack/tests

* rebuild kbn-pm

* remove leftovers from master update

* fix alert tests

* [Telemetry Checker] TS4 Fixes

* bump to 4.0.1-rc

* fix new errors in master

* bump typescript-eslint to version supporting TS v4 syntax

* fix merge commit errors

* update to the stable TS version 4.0.2

* bump ts-eslint to version supporting ts v4

* fix typo

* fix type errors after merge

* update ts in another new package.json

* TEMP: remove me

* Revert "TEMP: remove me"

This reverts commit dc0fc3bae6.

* [Telemetry] Update snapshot for new TS4 SyntaxKind

* bump prettier to support TS v4 syntax

* fix prettier rules

* last style change

* fix new type errors

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2020-08-27 10:28:02 +02:00
James Rodewig c3b6745e3d
Correct punctuation for ingest processors help text (#75695) 2020-08-25 10:29:57 -04:00
Jean-Louis Leysens 644e9c25d7
[Ingest Pipelines] Processor forms for processors E-J (#75054)
* Added the enrich processor form (big one)

* added fail processor form

* Added foreach processor form

* Added geoip processor form and refactored some deserialization

* added grok processor form and updated comments and some i18n ids

* updated existing gsub processor form to be in line with other forms

* added html_strip processor form

* refactored some serialize and deserialize functions and added inference processor form

* fix copy-pasta mistake in inference form and add join processor form

* Added JSON processor field

- Also factored out target_field field to common field (still have
  to update the all instances)
- Built out special logic for handling add_to_root and
  target_field combo on JSON processor form
- Created another serializer, for default boolean -> undefined.

* remove unused variable

* Refactor to use new shared target_field component, and fix JSON serializer bug

* fix i18n

* address pr feedback

* Fix enrich max fields help text copy

* add link to enrich policy docs in help text

* fix error validation message in enrich policy form and replace space with horizontal rule

* address copy feedback

* fix i18n id typo

* fix i18n

* address additional round of feedback and fix json form help text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-20 19:04:42 +02:00
Alison Goryachev 3a66bb5851
[Ingest pipelines] Test pipeline enhancements (#74964) 2020-08-20 11:52:58 -04:00
Jean-Louis Leysens 0e28dae410
convert processor labels to sentence case (#75278) 2020-08-18 15:42:43 +02:00
Jean-Louis Leysens 36f0c75088
[Monaco] Refactor the way XJSON grammar checker gets registered (#75160)
* Refactor the way XJSON grammar checker gets registered

- avoid registering multiple model add listeners
- remove regsiterGrammarChecker from public API!
- fix getWorker handler to register XJSON only for XJSON models

* remove unused import

* updateAnnos -> updateAnnotations
2020-08-18 15:13:15 +02:00
Alison Goryachev 156692cbfb
[Ingest pipelines] Add KibanaContextProvider as dependency of processor editor (#75018) 2020-08-17 14:25:26 -04:00
Jean-Louis Leysens 50f332867a
[Ingest Pipelines] Processor forms for processors A-D (#72849)
* First few processors of the first batch

- Also refactored options to live in scoped objects to avoid
  overriding type (important fix!)
- Have not polished copy or form layout.

* add type to shared imports

* Refactors for repeated fields and added forms

- date_index_name
- dissect
- dot_expander
- drop

Fields refactored:

- Field
- Ignore missing

* Fix broken imports and some other small refactors

* added text editor field and updated pattern and if fields

* Large copy improvements and updates and other small refactors

- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down

* update circle shape type field to select

* Added "long" option for convert type

* fix path import

* fix types and i18n

* add validation for dot expander fix append value to be a combobox

* fix i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 14:57:04 +02:00
Jean-Louis Leysens 0e5ac40b00
Support sentence case names for known processors (#74847) 2020-08-12 17:45:12 +02:00
Alison Goryachev bf666910b0
[Ingest pipelines] Implement tabs in processor flyout (#74469) 2020-08-11 10:03:41 -04:00
Jean-Louis Leysens 92289b63ef
[Ingest Node Pipelines] Sentence-case processor names (#74645)
* wip on fixing processor names

* added comment

* fix Jest test element selector

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 10:05:54 +02:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Alison Goryachev bf22fe54e1
[Ingest Node Pipelines] Refactor pipeline simulator code (#72328) 2020-08-05 09:21:57 -04:00
CJ Cenizal a540cafb85
Add doc titles to ES UI apps (#71045)
* Add doc titles to CCR, ILM, Index Management, Ingest Node Pipelines, License Management, Remote Clusters, Rollup Jobs, Watcher, and Upgrade Assistant. Clear doc title when leaving Dev Tools.
* Refactor Watcher boot file to follow index-oriented pattern of other plugins.
2020-07-21 07:04:40 -07:00
Jean-Louis Leysens e5c7e9a474
[Ingest Pipelines] Processor Editor Move Tooltip (#72239)
* first implementation of tooltip

* Add processor tooltip component files

* remove init position from code for now

* colocate on change handler and make code a bit cleaner

* removed document.body.appendChild logic because EuiPortal does that for us

* use correct toggle button api

* added test to check button disabled while editing

* remove cursor not allowed

* simplify logic

* assert if against positive

* remove unused variable

* Remove unused actions const

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 17:02:54 +02:00
Matthew Kime b26e3198b3
Management API - simpler interface, remove app context usage (#71144)
Management API - simpler interface, remove app context usage, consolidate rendeing
2020-07-14 11:30:01 -05:00