Commit graph

97 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
Mikhail Shustov 95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Robert Oskamp 406a568d0c
[ML] Add basic license test run details to ML+Transform READMEs (#83259)
This PR updates the READMEs of the ml and transform plugins to include instructions how to run basic license tests.
2020-11-16 10:25:42 +01:00
Quynh Nguyen af51394986
[ML] Replace EuiBasicTable with EuiInMemoryTable (#83057) 2020-11-11 11:30:30 -06:00
Alexey Antonov b2d6b66fe5
[bundle optimization] fix imports of react-use lib (#82847)
* [bundle optimization] fix imports of react-use lib

* add 2 more files

* add rule into eslintrc.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-10 17:15:26 +03:00
Thomas Watson 700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +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
Walter Rafelsberger 5c40c20585
[ML] Transforms: Remove index field limitation for custom query. (#81467)
The query bar originally developed for the transforms wizard didn't work with indices with more than 1024 fields. In that case we disabled the query bar and showed an info-callout. Since we moved on to make use of the KQL query bar, this limitation does no longer exist so this PR removes the limitation.
2020-10-27 13:06:42 +01:00
Walter Rafelsberger 5858dd8f98
[ML] Transforms: Fix tab ids for expanded row. (#80666)
We based the IDs to identify expanded row tabs on the transform ID. This could break the page because the transform ID could include characters (e.g. dots) not supported by EUI's tabbed content component. This fixes the issue by using the stringHash() utility to create the IDs.
2020-10-17 12:25:31 +02:00
István Zoltán Szabó 88591acc03
[DOCS] Adds initial content to Transforms readme.md (#80630)
Co-authored-by: Walter Rafelsberger <walter@rafelsberger.at>
Co-authored-by: Pete Harverson <peteharverson@users.noreply.github.com>
2020-10-15 17:25:55 +02:00
Pierre Gayvallet bb174fd1d5
Use SavedObjectClass from savedObject start contract instead of createSavedObjectClass (#80063)
* no longer export static createSavedObjectClass from savedObject plugin

* fix forgotten call

* yet another usage

* more fixes

* move so to required plugins for timelion
2020-10-14 09:26:04 +02:00
Melissa Alvarez 5cc8b9bf52
[Transform] Check for source indexPattern before opening clone wizard (#79383)
* check for source indexPattern before opening clone wizard

* update translations

* update jest test

* move mocks to mock directory
2020-10-06 12:22:04 -04:00
Quynh Nguyen ad89e6f956
[ML] Add runtime fields support (#78700)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 13:00:58 -05:00
Tyler Smalley 7211f78ce1
Bumps Jest related packages (#78720)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-10-01 14:38:51 -07:00
Quynh Nguyen fd7dd41617
[ML] Update transform cloning to include description and new fields (#78364) 2020-10-01 12:41:12 -05:00
Spencer 06d1628a00
[ts] enable "resolveJsonModule" and disable existing failures (#78855)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-30 15:44:43 -07:00
Mikhail Shustov ae8f8e1d10
Add TS projects for src/plugins & x-pack/plugins (#78440)
* bump query-string version to remove manual type definitions

* remove manual type declaration

* add kibana_utils tsconfig

* add refs to kibana_utils tsconfig

* add kibana_utils to the project list

* add kibana_react project

* add support for x-pack/tsconfig.refs.json

* add ts project for x-pack licensing plugins

* add glob for ts projects in src/plugins & x-pack/plugins

* add refs to projects in examples

* fix ref paths in x-pack/test

* address mistic comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-30 15:02:41 +02:00
Pete Harverson 80c004cb01
[ML] Replace use of rest_total_hits_as_int with track_total_hits (#78423)
* [ML] Replace use of rest_total_hits_as_int with track_total_hits

* [ML] Replace use of lodash get for obtaining hits total

* [ML] Update mocks to use new total hits format
2020-09-30 08:54:17 +01:00
Walter Rafelsberger 61aac716b3
[ML] Limit exposing shared static code through ml/public/index.ts. (#77745)
- Clean up lodash imports.
- Import types only where applicable.
- Reduce page load bundle size by fetching more code asynchronously.
2020-09-29 11:57:53 +02:00
Brittany Joiner 63ce752dc2
Adding comment about importing lodash library (#78156)
* added comment about importing lodash library

* fixed space with prefer

* cleaned up extra space and removed comments for lodash/fp

* took out the comment in server files

* Remove newlines

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2020-09-24 11:38:11 -05: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
Anton Dosov 89e1f087a2
bump @testing-library (#78270) 2020-09-24 15:02:59 +02:00
Pierre Gayvallet 0d09cea436
Remove legacy plugins support (#77599)
* remove ALL the things.

* adapt some types and tests

* restore ensureValidConfiguration

* fix legacy service tests

* adapt uiRender mixin

* remove legacy types

* update generated doc

* restore legacy plugin schema

* update generated doc

* remove remaining code of x-pack/legacy

* adapt imports due to merge

* cleanup CODEOWNERS

* cleanup gitignore & i18nrc

* cleanup tsconfig.json

* remove unused i18n keys

* add back `"legacy/plugins/**/*",` to tsconfig until legacy space plugin is deleted

* fix create_jest_config

* remove references from eslintrc

* more eslint cleanup

* remove `x-pack/index.js`

* fix xpack gulp scripts

* fix bug with default + named imports from boom

* remove rules from eslintrc

* remove LegacyInternals

* review comments

* update generated doc

* cleanup legacy metadatas

* revert changes to eslintrc

* update generated doc
2020-09-23 09:52:51 +02:00
Matthew Kime 9450248ebe
Index pattern - refactor constructor (#77791)
* index pattern - refactor constructor
2020-09-22 20:01:36 -05:00
Walter Rafelsberger 4e7b7bf65f
[ML] Transforms: Extend editing and creation options. (#77370)
Extends the available options in the edit transform flyout and the wizard details step.
2020-09-21 16:55:40 +02:00
Pete Harverson b9958babf3
[ML] Transforms: Fixes styling of preview grid pagination in summary step (#77789) 2020-09-18 11:05:31 +01:00
Pierre Gayvallet 3759063e81
remove legacy ES plugin (#77703)
* remove legacy ES plug

* fix types

* delete some `legacy/core_plugins` references

* fix type
2020-09-18 09:30:13 +02:00
Walter Rafelsberger dd1822047c
[ML] Transforms: API schemas and integration tests (#75164)
- Adds schema definitions to transform API endpoints and adds API integration tests.
- The type definitions based on the schema definitions can be used on the client side too.
- Adds apidoc documentation.
2020-09-14 16:31:23 +02: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
James Gowdy ea8086b3f2
[ML] Improving client side error handling (#76743)
* [ML] Improving client side error handling

* adding stacktrace to request errors

* copying error parsing to transforms

* update snapshot

* fixing jest tests

* adding test and removing debug log output

* updating translations

* rewriting error extracting code

* fixing tests

* removing message bar service

* removing test code

* updating translations

* combining job creation error handling

* refactoring error files

* updating test

* fixing bug in DFA deletion

* improving mml warning

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-11 08:53:34 +01:00
Melissa Alvarez e985f1a272
[ML] Transforms list: persist pagination through refresh interval (#76786)
* use basic table in transforms to persist pagination

* simplify state and update types
2020-09-09 10:04:47 -04:00
James Gowdy 4762cf56f5
[ML] Switching to new es client (#74965)
* [ML] Switching to new es client

* further conversions

* fixing tests

* updating responses

* test commit

* refactoring shared services to removed context parameter

* removing last scoped clients

* removing ml js client

* udating file data viz errors

* fixing jest tests

* fixing types after merge with master

* error response changes

* adding default sizes to some requests

* adding custom error types for license checks

* tidying up shared function checks

* removing test data

* removing need for DummyKibanaRequest

* updating comment

* fixing functional api tests

* removing comments

* fixing types after master merge

* throw error rather than return it

* removing placeholder error

* changes based on review comments

* fixing types after merge with master

* fixing missing return

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-02 14:07:57 +01:00
Lisa Cawley 1b75690b73
[Transforms] Avoid using "Are you sure" (#75932) 2020-08-27 18:56:31 -07: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
Catherine Liu 532f2d70e8
[Home] Elastic home page redesign (#70571)
Co-authored-by: Catherine Liu <catherine.liu@elastic.co>
Co-authored-by: Ryan Keairns <contactryank@gmail.com>
Co-authored-by: Catherine Liu <catherineqliu@outlook.com>
Co-authored-by: Michael Marcialis <michael.marcialis@elastic.co>
2020-08-26 13:00:00 -07:00
Pete Harverson 659890cc91
[ML] Transforms: Unset doc title when app unmounts (#75539)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-21 09:25:17 +01:00
Walter Rafelsberger e61a4b63a6
[ML] DF Analytics / Transforms: Fix job row actions menu invalid DOM nesting warning (#74499)
Refactors the action buttons for transforms and analytics job list to no longer produce nested button elements and throw a React error.
2020-08-19 16:25:00 +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
Robert Oskamp a25feb6d57
[ML] Functional tests - stabilize waiting for AD, DFA, TFM job list refresh (#74064)
With this PR, the job list refresh for anomaly detection, data frame analytics and transforms is waiting for the refresh loading indicator to disappear before moving on.
2020-08-03 17:07:33 +02:00
Walter Rafelsberger dd605c4e61
[ML] Transforms/DFA: Change action button size back to 'xs'.
Changes the button size for the actions for transforms and data frame analytics list from s back to xs to be in line with the Anomaly Detection jobs list.
2020-07-29 20:10:56 +02:00
Dima Arnautov b3f1595331
[ML] do not throw an error when agg is not supported by UI (#72685) 2020-07-22 01:03:27 +02:00
Walter Rafelsberger 0b0ef39b22
[ML] Transforms/Analytics actions: Fix different button styles (#71626)
- Fixes differences in button styles for the actions on the transforms and data frames analytics jobs list.
- Fixes issues with buttons being not properly disabled for limited permissions.
2020-07-15 21:51:57 +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
James Gowdy a1e511a727
[ML] Changing all calls to ML endpoints to use internal user (#70487)
* [ML] Changing all calls to ML endpoints to use internal user

* updating alerting

* updating documentation

* [ML] Changing all calls to ML endpoints to use internal user

* updating alerting

* updating documentation

* fixing missed types

* adding authorization headers to endpoint calls

* correcting has privileges call

* updating security tests

* odd eslint error

* adding auth header to module setup

* fixing missing auth argument

* fixing delete DFA job permission checks

* removing debug test tag

* removing additional ml privilege checks

* adding authorization header to _evaluate

* updating alerting cluster client name

* code clean up

* changing authorizationHeader name

* updating alterting documentation

* fixing secondary credentials

* adding management links

* updating SIEM telemetry

* fixing merge conflicts

* granting access to index patterns

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 15:48:24 +01:00
Walter Rafelsberger 262e0754ff
[ML] Kibana API endpoint for histogram chart data (#70976)
- Introduces dedicated Kibana API endpoints as part of ML and transform plugin API endpoints and moves the logic to query and transform the required data from client to server.
- Adds support for sampling to retrieve the data for the field histograms. For now this is not configurable by the end user and is hard coded to 5000. This is to have a first iteration of this functionality in for 7.9 and protect users when querying large clusters. The button to enable the histogram charts now includes a tooltip that mentions the sampler.
2020-07-14 13:37:36 +02:00
Spencer fa93a81ba6
[kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911)
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 18:43:17 -07:00
Walter Rafelsberger bb96f5dd94
[ML] Transforms/DFA: Refactor list action buttons so modals won't unmount after button click. (#70555)
Related to #70383 and #63455.

Refactors the action buttons of the transform and data frame analytics jobs list:

Previously custom actions included state and JSX for e.g. confirmation modals. Problem with that: If the actions list popover hides, the modal would unmount too. Since EUI's behaviour will change with the release/merge of #70383, we needed a refactor that solves that issue right now.

With this PR, state management for UI behaviour that follows after a button click like the confirmation modals was moved to a custom hook which is part of the outer level of the buttons itself. The modal now also gets mounted on the outer level. This way we won't loose the modals state and DOM rendering when the action button hides.

Note that this PR doesn't fix the nested buttons issue (#63455) yet. For that we need EUI issue #70383 to be in Kibana which will arrive with EUI v26.3.0 via #70243. So there will be one follow up to that which will focus on getting rid of the nested button structure.
2020-07-08 10:10:32 +02:00
Spencer f5b280007f
[kbn/optimizer] only build specified themes (#70389)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-07-02 15:06:32 -07:00
Pierre Gayvallet fe1c508d8d
Move and rename legacy elasticsearch client (#69797)
* move last snapshot to inline

* move legacy files to legacy subfolder

* move request types out of legacy

* export Headers from http instead of elasticsearch

* renaming - first pass

* renaming - second pass

* fix core mocks

* adapt new calls

* update generated doc

* fix IT test mocks

* fix new usages
2020-06-29 17:43:31 +02:00
Walter Rafelsberger eea33a0db2
[ML] Transforms: Adds functional tests for transform cloning and editing. (#69933)
Adds functional tests for transform cloning and editing.
2020-06-26 17:03:00 +02:00