Commit graph

23314 commits

Author SHA1 Message Date
CJ Cenizal 33fa8c0c6b
Add eslint rule for checking React Hooks best practices. (#33901)
* Rename Console's useResizeChecker to applyResizeCheckerToEditors, to bypass greedy react-hooks lint rule.
2019-03-26 20:18:14 -07:00
Tiago Costa 3b020f055b
docs(NA): missing header for unit testing. (#33895) 2019-03-27 00:41:24 +00:00
CJ Cenizal d8c7e18bf1
Instrument ILM with user action telemetry (#33089)
* Track user actions for creating, updating, and deleting and index lifecycle policy.
* Track user actions for attaching an index, attaching an index template, and detaching an index.
* Track app load action.
* Track usage of cold phase, warm phase, set priority, and freeze index.
* Track retry step user action.
* Track clicks on the policy name to edit it.
* Refactor constants to be in root of public.
* Add support to user actions API for comma-delimited action types.
* Refactor rollups trackUserRequest to be easier to understand.
* Use underscores instead of dashes for user action app names.
* Switch from componentWillMount to componentDidMount/useEffect.
  - Standardize use of HashRouter within app.js to avoid calling useEffect when leaving the app.
2019-03-26 15:43:03 -07:00
Rashid Khan 7676f03bca
Fix plugin generator paths (#33728) 2019-03-26 15:41:25 -07:00
Sarah Hersh 41fb553ee3
edits to page headers (#33887) 2019-03-26 17:53:35 -04:00
Dmitry Lemeshko 8b0d1206a8
FTR: fix 10 sec timeout in waitForDeleted (#33313)
* use css selector instead of className, set implicit wait to 0

* set implicitWait to 2 sec

* set default implicitWait to WAIT_FOR_EXISTS_TIME

* set timeout to 1 sec, retry for query bar test

* sleep 5 sec waiting zoom is finished

* sleep is the only way to wait

* run x-pack-ciGroup3 20x times

* Revert "run x-pack-ciGroup3 20x times"

This reverts commit 55482de330.
2019-03-26 22:15:16 +01:00
Tiago Costa 20bdf7d4a9
Migration to Babel7 and @babel/preset-typescript (#33093)
* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.

* chore(NA): patch babel register to load typescrit

* chore(NA): first working version with babel 7 replacing typescript compiler.

* fix(NA): common preset declaration in order to make it work with babel-loader.

* chore(na): organizing babel preset env package json.

* chore(NA): mocha tests enabled.

* fix(NA): typo on importing

* test(NA): majority of x-pack tests ported to use babel-jest

* fix(NA): report info button test with babel-jest.

* fix(NA): polling service tests.

* test(na): fix server plugins plugin tests.

* test(NA): batch of test fixs for jest tests under babel-jest hoisting.

* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.

* chore(NA): update yarn.lock file.

* chore(NA): tests passing.

* chore(NA): remove wrong dep

* chore(NA): fix tsconfig

* chore(NA): skip babel for ts-jest.

* chore(NA): selectively apply the plugin to strip off namespace from ts files.

* chore(NA): remove not needed changes from ts tests

* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.

* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.

* chore(NA): merge and solve conflicts with master.

* chore(NA): fix problems reported by eslint

* chore(NA): fix license ovveride for babel-plugin-mock-imports

* chore(NA): update jest integration tests for kbn pm

* chore(NA): update babel jest integration tests for kbn pm.

* test(NA): update jest integration snapshot for kbn pm.

* chore(NA): apply changes according to the pull request reviews.

* chore(NA): apply changes according to the pull request reviews.

* refact(NA): migrate jest tests to the new pattern.

* fix(NA): babel 7 polyfill in the tests bundle.

* chore(NA): restore needed step in order to compile x-pack with typescript.

* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7

* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"

This reverts commit 2707d538f5.

* fix(NA): import paths for tabConfigConst

* chore(NA): fix transpiling error on browser tests

* chore(NA): simplify kbn babel preset package.

* chore(NA): migrate build to use babel transpiler for typescript excluding xpack.

* fix(NA): introduced error on test quick task.

* fix(NA): fix preset for client side code on build.

* fix(NA): build with babel

* fix(NA): negated patterns in the end.

* fix(NA): kbn_tp_sample_panel_action creation.

* fix(NA): babel typescript transform plugin workaround when exporting interface name.

* refact(NA): remove not needed type cast to any on jest test.

* docs(NA): add developement documentation about jest mocks test pattern.

* chore(NA): missing unmerged path.

* chore(NA): fix jest tests for template.

* [CCR] Client integration tests (table lists) (#33525)

* Force user to re-authenticate if token refresh fails with `400` status code. (#33774)

* Improve performance of the Logstash Pipeline Viewer (#33793)

Resolves #27513.

_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._

Summary of changes, taken from #31293:

## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.

Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.

## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.

## Gains, by the numbers

Based on a simple, 1-input, 1-filter, and 1-output pipeline.

* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.

* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.

* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.

* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.

* [Maps] split settings into layer and source panels (#33788)

* [Maps] split settings into layer and source panels

* fix SCSS import

* [env] exit if starting as root (#21563)

* [env] exit if starting as root

* fix windows

* s/--allow-root

* Typescript sample panel action (#33602)

* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path

* Home page "recent links" should communicate saved object type #21896 (#33694)

* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx

Co-Authored-By: rockfield <philipp.b@ya.ru>
2019-03-26 20:44:03 +00:00
Melissa Alvarez 4a1e7a86fb
[ML] Anomaly explorer add/remove filter via Top influencers list (#33626)
* Add filter icons in Top influencers list

* move entity component to own dir

* upadte function name to applyFilter

* add fix for IE overflow in anomalies table

* update path to entityCell in test

* Remove IE11 specific style

* Update entityCell design for table+InfluencerList

* Add entityCell component tests

* remove injectI18n dep
2019-03-26 16:17:02 -04:00
Jonathan Budzenski e24cef3f78
Docs/gettingstarted (#32145) (#32218)
* Docs/gettingstarted (#32145)

* [docs/getting started] remove types

* update urls

* one primary shard

* Update docs/getting-started/tutorial-load-dataset.asciidoc

Co-Authored-By: jbudz <jbudz@users.noreply.github.com>

* dedupe

* Update tutorial-load-dataset.asciidoc
2019-03-26 14:45:35 -05:00
Lukas Olson 7846222ded Merge remote-tracking branch 'upstream/master' 2019-03-26 12:18:29 -07:00
Lukas Olson 5ad1ee5edb Update advanced setting description. Closes #30753 2019-03-26 12:18:01 -07:00
Philipp B 57c7572367
Home page "recent links" should communicate saved object type #21896 (#33694)
* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx

Co-Authored-By: rockfield <philipp.b@ya.ru>
2019-03-26 19:40:58 +03:00
Stacey Gammon f5010cc8e6
Typescript sample panel action (#33602)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 12:31:10 -04:00
Jonathan Budzenski 369f0f2922
[env] exit if starting as root (#21563)
* [env] exit if starting as root

* fix windows

* s/--allow-root
2019-03-26 11:20:41 -05:00
Nathan Reese e247609e8b
[Maps] split settings into layer and source panels (#33788)
* [Maps] split settings into layer and source panels

* fix SCSS import
2019-03-26 10:00:53 -06:00
Shaunak Kashyap 2f9ad0a814
Improve performance of the Logstash Pipeline Viewer (#33793)
Resolves #27513.

_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._

Summary of changes, taken from #31293:

## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.

Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.

## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.

## Gains, by the numbers

Based on a simple, 1-input, 1-filter, and 1-output pipeline.

* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.

* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.

* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.

* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.
2019-03-26 06:27:20 -07:00
Aleh Zasypkin 961f7919d3
Force user to re-authenticate if token refresh fails with 400 status code. (#33774) 2019-03-26 12:05:39 +01:00
Sébastien Loix 67acefc283
[CCR] Client integration tests (table lists) (#33525) 2019-03-26 08:47:29 +01:00
Catherine Liu c6acd796c1
Added display name and help description to shape arg in progress view (#33819) 2019-03-25 16:51:27 -07:00
Melissa Alvarez 0665508b65
only show charts if cell has been selected (#33680) 2019-03-25 16:23:19 -04:00
Chris Roberson 5ed923e91e
Ensure the pipelines page utilizes reactNodeId (#33798) 2019-03-25 14:36:40 -04:00
Brandon Kobel 3f9c36bb25
Fixing the regex that is used to validate the Space ID (#33716)
* Fixing the regex that is used to validate the Space id

* Adding basic jest tests for the space schema's ID
2019-03-25 11:03:25 -07:00
Spencer dfeb12f502
[ci] rebuild kbn-pm distributatble to ensure it is up-to-date (#33752) 2019-03-25 11:00:57 -07:00
Spencer 2e232c2e31
[@kbn/expect] "fork" expect.js into repo (#33761)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 09:56:48 -07:00
Oliver Gupte 2c48da2417
[APM] Rename "Tags" -> "Labels" in span flyout (#33688)
* [APM] Closes #33486. Rename "Tags" -> "Labels" in span flyout.

* Remove unused translation 'xpack.apm.transactionDetails.spanFlyout.tagsTabLabel'
2019-03-25 09:26:53 -07:00
Josh Dover 8aa8c55002
Rename newPlatform.start to newPlatform.setup in legacy (#33708) 2019-03-25 10:01:20 -05:00
Juan Álvarez c6699c7986
update kibana index pattern for APM (#33778) 2019-03-25 15:55:24 +01:00
Rudolf Meijering 78fac18d47
Remove *Module classes that wrap services (#33698)
* Remove *Module classes that wrapped services

* Fix tests

* Remove empty core/server README
2019-03-25 15:12:11 +01:00
Tim Roes 657552d888
Allow editing editorState in data panel (#33305) 2019-03-25 05:30:30 -03:00
Liza Katz 6a2e22f512
Deleted bar, progress and progressbar directives (#33585)
* Deleted
- progress
- bar
- progressbar

Changed
 - implementation of Discover > string field > proressbar to use EUI progressbar and tooltip.

* added bug comment

* Fixed CR
2019-03-24 12:56:42 +02:00
Liza Katz 53323d3d8a
Deleted unused directives from angular-boostrap (#33564)
* Deleted unused directives
 - alert
 - pagination
 - pager
 - bar
 - tooltipPopup
 - tooltipHtmlUnsafePopup
2019-03-24 11:00:52 +02:00
Spencer 96206bd092
[eslint] merge custom rules into a single plugin (#33733)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice.

Thoughts?

_**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in 42c7da6fe2. [View the changes without the prettier updates](b647f2b...74e07a0)
2019-03-22 17:12:14 -07:00
Spencer 6cbecd2fe8
remove unused system-loader implementation (#33747)
This code was added when we were first experimenting with the new platform in the UI, isn't being used by anything, and is very similar to the implementation we ended up going with in https://github.com/elastic/kibana/blob/master/src/core/server/plugins/plugin.ts and https://github.com/elastic/kibana/blob/master/src/core/server/plugins/plugins_system.ts
2019-03-22 16:12:07 -07:00
spalger ef70258714 update kbn/pm dist 2019-03-22 15:42:26 -07:00
Spencer 29badf7655
[ftr/dashboard] wait for importFile() to finish (#33723)
* [ftr/dashboard] wait for importFile() to finish

* move waitUntilLoadingHasFinished() into importFile() call

* remove unnecessary page object
2019-03-22 15:15:21 -07:00
Spencer 96c39b695d
[jest/integration] set default test timeout to 30 seconds (#33718)
* [jest/integration] set default test timeout to 30 seconds

* move into dev/jest/setup directory
2019-03-22 15:13:08 -07:00
Lisa Cawley ce96df1e70
[DOCS] Adds notable highlights tags (#33675) 2019-03-22 15:04:15 -07:00
Josh Dover 53ab06898b
Exclude ambient type definitions from checkTsProjects (#33737) 2019-03-22 16:48:53 -05:00
Josh Dover 74d3301b08
[optimizer] Make thread-loader worker count configurable (#33731)
* [optimizer] Make thread-loader worker count configurable

* Make minimum 1
2019-03-22 16:48:38 -05:00
Spencer b647f2ba6a
[reporting/extract] replace fixtures that look like source (#33739)
The fixtures used by reporting's `extract()` tests have tripped me and others up several times because from the outside they look and behave like source files, but require updating archive fixtures whenever the source is touched. The source of this file is irrelevant though, since the tests are just making sure that the extraction is accurate.

This PR updates the fixture to a markdown file with Lorem Ipsum in it, so it won't look relevant to people making broad strokes changes to files like https://github.com/elastic/kibana/pull/33733
2019-03-22 14:46:04 -07:00
Matthew Kime ab8a2b1777
Dashboard typescript (#32703)
Typescript Dashboard bits - grid, panel, viewport
ui/exit_full_screeen
2019-03-22 14:53:24 -05:00
Lisa Cawley 4c152965b6
Fixes broken link (#33724) 2019-03-22 11:57:06 -07:00
Justin Kambic 45d2c84826
[Uptime] Add first draft of uptime docs (#31814)
* Add first draft of uptime docs.

* Add first draft of uptime docs.

* Implement PR feedback.

* Add role info to uptime docs

* Impelement some more PR feedback.

* Attempt to add more copy focusing on the 'why' of each piece of the docs.

* uptime docs: grammar, formatting, order

* move location of uptime docs

* Implement more PR feedback.

* Add screenshots.
2019-03-22 12:59:53 -04:00
Pete Harverson 5ff422d353
[ML] Skip invalid modules when data recognizer lists matches (#33703)
* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
2019-03-22 16:45:01 +00:00
spalger 33083c80eb skip flaky test suite (#33504) 2019-03-22 09:25:36 -07:00
Thomas Neirynck 41d4172fe5
[Maps] coerce string doc-values to numbers if used in styling (#33657) 2019-03-22 11:51:31 -04:00
Jonathan Budzenski 4d60e86287
[monitoring] only create license check if separate monitoring cluster (#33590) 2019-03-22 10:22:11 -05:00
Søren Louv-Jansen ed2874bf54
[APM] Fix Datepicker double loading and move date parsing to urlParams (#33560) 2019-03-22 15:56:57 +01:00
Jason Rhodes 721161f3d1
Upgrades EUI to 9.5 (#33672)
* Updates EUI to 9.5.0

* Remove duplicate type

* Updates snapshots and fixes a few type errors

* Updates x-pack snapshots
2019-03-22 10:28:37 -04:00
Felix Stürmer cee5f7536d
[Infra + Logs UI] Add source configuration ui to the docs (#33535)
This adds the new source configuration ui to the documentation of both the Infrastructure UI and the Logs UI. It also removes the `BETA` badge to reflect the status change.

fixes elastic/kibana#31124

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
2019-03-22 12:25:08 +01:00