Commit graph

2159 commits

Author SHA1 Message Date
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
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
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
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
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
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
Lisa Cawley
4c152965b6
Fixes broken link (#33724) 2019-03-22 11:57:06 -07: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
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
Oliver Gupte
8ccd5715ab
[APM] Related error count in transaction timeline (#33100)
* Closes #29688 by adding related error count in timeline with links to error
overview filtered by the related trace/transaction ids. Also update the errors
link in the sticky transaction properties to match the timeline pattern.

* [APM] leverage EUI theme colors, tweak sticky transaction properties column
sizes, and reorder timeline error count to show duration after only on hover

* [APM] Renamed ErrorsOverviewLink -> ErrorCountBadge. Differentiate the labeled
vs non-labeled variaions of ErrorCountBadge. Replace state hooks for hovered
styles with plain css :hover

* [APM] Revert duration display on hover to render display all the time.

* remove unnecessary props object spread
2019-03-21 21:38:14 -07:00
Josh Dover
b21e646dcb
Replace start with setup lifecycle event (#33455)
* Move `start` lifecycle functions to `setup` in core/server

* Move `start` lifecycle functions to `setup` in core/public
2019-03-21 13:27:59 -05:00
Robert Monfera
7b5d559f4d
[Canvas] Fix: no stuck hover on key based page back/forth (#33631)
* Fix: no stuck hover on key based page back/forth

* Fix: no stuck hover on key based page back/forth
2019-03-21 18:55:16 +01:00
Aleh Zasypkin
e7e26b05b9
Typesciptify SAML Authentication provider. (#33559) 2019-03-21 16:56:33 +01:00
Liza Katz
3cc70257b8
New platform dropdown (#33520)
* Removed old dropdown code from dev tools consle

* Removed old dropdown from vega tools

* Deleted dropdown directives from angular bootstrap

* Deleted ui.bootstrap.dropdown test (irrelevant, since directive was deleted)
2019-03-21 15:02:27 +02:00
Robert Monfera
e110de3e59
Refactor: make interaction target acquisition faster and more robust (#33503) 2019-03-20 23:17:10 +01:00
Catherine Liu
9563c49d21
[Canvas] Show current workpad in workpad loader (#33531)
* Bolds loaded workpad in workpad loader

* Extracted helper function
2019-03-20 14:25:21 -07:00
Melissa Alvarez
a650dc172d
Add missing whitespace to modelPlotCardinality + cardinalityNotValid messages (#33599) 2019-03-20 16:12:25 -04:00
Liza Katz
e9863f386e
New platform cleanup tabs (#33425)
This PR includes the removal of the angular-boostrap directives:

* tabset
* tab

To achieve that, tabs were replaced in 2 places in the code (screenshots attached) with a simple React + EUI implementation.

* search profiler
* timelion app help documentation
2019-03-20 20:11:17 +02:00
Justin Kambic
d15a6771de
[Uptime] Change copy on empty state component (#33044)
* Change copy on Uptime empty state component to use "collecting" instead of "logging".

* Update jest snapshot for changed component.

* Update empty prompt link to send users to Add Data tutorial.

* Update empty state tests for new changes.
2019-03-20 14:10:08 -04:00
Justin Kambic
df89596e92
[Uptime] Add Global Help support to uptime (#31493)
* Add comments to kibana framework adapter file's render function for better annotation.

* Add global help link for uptime.

* Add return function to help API handler.
2019-03-20 14:09:30 -04:00
Josh Dover
14cce19c67
[UA] Move Kibana stacktrace from UI to logs (#33150) 2019-03-20 12:16:38 -05:00
Melissa Alvarez
2a695a4294
[ML] Anomaly explorer add/remove filter via Anomalies table (#33377)
* create utils file for kqlFilterBar

* add filer icons to influecer cell

* wip: apply filter from table

* update filterbar value from table

* error handling for filter by table

* Add filtering icons in expanded row

* Add tests + keep filterBar utils in same dir

* don't add filter if exists already

* update error message

* update error message and add link

* update entityCell comment + add getQueryPattern test

* Update entityCell comment

* update job switch handling with icon filter changes
2019-03-20 11:52:19 -04:00
Aleh Zasypkin
4b1dd01188
Exclude .test.ts files from x-pack build. (#33565) 2019-03-20 14:28:44 +01:00
Liza Katz
3ac95dc213
moved btn-radio directive to vis editor (#33373) 2019-03-20 11:54:51 +02:00
Robert Monfera
dfd9401cf0
[Canvas] No dummy commit for keyboard events (#33414)
* Chore: typo fix

* Chore: no longer use possibly obsolete `states`

* Fix: cause update to component upon keyboard shortcut interactions

* Refactor: more honest name for the React rerender enforcer call

* Chore: we know we return falsey
2019-03-20 08:11:54 +01:00
Peter Pisljar
40fce1aad8
adding interpreter uiExports (#33391) 2019-03-20 06:41:37 +01:00
Oliver Gupte
46fbe88f93
[APM] Closes #32626 by setting a unique key on the HeightRetainer element per transaction. (#33473) 2019-03-19 17:01:25 -07:00
Jason Rhodes
e8c1bff8cd
Removes refresh logic, updates tests, fixes back button problem when updated url is the same except for encoding (#33278) 2019-03-19 18:10:03 -04:00
Melissa Alvarez
3db0b45d42
[ML] Anomaly explorer clear filter when switching to jobs with no influencers (#33512)
* Remove race condition: trigger reload if job selection not in progress

* clear filter on job change when no influencers

* remove commented code

* update indexPattern comment for clarity
2019-03-19 14:34:12 -04:00
Chandler Prall
0e23ac1134
Upgrade EUI to 9.4.2 (#33511)
* Upgrade EUI to 9.4.1

* Upgrade EUI to 9.4.2
2019-03-19 12:31:04 -06:00
Liza Katz
7c0a776312
Removed popover directive (#33437)
* Deleted popover directive from angular-bootstrap
Copied a part of popover to ml angular bootstrap patch
Deleted unused dropdown directives from ml angular bootstrap patch

* Removed unused dropdown css
2019-03-19 19:55:16 +02:00
Brandon Morelli
d4a3f18004
update apm documentation links (#33435) 2019-03-19 07:46:09 -07:00
Pete Harverson
b1b9552812
[ML] Make layout of Edit Filter List consistent with other settings pages (#33421) 2019-03-19 09:47:14 +00:00
Sébastien Loix
effebd8c05
Move testbed utils to x-pack/test_utils (#32893) 2019-03-19 08:12:19 +01:00
Oliver Gupte
47272c464f
[APM] Add new agent name 'rum-js' (#33212)
* [APM] Closes #32643 by adding new agent name 'rum-js' for telemetry and docs links

* [APM] replaced enum with union type + set, and consolidated util functions operating on agent names

* [APM] code cleanup and fixing comments

* [APM] move AgentName type def to es_schemas, and the agent name functions to
common, leverage object hash to reference names

* [APM] code cleanup and improve type assertion between AgentName type and object mapping
2019-03-18 16:16:02 -07:00
Catherine Liu
7721b85def
Fixes esdocs to support uppercase index (#33442) 2019-03-18 13:47:26 -07:00
Thomas Neirynck
d1df04163c
[Maps] add some padding around mouse pointer (#33415) 2019-03-18 16:36:34 -04:00