Commit graph

217 commits

Author SHA1 Message Date
Søren Louv-Jansen 606eb6b3d8
[APM] Add API test for service maps (#70185)
* [APM] Add API test for service maps

* Re-add custom links test

* Improved test names

* Disable eslint rule

* Undo readme changes

* Fix ts errors
2020-06-30 16:35:52 +02:00
Thomas Watson ad01223c5a
chore: improve support for mjs file extension (#70186) 2020-06-30 16:13:28 +02:00
Mikhail Shustov 159369b719
Use ts-expect-error in platform code (#69883)
* ts-ignore --> ts-expect-error

* fix error with mutable array

* fix errors in consumers code

* update SOM

* fix FeatureConfig & Feature compatibility

* do not re-export from code. it breaks built version

* update docs

* add eslint rule for platform team code

* remove test. this is covered by ts-expect-error in unit tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-30 07:37:42 +02:00
Gidi Meir Morris d3a0ab3db0
fixed eslint for alerting (#70171)
Fixed eslint in the alerting project
2020-06-29 18:00:58 +01:00
Spencer 7e328417ab
[kbn/optimizer] share all plugin bundles (#68986)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-15 22:15:31 -07:00
Tyler Smalley 8a5a7c3032
[eslint] Prevents importing of public code into server (#67149)
We should not be allowing importing of public into server. Any shared code should reside in a common directory. After #66506, this will not even be possible as we will no longer be transpiling public code into commonjs.

Blocks #66506

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-06-10 08:39:52 -07:00
Frank Hassanabad 8118b13ff7
[SIEM][Detection Engine] Follow up issues from PR 68127 (#68612)
## Summary

* Smaller follow ups and bug fixes from: https://github.com/elastic/kibana/pull/68127
* Added unknown to `findDifferencesRecursive`
* Added linter rule to catch NodeJS code in the common folders for both `lists` and `security_solution`
* Removed the Hapi server type from the common folder of lists

### Checklist

* Added unknown to the correct locations

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-06-10 08:54:27 -06:00
Clint Andrew Hall 91e4fd46f4
Enable exhaustive-deps; correct any lint warnings (#68453)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 11:54:37 -05:00
Robert Austin bc3918671c
[security_solution] enable react-hooks/exhaustive-deps (#68470)
* Enable `react-hooks/exhaustive-deps` rule for security_solution
* Disable it anywhere that it would catch an issue
2020-06-08 10:43:10 -04:00
Pierre Gayvallet c5546f4a39
Add globalSearch x-pack plugin (#66293)
* add skeleton for global_search plugin

* base implementation of the server-side service

* add utils tests

* add server-side mocks

* move take_in_array to common folder

* implements base of client-side plugin

* add tests for server-side service

* fix server plugin tests

* implement `navigateToUrl` core API

* extract processResults for the client-side

* fetch server results from the client side

* factorize process_results

* fix plugin start params

* move things around

* move all server types to single file

* fix types imports

* add basic FTR tests

* add client-side service tests

* add tests for addNavigate

* add getDefaultPreference & tests

* use optional for RequestHandlerContext

* add registerRoutes test

* add base test for context

* resolve TODO

* common nits/doc

* common nits/doc on public

* update CODEOWNERS

* add import for declare statement

* add license check on the server-side

* add license check on the client-side

* eslint

* address some review comments

* use properly typed errors for obs

* add integration tests for the find endpoint

* fix unit tests

* use licensing start contract

* translate the error message

* fix eslint rule for test_utils

* fix test_utils imports

* remove NavigableGlobalSearchResult, use `application.navigateToUrl` instead.

* use coreProvider plugin in FTR tests

* nits

* fix service start params

* fix service start params, bis

* I really need to fix this typecheck oom error

* add README, update missing jsdoc

* nits on doc
2020-06-04 16:18:02 +02:00
Xavier Mouligneau 1216b0f7cd
[SECURITY] Rename siem plugin to security_solution (#67902)
* rename siem to security_solution

* rename siem to security solution inside of code

* rename translation keys

* fix snapshot

* replace siem for security solution in tutorial

* missing translation to be renamed

* fix types for api test integration

* updates runner file to match the new path

* change category for kibana settings

* miss renaming in advance settings

* fixes cypress tests

* fix api integration test

* fix new translation

* fix unit test

* update translation i18n

* update translation i18n II

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2020-06-04 05:35:13 -04:00
Tiago Costa 20d60829b3
chore(NA): avoids imports of server or public code into common (#67231)
* chore(NA): avoids imports of server or public code into common

* chore(NA): fix imports from public or server into common

* chore(NA): fix typechecking for data plugin stubs

* chore(NA): fix types and tests related with licensing plugin

* chore(NA): fix problems on infra plugin

* chore(NA): fix typo on .eslintrc.js

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>

* chore(NA): migrate to license mock usage on security plugin licensing module

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2020-06-03 20:21:38 +01:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Tiago Costa cd9084d439
chore(NA): avoids imports of server code into public (#67152) 2020-05-21 18:33:33 +01:00
Spencer 4e0921d41e
[kbn/plugin-helpers] typescript-ify (#66513) 2020-05-15 10:35:44 -07:00
Rudolf Meijering 795483d9b5
Don't bootstrap core type emits (#66377) 2020-05-15 11:03:46 +02:00
Stacey Gammon d5601457b3
Don't automatically add license header to code inside plugins dir. (#66601)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-14 17:50:59 -04:00
Wylie Conlon 459daa7f23
[Lens] Use rules of hooks with linting (#65593) 2020-05-07 10:01:51 -04:00
Alexey Antonov 642b03b41d
[ESLint] update @kbn/eslint/no-restricted-paths rule to allow imports mocks from folder (#65471) 2020-05-07 10:56:36 +03:00
Corey Robertson b8bea5b8b2
[Canvas] move files from legacy/plugins to plugins (#65283)
* Moves the files

* Rename legacy/plugins/canvas paths

* Correct paths

* Fix shareable_runtime and storybook

* ESLint Fixes

* Fix jest test and paths
2020-05-05 20:52:56 -04:00
Spencer ee270c7c3f
disallow external imports to src/core/utils (#64852) 2020-05-05 14:56:22 -07:00
Tyler Smalley df1874756f
Disallows commonjs in new platform public (#65218)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-05-05 09:33:09 -07:00
Søren Louv-Jansen e02350cdc7
[APM] Update path to APM app after move to NP (#65034) 2020-05-05 18:22:47 +02:00
igoristic 59315bc84d
[Monitoring] NP Migration complete client cutover (#62908)
* Final phase before the complete cutover

* NP migration

* lint fix

* More NP stuff

* Moved Stack Monitoring client plugin outside legacy and fixed all tests

* ...

* Removed unused files

* Fix for main links

* Fixed more tests

* Fixed redirect when clicking on SM icon again

* Code review feedback

* Addressed code review feedback

* Fixed return value
2020-04-30 15:59:35 -04:00
Frank Hassanabad 1282341020
[SIEM][Detections] Adds large list support using REST endpoints
## Summary
* Adds large list support using REST endpoints.

Status: 
---

* Currently ready to be merged behind the feature flag of it being disabled with ongoing work happening after it is merged. 
* REST Endpoints shouldn't have large refactoring at this point
* Team meeting occurred where the pieces were discussed in person.

What is left?
---

- [ ] Add other data types. At the moment `ip` and `keyword` are the two types of lists. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
- [x] Unit tests
- [x] Lots of misc TODO's in the code base still
- [ ] Import loads everything into memory first when it should attempt streaming
- [ ] Add end to end backend tests
- [x] Add transform and io-ts validation for returns 

Testing
---

Ensure you set this in your ENV before starting Kibana:
```ts
export ELASTIC_XPACK_SIEM_LISTS_FEATURE=true
```

Download or create a large list file such as this one filled with IP's:
https://cinsscore.com/list/ci-badguys.txt

Go to your REST endpoint folder of scripts:
```ts
cd kibana/x-pack/plugins/lists/server/scripts
```

Do a hard reset:
```ts
./hard_reset
```

Then import it as either a data type of `ip`:
```ts
./import_list_items_by_filename.sh ip ~/Downloads/ci-badguys-smaller.txt
```

Or as a `keyword`
```ts
./import_list_items_by_filename.sh keyword ~/Downloads/ci-badguys-smaller.txt
```

Then you can export it through:
```ts
./export_list_items.sh ci-badgusy-smaller.txt
```

For all the other endpoints and testing of the CRUD operations you have access to:

```ts
delete_all_lists.sh
delete_list.sh
delete_list_index.sh
delete_list_item.sh
delete_list_item_by_id.sh
delete_list_item_by_value.sh
export_list_items.sh
export_list_items_to_file.sh
get_list.sh
get_list_item_by_id.sh
get_list_item_by_value.sh
import_list_items.sh
import_list_items_by_filename.sh
lists_index_exists.sh
patch_list.sh
patch_list_item.sh
post_list.sh
post_list_index.sh
post_list_item.sh
```

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-04-28 16:00:22 -06:00
Daniil Suleiman da89856503
[NP] Move visTypeVislib into NP (#63963) 2020-04-28 14:44:17 +02:00
Ryland Herrick 4cc5b3a4d3
[SIEM] Client NP Cutover (#64251)
* Move SIEM public/ folder to NP plugin

This is solely renames; fixes come next.

* Update relative imports in our API tests

* Fix linter errors following move to NP folder

These paths got a little shorter, so some lines could be collapsed.

* Move client dependencies to NP package.json

I'm removing the @types/js-yaml for now because I'm not sure we need it;
I'll add it back later if we do.

* Fix relative imports to other plugins

* Fix errant uses of ui/chrome

* Remove legacy plugin shim

* Move feature registration into plugin

This previously had to be part of legacy bootstrapping due to an order
of operations issue.

* Disconnect legacy plugin

The index file should now be redundant with what's in the plugin:

* app registration
* feature registration

* Move public gitattributes

* Remove references to legacy embeddables

We can now use the NP API. Maps embeddable will not work here until
their work is merged, but this should prevent us from importing legacy
code and thus breaking the build.

* Add our frontend dependencies to kibana.json

These are all required for now, because that's how they're typed. If
they _should_ be optional (and I think several should), we need to
update the type and handle the null case within the app.

* Replace use of ui/new_platform mocks in embeddable utils

* Fix remaining jest tests

* Replace build-breaking ui/new_platform mocks with equivalents in core
proper
* Remove unnecessary mocks of ui/new_platform

* Remove references to legacy SIEM folder

* I left the reference in CODEOWNERS in case someone tries to sneak
something back
* I left the .gitignore reference for the same reason

* Fix mocks of relative paths

These were not caught by typescript and were causing test failures.

* Export our client plugin contracts

They're empty for now.

* Move from deprecated appmount API

The new one dropped a param we weren't using.

* Add missing mock causing test failures

* Don't re-export core types from our plugin

Import them from core where we need them, instead

* Move Actions UI registry outside of mount

This is already imported, there's no benefit (and potential timing
issues) with doing this inside the mount.

* Add security's setup contract to our StartServices

This doesn't change what's used, only how we're typing it. The types are now a
little more truthful as:

* our StartPlugins don't include setup contracts
* our StartServices includes everything we use at Start time, including
the one setup plugin.

* Add order and icon back to the sidebar link

* Replace plugin class properties with constants

These are shared, and should be consistent.

* Enable our UI on NP

* Add missed plugin dependencies

We're not using their contracts, but we are importing code from them.

* Revert use of constant in translation

Can't do that, whoops

* i18n our feature catalogue entry

* Remove unnecessary array from single element

* Remove unused keys

These were the legacy translations used... well, I don't know where they
were used.

* Ignore circular dependencies in external plugins

* Normalize exclusions

* Add undeclared dependencies to kibana.json

We import our maps embeddable from maps, and we pass inspector to the
embeddable. I just missed these in my audit. This was causing errors in
the map embeddable.

* Await our call to setLayerList

This is an async call that we need to complete before we can render.

* Reduce siem plugin size

When we load our initial plugin (before our app is loaded), were were
implicitly importing all of kibana_react with this import. While a
global module prevents this from affecting our bundle size currently,
that could change in the future. Since we only need a reference to our
class, we just import that instead.
2020-04-27 17:59:21 -05:00
Gidi Meir Morris a012ddf9df
[alerting] removes usage of any throughout Alerting Services code (#64161)
This removes unneeded use of `any` throughout:
1. alerting
2. alerting_builtin
3. actions
4. task manager
5. event log

It also adds a linting rule that will prevent us from adding more `any` in the future unless an explicit exemption is made.
2020-04-24 17:04:36 +01:00
Tyler Smalley feed406c77
[eslint] no_restricted_paths config cleanup (#63741)
Major cleanup of the no_restricted_paths rule for imports of core.

For relative imports, we use eslint-module-utils/resolve which resolves
to the full filesystem path. So, to support relative and absolute
imports from the src alias we need to define both the directory and the
index including file extension.

This rule was handling both core imports, as well as imports from other
plugins. Imports from other plugins are being used much more liberally
allowed through the exceptions in tests. I choose to break these up,
removing this exception for tests for core imports.

Fixes:
Absolute imports of src/core/server/mocks were not allowed in src. This
was not an issue in x-pack due to the target excluding
!x-pack/**/*.test.* and !x-pack/test/**/*.

Non-top-level public and server imports were allowed from X-Pack tests
to the previously mentioned exclusion.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-04-23 15:59:01 -07:00
CJ Cenizal 91f7911d15
Move CCR out of legacy (#62890)
* Convert common/services and server/lib to TypeScript. Update Jest tests.
  - Remove deserializeAutoFollowPattern behavior that returned an empty object if the pattern was undefined.
* Localize mocks with the component integration tests.
* Update API unit tests to use NP mocks.
  - Break up test files.
  - Use inline mocked ES response instead of fixture files.
  - Move remaining fixture files into client integration tests directory.
* Make API route validation more strict.
* Publish isUiDisabled as part of Remote Clusters contract.
* Default trackUiMetric service to be a no-op.
* Remove security dependency.
  - Fix license check so that CCR won't render if the license is invalid.
  - Fix server security check to be more precise by checking if ES has security disabled.
* Render timestamp for autofollow errors.
2020-04-22 07:15:25 -07:00
Ryland Herrick 40f82229f0
[SIEM] Server cutover to New Platform (#63430)
* Move server code into NP folder

* NP config is not yet used
* Relative imports are somewhat broken

* Move common folder into NP

* Move cypress folder into NP

* Move scripts folder into NP

* Move misc. config into NP folder

A few of these were moved into the cypress folder as they're
cypress-specific.

I tried to update all the relative paths but some are likely broken. I'm
not going to know until other stuff is fixed, though.

* Move value for siem index pattern into common/constants

The other default values live in there, this is no different.

* Update paths following file move

If this was referencing the full project, it now references both paths
(legacy for UI, and NP for server).

* Fix typescript errors related to module resolution

These are mostly updating imports to the common/ folder on the UI side
(since things changed relative to those files).

* Replace Legacy Config with NP Config

* Updates plugin to use NP config
  * defines new config previously coming from savedObjects config
* cleans up legacy types

 Conflicts:
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts
	x-pack/plugins/siem/server/plugin.ts
	x-pack/plugins/siem/server/routes/index.ts
	x-pack/plugins/siem/server/types.ts

* Remove local SIEM tsconfig

This was originally added to address an issue with tsserver, but that
issue is no longer relevant. The presence of this file confuses
typescript into thinking that siem is a separate TS project.

* Update kibana.json to declare our dependencies

These are not necessarily correct in terms of what's required/optional,
but this is what's declared in our types.

* Remove legacy plugin instantiation

* Removes legacy instantiation of server plugin, which is now handled by
NP
* Loosens legacy config spec so we no longer have to duplicate config
types

* Update tests with NP config

These were written against the old Hapi config function; now, we just
have a POJO.

* Update es_archiver helpers' paths

I'm not quite sure if these are working yet, but they're no longer
throwing errors.

* Ignore restricted path on script

This was cribbed from infra, who has made a similar change.

* Ignore restricted path on temporary savedObject mappings import

This will be changed subsequently when we switch to the NP form of
savedObject type registration.

* Add symlink to lockfile

* Fix paths on circular deps script

* Add separate config for Rule and Timeline saved objects

We had previously used the savedObjects' config, but those are not
currently exposed to us on New Platform. For now, we're going to split
this into two sets of values for the SOs we deal with
importing/exporting within the SIEM app, with the same defaults as
savedObjects.

* Fixing relative paths within cypress

These are strings that wouldn't be caught by typescript.
2020-04-17 12:31:54 -05:00
Dima Arnautov 7058070e15
[ML] Extract apiDoc params from the schema definitions (#62933)
* [ML] WIP apiDoc schema extractor

* [ML] extract actual type

* [ML] refactor schema definitions

* [ML] Update README.md

* [ML] extract nested

* [ML] call job validation endpoint with complete payload

* [ML] escape special chars and fix line breaks

* [ML] clean up extractDocEntries

* [ML] serializeWithType

* [ML] add missing annotations

* [ML] fix parent schema assigment

* [ML] support object composition

* [ML] support multiple schemas per block

* [ML] fix for collections

* [ML] fix calendarIdsSchema

* [ML] add ml package.json with apidoc commands

* [ML] use the single output markdown file

* [ML] fix typo

* [ML] change the Calendars order

* [ML] adjust the order in adidoc.json

* [ML] update api version

* [ML] update tsconfig.json include

* [ML] update packages/kbn-pm/dist/index.js

* [ML] update ML overrides in .eslintrc.js

* [ML] yarn.lock symlink

* Revert "[ML] yarn.lock symlink"

This reverts commit 07f06801

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-15 18:40:34 +02:00
Tim Roes ebbc062689
Move Lens frontend to Kibana Platform (#62965)
* Move Lens frontend to Kibana platform

* Fix line breaks

* Fix jest tests

* Fix remaining test

* Remove old Lens plugin entry

* Fix i18n prefix

* Add config schema

* Address review
2020-04-15 12:22:37 +02:00
Daniil Suleiman 314c4f782f
[NP] Vis Default Editor plugin (#62475)
* Move the default_editor to NP

* Fix paths

* Import styles through the visualize

* Other fixes

* Fix ip_ranges exhaustive-deps array

* Fix filters and extend bounds

* Other fixes

* Fix date_ranges tests

* Use useMount on first render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 12:00:13 +03:00
Tim Roes 8429a8ede9
Fix old pathes in eslintrc (#62580) 2020-04-07 09:24:21 +02:00
Spencer 5a537d16a5
[plugin-generator] rewrite tests to match new generated plugins (#61571)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-27 10:54:54 -07:00
Luke Elmers 3401ae42e0
Goodbye, legacy data plugin 👋 (#60449) 2020-03-23 09:17:27 -06:00
MadameSheema 6598298d01
skips 'config_open.ts' files from linter check (#60248) 2020-03-16 15:13:03 +01:00
James Gowdy 35302ed273
[ML] Client side cut over (#60100)
* [ML] Client side cut over

* updating paths and commented code

* changes based on review

* disabling telemetry tests

* fixing start job stylesheets

* fixing everything that is broken

* fixing types and ml icon order

* using icon constant
2020-03-13 19:16:41 +00:00
Thomas Watson 38717982e3
Clean up .eslintrc.js with better variable naming (#59864) 2020-03-11 15:18:49 +01:00
Thomas Watson 1525dbe73d
ci: disable all Mocha rules for tape tests (#59798) 2020-03-11 08:07:06 +01:00
Thomas Watson a663f65bcc
Harden creation of child processes (#55697)
Add general protection against RCE vulnerabilities similar to the one
described in CVE-2019-7609.

Closes #49605
2020-03-10 07:51:57 +01:00
Maryia Lapata 80db96b823
Fix TS for vis_type_vislib (#58345)
* Fix TS for vislib

* Fix TS

* Revert table changes

* Update unit test

* Refactor updateAxisTitle

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 13:57:16 +03:00
Maryia Lapata 39f6eaf5f4
Fix TS for vis_type_table (#58347)
* Remove eslint overrides for vis_type_table

* Fix TS for vis_type_table

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 13:20:24 +03:00
Alexey Antonov deda49e9f0
[ui/utils/query_string]: Remove unused methods & migrate apps to querystring lib (#56957)
* replace querystring (querystring-browser) -> query-string

* QueryString remove encode/decode methods

* remove query_string file

* remove querystring-browser from package.json

* add kibana_utils\url module

* cleanup

* update notice.txt

* fix merge conflict

* fix CI

* fix wrong import

* fix CI

* fix X-Pack firefox smoke test

* remove urlUtils.parseUrlQuery

* remove url.stringifyUrlQuery

* use url.encodeQuery

* Record<string, any> -> ParsedQuery

* Update src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx

Co-Authored-By: Luke Elmers <lukeelmers@gmail.com>

* add more tests for APM

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
2020-02-12 19:51:03 +03:00
Joe Reuter 09f1cad573
Check for legacy imports in vis types and fix problems (#56763) 2020-02-10 12:48:18 +01:00
patrykkopycinski 05edbdac78
[SIEM] Add eslint-plugin-react-perf (#55960)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-04 11:22:40 +01:00
Daniil Suleiman 7f63118d6b
Vis default editor plugin (#55612)
* Shim the default_editor

* Update paths in vis_default_editor

* Update paths in dependent plugins

* Update the dependent plugins

* Create an entry point

* Wrap the editor with kibana context

* Fix circular re-renders

* Update sub aggs mapping

* Move schemas and agg_groups to agg_types, update jest tests

* Use services from kibana context, other fixes

* Fix useEffect maximum update depth

* Create i18n namesapce for visDefaultEditor, rename translations

* Fix tests

* Resolve paths

* Remove ui/vis/vis_types

* Fix vis import

* Move editor_config_provider to ui/vis
2020-01-29 17:41:18 +03:00
Alexey Antonov 5d6dbf07b0
Expose NP FieldFormats service to server side (#55419)
* Expose NP FieldFormats service to server side

* fix CI

* fix PR comments

* fix PR comments

* fix CI

* getFieldFormatsRegistry -> getFieldFormatRegistry

* fix CI

* memoize - add resolve cache function

* fix Jest

* move IFieldFormatMetaParams to types.ts

* FieldFormatRegistry -> FieldFormatsRegistry

* update src/core/MIGRATION.md

* update public contract

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 22:25:39 +03:00
Jean-Louis Leysens f7c53b5690
Disallow importing Joi client side (#55018)
* Disallow importing Joi client side

* Move elasticsearch lib into server folder

* Add a comment about the 'joi' eslint rule

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-24 15:38:44 +01:00
Nick Partridge bd7d5eb9f6
Shim vis_type_vislib (#53536)
* shim of kbn_vislib_vis_types (now vis_type_vislib)
* Move vislib into vis_type_vislib plugin
* Convert remaining plugin files to typescript
* Rename vis to vis_type_vislib
2020-01-15 15:48:19 -06:00
Spencer 357be5970d
share specific instances of some ui packages (#54079)
* share specific instances of some ui packages

* remove unnecessary eslint changes, every package will define deps anyway

* remove mentions of moment webpackShims in eslint resolver

* remove use of lodash

* list angular as dep for x-pack

* add operations as codeowner of shared-deps pkg
2020-01-10 15:22:18 -07:00
Joe Reuter 07278aba37
remove linting rule exception for markdown (#54232) 2020-01-10 20:30:03 +01:00
Tim Roes d03d05106e
Fix tile-map react eslint errors (#54265) 2020-01-10 11:24:59 +01:00
Marta Bondyra d4f584e0cb
Fix eslint rule for vis_type_metric `jsx-a11y/click-events-hav… (#54279) 2020-01-09 17:07:44 +01:00
Matthias Wilhelm 58f792cee3
Remove eslint overwrite for src/legacy/core_plugins/kibana (#54222)
* Cleanup code 
* Remove eslint overwrite
2020-01-09 11:56:14 +01:00
Tim Roes 7ffe38569e
Fix Vega react eslint errors (#54259) 2020-01-08 18:19:20 +01:00
Anton Dosov 513428af44
add examples/ to no-restricted-path config (#54252) 2020-01-08 19:20:07 +03:00
patrykkopycinski 23a0513469
[SIEM] Add react/display-name eslint rule (#53107) 2020-01-07 18:05:04 +01:00
patrykkopycinski 677670b929
[SIEM] Enable eslint prefer-template rule (#53983)
* [SIEM] Enable eslint prefer-template rule

* cleanup

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 18:02:32 +01:00
patrykkopycinski 6e1328b9f0
[SIEM] Enable eslint react/no-children-prop (#53985) 2020-01-07 17:46:56 +01:00
Chris Roberson 28b6efa260
Fix linting issues (#54068)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-07 11:31:15 -05:00
Justin Kambic bd2be32876
[Uptime] Delete uptime eslint rule skip (#50912)
* Delete uptime eslint rules.

* Update hooks usage to adhere to new eslint rules.

* Delete code accidentally added during rebase.

* WIP trying things.

* Clean up types and hook usage to comply with kibana eslint rules.

* Clean up code.

* Update new useEffect hooks that are missing dependencies.

* Fix edits that broke a page.
2020-01-02 16:36:07 -05:00
spalger c52571be68 ensure prettier overrides take precedence, remove style rules 2019-12-14 17:39:10 -07:00
spalger a3553c924d [eslint] use prettier for all the things 2019-12-13 23:17:11 -07:00
spalger 1ea9d791bc Revert "Revert "Fix wrong impor (#52994)""
This reverts commit c220d770cc.
2019-12-13 14:09:51 -07:00
spalger c220d770cc Revert "Fix wrong impor (#52994)"
This reverts commit 6c1f248c4f.
2019-12-13 13:16:40 -07:00
Josh Dover ec2134d221
Add lint rule to prevent server code being imported into client (#52447) 2019-12-13 12:26:04 -06:00
Mikhail Shustov 6c1f248c4f
Fix wrong impor (#52994)
* Licensing plugin and XPackInfo uses the same license data (#52507)

* convert xpackinfo to TS

* use NP Licensing plugin in XPackInfo

* update mocks

* put license regresh hack back.

otherwise new license won't be re-fetched when signature changed. was deleted by mistake

* add functional test for legacy xpackmain

* declare setup types on client & server explicitly

* rename mock license --> licensing to match plugin name

* add tests for createLicensePoller

* fix type error

* adopt tests for xpack_info

* createXPackInfo uses new platform API

* put back error mute

* address comments

* fix renamed import

* address comment

* update tests to reduce delays

* deprecate xpack.xpack_main.xpack_api_polling_frequency_millis

* use snake_case in config

* fix wrong import
2019-12-13 18:09:36 +01:00
Spencer 7ba47eebbf
[euiUtils] fix unnecessary useEffect dep (#52782) 2019-12-11 12:49:15 -07:00
Felix Stürmer 0cd62cabbb
[Logs + Metrics UI] Remove eslint exceptions (#50979)
This removes the two eslint exceptions specific to the `infra` plugin introduced in #49244.

fixes #49563
2019-12-11 13:48:40 +01:00
Jean-Louis Leysens aa31b535d1
[Watcher] New Platform (NP) Migration (#50908)
* First iteration of watch public -> new platform
Still need to switch to np ready version of use_request

* - Switched to using np ready request
- Some updates after API changes

* First attempt at server shim

* Rename file and re-enable react hooks linting

* Fix some public types and react hooks lint rules

* Fix types

* More ES lint react hooks fixes

* Migrated server lib -> ts. Part way done with migrating routes to NP router and TS

* Big subset of routes to TS and NP router - almost there

* Delete legacy error wrappers and moved last set of routes to TS and NP router

* Remove @ts-ignore's and update route registration to use shim with http router

* Added routes validations, fixes for hooks and fixes for types

* Fix more types and finish testing API routes

* Fix usage of feature catalogue and fix time buckets types

* Fix error message shape [skip ci]

* Split legacy from new platform dependencies server-side

* Refactor: Seperate client legacy and NP dependencies

* Add file: added types file

* Fix UISettings client type import

* Update license pre-routing factory spec

* Update variable names, use of I18nContext (use NP) and docs

* Use NP elasticsearchclient

* Simplify is_es_error_factory

* Fix types

* Improve code legibility and remove second use of `useAppContext`

* Use @kbn/config-schema (not validate: false) on routes!

* Fix watch create JSON spec

* Create threshold test working

* Unskip watch_edit.test.ts

* Unskip watch_list.test.ts

* Done re-enabling component integration tests

* TimeBuckets typo + remove unnecessary // @ts-ignore
2019-12-11 09:54:42 +01:00
Joe Reuter 69e6b2908d
fix linting errors in graph (#50907) 2019-12-03 15:44:37 +01:00
Pierre Gayvallet 99c6396fd5
Migrate Capabilities to new platform (#51438)
* create service skeleton

* move registerCapabilitiesModifier to capabilities service and rename to registerCapabilitiesSwitcher

* starts to move capabilities logic to CapabilitiesService

* move capabilities route to service

* add initial integration test for capabilities route

* capabilitiesMixin now delegates to capability service

* use server-side Capabilities import in server code

* update generated doc

* remove capabilities from injectedMetadatas

* use applications sent from client instead of server-registered navLinks

* disable authRequired for capabilities route

* (temp) exposes two endpoints for capabilities

* Add fetch-mock on capabilities call for karma tests

* adapt xpack Capabilities test - first attempt

* adapt x-pack ui_capabilities test

* add '/status' to the list of anonymous pages

* Add documentation on Capabilities APIs

* move Capabilities to core/types

* update generated docs

* add service tests

* protecting resolveCapabilities against added/removed capabilities

* update generated docs

* adapt mocks due to rebase

* add forgotten exports

* improve capabilities routes registering

* name capabilities registering methods

* resolve conflicts due to merge

* address review issues

* add comment about reason for exposing two routes

* extract createHttpServer test helper

* fix merge conflicts

* improve documentation

* remove `/status` anon registration as now done in NP status plugin

* fix merge conflicts
2019-12-03 09:34:49 +01:00
Mikhail Shustov bd63596d18
add eslint rule banning the core to import plugin code (#51563)
* add eslint rule banning the core to import plugin code

* Ban importing legacy plugin code in the сore

* fix eslint errors

* core cannot import xpack rule

* regen docs
2019-11-28 22:54:21 +01:00
Jean-Louis Leysens 793f1f1191
[Console] Refactoring more legacy code and implementing minor fixes (#51312)
* First part of context refactor

* Finised "hook"ing in to new context for old editor output. Also fixed passing through of content type

* Remove comment

* - update console history behaviour - don't scroll into view on click. Doesn't really make sense.
- make triple quote setting update in place
2019-11-25 18:28:49 +01:00
Pierre Gayvallet 5a93c13420
fix src/core/public/application react/no-danger violations (#51146) 2019-11-20 18:07:18 +01:00
patrykkopycinski ee7338e82d
[SIEM] Fix eslint errors (#49713) 2019-11-16 18:24:27 +01:00
Spencer 0010447f0f
[a11y] add initial accessibility functional tests (#43584)
* [a11y] add initial accessibility functional tests

* add accessibility jobs

* fix config path

* remove percy setup from scripts

* disable color-contrast rule

* apply changes from @myasonik

* define aria-controls/owns props even when suggestions aren't visible

* [ftr/a11y] only throw error when there are errors

* adding tests for management page

* add a11y test for management page

* adding ignore rules' to a11y

* accessibility test for kibana home

* 7 passing tests, 0 failures

* jest snapshot update

* support a11y test in pipeline job

* update a11y test script for pipelines

* use oss compatible ci setup

* fix exclude syntax

* add default exclusion syntax
2019-11-07 10:07:40 -05:00
sainthkh faa48d591d eslint no-restricted-path false positive: bug caused by dir names that start with "index". (#46544)
* index* to index.{ts,tsx}

* Added test.

* Added invalid test.

* Added js.
2019-10-31 12:40:53 +02:00
James Gowdy 636fa27107
[ML] Fixing some of the eslint rule breakages in ML (#49716) 2019-10-30 16:38:08 +00:00
Walter Rafelsberger b368c6acba
[ML] Transforms: Removes temporary x-pack/legacy/plugins/transform eslint overrides.
Re-enables linting rules related to React hooks and adapts inline code.
2019-10-30 08:07:09 -07:00
Larry Gregory 8bd0aacc5f
Spaces - fix react hook deps (#49618)
* fix react hook deps

* removing lint override for spaces
2019-10-29 12:54:21 -04:00
Spencer 19ea92abb7
move react/jsx-a11y rules into shared react preset (#49244)
* move react/jsx-a11y rules into shared react preset

* autofix react/jsx-closing-tag-location

* autofix react/no-unknown-property

* manually fix react/no-unescaped-entities

* maually fix react/jsx-pascal-case

* manually fix react/prefer-stateless-function

* disable known violations in specific plugins/areas

* remove code override
2019-10-29 06:15:33 -07:00
renovate[bot] feceb0f98e Update eslint related packages (#48513)
* Update eslint related packages

* add errorMessage to no-restricted-paths validation

* add license to eslintrc file

* ignore broken plugin fixture

* upgrade tangled peer deps

* give name to unnamed func to avoid typescript-eslint/typescript-eslint#1078

* migrate away from removed prefer-interface

* migrate away from removed no-angle-bracket-type-assertions rule

* migrate away from removed no-triple-slash-reference rule

* old config was invalid and made this rule a noop

* fix array-type rule config

* fix readonly paramProperties that weren't being checked

* fix propType ordering

* remove references to non-existent rules

* remove unnecessary disable that is improperly formatted

* fix comment-related spacing

* fix typo/invalid namespace overrides

* rename fn to avoid hook-alike behavior

* remove reference to old removed rule

* use caret version for prettier

* reference babel-eslint with absolute path
2019-10-21 16:32:31 -07:00
Mikhail Shustov 5676ac00ab
UI settings move to NP (#47590)
* add tests for logWithMetadata in LP

* allow passing metadata to log in NP & LP

* move ui_settings_client to NP

* add ui_settings config

* add ui_settings_service

* switch to NP logging

* export types

* bootstrap uiSettings service in NP

* pass NP uiSettings to LP

* move ui_settings mock to NP

* add  test for mixin and switch to NP logger

* make UiSettingsClient.getDefaults sync as it is

* ui_settings_client uses private fields

* ui_settings_client uses private methods

* keep uiSettings config validation in NP only

* update mocks

* core context should know it is mocked

* add tests for ui_settings_service

* remove unused code from ui_settings_mixin test

* improve types in ui_settings_mixin test

* gen docs

* test moved to NP

* set pkg version in tests explicitly

* update mocks in tests

* UiSettingsServiceSetup --> InternalUiSettingsServiceSetup

* add links to types

* address eli comment

* regen docs

* remove unused types
2019-10-16 14:18:34 +02:00
Mikhail Shustov 27dbcb2796
Expose package info to NP plugins (#48101)
* provide packageInfo to server plugins

* provide env to kbn server

* provide env to client plugins

* update server mocks and tests

* update client mocks and tests

* add integration test

* regen docs

* remove weird file

* export types for the client from special folder

* env should not affect test ourcome
2019-10-15 14:19:11 +02:00
Devin W. Hurley 19df9e2b06
[SIEM] Adds linter rule to disallow undeclared variables (#46249)
* adds linter rule to disallow undeclared variables

* adds cypress eslint plugin, remove redundant packages from siem/package.json

* removes comment from json and adds a line about cypress linting to the cypress README

* adds upgraded package back to siem/package.json

* updates cypress run scripts since cypress package is now located in the x-pack/node_modules

* needed to yarn kbn bootstrap after rebasing with master
2019-09-30 11:25:06 -07:00
Devin W. Hurley 05d296408d
removes awaits from return statements (#46006) 2019-09-18 17:09:52 -04:00
Devin W. Hurley 13813e1bbb
[SIEM] Enables no-param-reassign Eslint Rule (#45776)
* enables no-param-reassign eslint rule

* replace some if statements with ternary operators

* remove dead code + fix logic on category of details query thankfully we were not using category on the UI

* adds test and minor logic update for regex replacer function. Also updates logic in events e' elasticsearch adapter for bug fix with field category and adds relevant test.

* remove unused resolvers and remove failing test I added because the type checker didn't like it.

* adds test cases and updates type definition for parts in regex replacer
2019-09-17 19:18:50 -04:00
Joe Reuter eed848ab2e New visualization editor Lens (#36437)
* [lens] Initial Commit (#35627)

* [visualization editor] Initial Commit

* [lens] Add more complete initial state

* [lens] Fix type issues

* [lens] Remove feature control

* [lens] Bring back feature control and add tests

* [lens] Update plugin structure and naming per comments

* replace any usage by safe casting

* [lens] Respond to review comments

* [lens] Remove unused EditorFrameState type

* [lens] Initial state for IndexPatternDatasource (#36052)

* [lens] Add first tests to indexpattern data source

* Respond to review comments

* Fix type definitions

* [lens] Editor frame initializes datasources and visualizations (#36060)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* Fix state management issue

* [lens][draft] Lens/drag drop (#36268)

Add basic drag / drop component to Lens

* remove local package (#36456)

* [lens] Native renderer (#36165)

* Add nativerenderer component

* Use native renderer in app and editor frame

* [Lens] No explicit any (#36515)

* [Lens] Implement basic editor frame state handling (#36443)

* [lens] Load index patterns and render in data panel (#36463)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* remove local package

* [lens] Load index patterns into data source

* Redo types for Index Pattern Datasource

* Fix one more type

* Respond to review comments

* [draft] Lens/line chart renderer (#36827)

Expression logic for the Lens xy chart.

* [lens] Index pattern data panel (initial) (#37015)

* [lens] Index pattern switcher

* Respond to review comments

* [Lens] Editor state 2 (#36513)

* [lens] Dimension panel that generates columns (#37117)

* [lens] Dimension panel that generates columns

* Update from review comments

* [lens] Generate esdocs queries from index pattern (#37361)

* [lens] Generate esdocs queries from index pattern

* Remove unused code

* Update yarn.lock from yarn kbn bootstrap

* [Lens] Add basic Lens xy chart suggestions (#37030)

Basic xy chart suggestions

* [Lens] Expression rendering (#37648)

* [Lens] Expression handling (#37876)

* [Lens] Lens/xy config panel (#37391)

Basic xy chart configuration panel

* [Lens] Xy expression building (#37967)

* [Lens] Initialize visualization with datasource api (#38142)

* [lens] Dimension panel lets users select operations and fields individually (#37573)

* [lens] Dimension panel lets users select operations and fields individually

* Split files and add tests

* Fix dimension labeling and add clear button

* Support more aggregations, aggregation nesting, rollups, and clearing

* Fix esaggs expression

* Increase top-level test coverage of dimension panel

* Update from review comments

* [Lens] Rename columns (#38278)

* [Lens] Lens/index pattern drag drop (#37711)

* Basic xy chart suggestions

* Re-apply XY config panel after force merge

* Initial integration of lens drag and drop

* Tweak naming, remove irellevant comment

* Tweaks per Wylie's feedback

* Add xy chart internationalization
Tweak types per Joe's feedback

* Update xy chart i18n implementation

* Fix i18n id

* Add drop tests to the lens index pattern

* improve tests

* [lens] Only allow aggregated dimensions (#38820)

* [lens] Only allow aggregated dimensions

* [lens] Index pattern suggest on drop

* Fully remove value

* Revert "[lens] Index pattern suggest on drop"

This reverts commit 604c6ed68c.

* Fix type errors

* [lens] Suggest on drop (#38848)

* [lens] Index pattern suggest on drop

* Add test for suggestion without date field

* fix merge

* [Lens] Parameter configurations and new dimension config flow (#38863)

* fix eslint failure

* [lens] Fix build by updating saved objects and i18n (#39391)

* [lens] Update location of saved objects code

* Update internatationalization

* Remove added file

* [lens] Fix arguments to esaggs using booleans (#39462)

* [lens] Datatable visualization plugin (#39390)

* [lens] Datatable visualization plugin

* Fix merge issues and add tests

* Update from review

* Fix file locations

* [lens] Use first suggestion when switching visualizations (#39377)

* [lens] Label each Y axis with its operation label (#39461)

* [lens] Label each Y axis with its operation label

* Remove comment

* Add link to chart issue

* [Lens] Suggestion preview rendering (#39576)

* [Lens] Popover configs (#39565)

* [Lens] Basic layouting (#39587)

* remove datasource public API in suggestions (#39772)

* [Lens] Basic save / load (#39257)

Add basic routing, save, and load to Lens

* [lens] Fix lint error

* [lens] Use node scripts/eslint.js --fix to fix errors

* [lens] Include link to lens from Visualize (#40542)

* [lens] Support stacking in xy visualization (#40546)

* [lens] Support stacking in xy visualization

* Use chart type switcher for stacked and horizontal xy charts

* Clean up remaining isStacked code

* Fix type error

* [Lens] Add xy split series support (#39726)

* Add split series to lens xy chart

* [lens] Lens Filter Ratio (#40196)

* WIP filter ratio

* Fix test issues

* Pass dependencies through plugin like new platform

* Pass props into filter ratio popover editor

* Provide mocks to filter_ratio popover test

* Add another test

* Clean up to prepare for review

* Clean up unnecessary changes

* Respond to review comments

* Fix tests

* [Lens] Terms order direction (#39884)

* fix types

* [Lens] Data panel styling and optimizations (#40787)

Style the data panel (mostly Joe Reuter's doing). Optimize a bunch of the Lens stack.

* [Lens] Optimize dimension panel flow (#41114)

* [Lens] re-introduce no-explicit-any (#41454)

* [Lens] No results marker (#41450)

* [lens] Support layers for visualizing results of multiple queries (#41290)

* [lens] WIP add support for layers

* [lens] WIP switch to nested tables

* Get basic layering to work

* Load multiple tables and render in one chart

* Fix priority ordering

* Reduce quantity of linting errors

* Ensure that new xy layer state has a split column

* Make the "add" y / split the trailing accessor

* Various fixes for datasource public API and implementation

* Unify datasource deletion and accessor removal

* Fix broken scss

* Fix xy visualization TypeScript errors?

* Build basic suggestions

* Restore save/load and fix typescript bugs

* simplify init routine

* fix save tests

* fix persistence tests

* fix state management tests

* Ensure the data table is aligned to the top

* Add layer support to Lens datatable

* Give xy chart a default layer initially

* Allow deletion of layers in xy charts

* xy: Make split accessor singular
Remove commented code blocks

* Change expression type for lens_merge_tables

* Fix XY chart rendering expression

* Fix type errors relating to `layerId` in table suggestions

* Pass around tables for suggestions with associated layerIds

* fix tests in workspace panel

* fix editor_frame tests

* Fix xy tests, skip inapplicable tests
that will be implemented in a separate PR

* add some tests for multiple datasources and layers

* Suggest that split series comes before X axis in XY chart

* Get datatable suggestion working

* Adjust how xy axis labels are computed

* Datasource suggestions should handle layers and have tests

* Fix linting in XY chart and remove commented code

* Update snapshots from earlier change

* Fix linting errors

* More cleanup

* Remove commented code

* Test the multi-column editor

* XY Visualization does not need to track datasourceId

* Fix various comments

* Remove unused xy prop
Add datasource header to datatable config

* Use operation labels for XY chart

* Adding and removing layers is reflected in the datasource

* rewrote datasource state init

* clean up editor_frame frame api implementation

* clean up editor frame

* [Lens] Embeddable (#41361)

* [lens] Move XY chart config into popover and fix layering (#41927)

* [lens] Move XY chart config into popover and fix layering

* Fix tests

* Update style

* Change wrapping of layer settings popover

* [Lens] Fix bugs in date_histogram and filter ratio (#42046)

* [Lens] Performance improvements (#41784)

* fix type error

* switch default size of terms operation to 3 (#42334)

* [lens] Improve suggestions for split series (#42052)

* [lens] Add chart switcher (#42093)

* solve merge conflicts

* fix test case

* [Lens] Allow only current visualization on field drop in workspace (#42344)

* [Lens] Remove indexpattern id on column (#42429)

* [lens] Implement app-level filtering and time picker (#42031)

* [lens] Implement app-level filtering and time picker

* More integration with filter bar

* Clean up test code and type errors

* Add frame level tests for syncing with app

* Add test coverage for app logic

* Simplify state management from app down

* Fix import errors

* Clarify whether properties are ids or titles for index pattern

* pass new saved object by ref

* add dirty state checking

* Fix tests

* [Lens] Add some tests around document handling in dimension panel (#42670)

* [Lens] Terms operation boolean support (#42817)

* [lens] Minor UX/UI improvements in Lens (#42852)

* Make dimension popover toggle when clicking button

* Without suggestions hide suggestion panel

* Add missing translations (#42921)

* [Lens] Config panel design (#42980)

* Fix up design of config panel

Does not include config popover

* Remove a couple of non-null assertions (#43013)

* Remove a couple of non-null assertions

* Remove orphaned import

* [Lens] Switch indexpattern manually (#42599)

* [Lens] Update frame to put suggestions at the bottom (#42997)

* fix type errors

* switch indexpattern on layer if there is only a single empty one (#43079)

* [Lens] Suggest reduced versions of current data table (#42537)

* [Lens] Field formatter support (#38874)

* Fix bugs

* [Lens] Add bucket nesting editor to indexpattern (#42869)

* [Lens] Remove unnecessary fields and indexing from mappings (#43285)

* [Lens] Xy scale type (#42142)

* [lens] Allow updater function to be used for updating state (#43373)

* [Lens] Lens metric visualization (#39364)

* Fix axis rotation (#43792)

* [Lens] Auto date histogram (#43775)

* Add auto date histogram

* Improve documentation and cleanup

* Add tests

* Change test name

* [Lens] Fix query bar integration (#43865)

* [Lens] Clean up operations code (#43784)

* [Lens] Functional tests (#44279)

Foundational layer for lens functional tests. Lens-specific page objects are not in this PR.

* [Lens] Add Lens visualizations to Visualize list (#43398)

* [Lens] Suggestion improvements (#43688)

* [lens] Calculate existence of fields in datasource (#44422)

* [lens] Calculate existence of fields in datasource

* Fix route registration

* Add page object and use existence in functional test

* Simplify layout of filters for index pattern

* Respond to review feedback

* Update class names

* Use new URL constant

* Fix usage of base path

* Fix lint errors

* [Lens ] Preview metric (#43755)

* format filter ratio as percentage (#44625)

* [Lens] Remove datasource suggestion id (#44495)

* [Lens] Make breadcrumbs look and feel like Visualize (#44258)

* [lens] Fix breakage from app-arch movements (#44720)

* [lens] Fix type error in test from merge

* [lens] Fix registration of embeddable (#45171)

* [Lens] Functional tests (#44814)

Basic functional tests for Lens, by no means comprehensive. This is more of a smokescreen test of some normal use cases.

* [lens] Add Lens to CODEOWNERS (#45296)

* [lens] Fix visualization alias registration

* [lens] Fix usage of EUI after typescript upgrade (#45404)

* [lens] Fix usage of EUI after typescript upgrade

* Use local fix instead of workaround

* [lens] Fix usage of expressions plugin (#45544)

* [lens] Fix usage of expressions plugin

* Use updated exports from #45538

* Fix imports and mocha tests

* Use relative instead of absolute path to fix tests

* [lens] More cleanup from QueryBar changes in master (#45687)

* [lens] Fix build and use new platform from entry points (#45834)

* [lens] Fix build and use new platform from entry points

* Fix params for existence route
2019-09-17 14:57:53 -04:00
Devin W. Hurley 8bc8ae2053
[SIEM] Enable eslint rule for duplicate import statements (#45552)
* enable eslint rule for duplicate import statements

* updates lint warn to an error
2019-09-13 09:15:42 -04:00
Spencer 8603607afb
mark eslint config as root (#44699) 2019-09-03 13:57:09 -07:00
Stacey Gammon c469b0849d
np-ify embeddable explorer plugin (#44110)
* np-ify embeddable explorer plugin

* use plugins.embeddable, not start
2019-08-30 12:04:32 -04:00
Spencer 2ed1d1ec57
use @elastic/eslint-plugin-eui (#43397)
* use `@elastic/eslint-plugin-eui`

* add exceptions to the new rule
2019-08-16 08:29:46 -07:00
Vadim Dalecky 48df3c8893
Utility types (#41246)
* feat: 🎸 add @kbn/utility-types

* feat: 🎸 improve @kbn/utility-types

* chore: 🤖 move @kbn/utility-types to dev deps

* chore: 🤖 change @kbn/utility-types build setup

* fix: 🐛 implement review suggestions

* feat: 🎸 add ShallowPromise type

* Update packages/kbn-utility-types/README.md

Co-Authored-By: Luke Elmers <lukeelmers@gmail.com>

* test: 💍 add tests for utility-types

* chore: 🤖 add utility-types tests to TypeScript config

* test: 💍 remove negative tests to not cause TypeScript fail

* chore: 🤖 remove ref to type defs to try fix CI tests

* Update packages/kbn-utility-types/index.ts

Co-Authored-By: Spencer <email@spalger.com>

* chore: 🤖 add TS types index to fix `grunt run:test_projects`

* chore: 🤖 use similar tsconfig.json as in other packages

* chore: 🤖 add "clean" script

* chore: 🤖 add kbn:bootstrap script
2019-08-12 15:45:32 +02:00
Spencer d66b3c74eb
[x-pack/ftr] refactor types to be more accurate/consistent wit… (#42407) 2019-08-02 15:43:05 -07:00
Dario Gieselaar b6258b2125
[APM] Add react-hooks lint rules for APM folder, fix dependencies (#42129)
* [APM] Add react-hooks lint rules for APM folder, fix dependencies

Closes #42128.

* Validate useFetcher dependencies as well

* Add useFetcher hook; move eslint config to kibana eslint config
2019-07-29 20:36:24 +02:00
Vadim Dalecky 8f0de3abdb
chore: 🤖 forbid import from ui/** (#40537)
* chore: 🤖 forbid importing from ui/** from within shims

* chore: 🤖 allow importing platfrom in dashboard embeddable sihm

* chore: 🤖 use np_ready folder, improve rule

* chore: 🤖 update ESLint error message

* feat: 🎸 improve eslint plugin rule

* test: 💍 add tests for restricted paths linter rule

* test: 💍 add ESLint package to CI testing suite

* chore: 🤖 fix linter errors
2019-07-18 22:52:13 +02:00
Spencer c3f31c79fb
[jest] disallow invalid describe calls (#41378)
* [jest] disallow invalid describe calls

* correct other describe calls

* remove unnecessary glob

* cast decribe names to strings

* remove new async describe function
2019-07-18 10:11:33 -07:00