Commit graph

25193 commits

Author SHA1 Message Date
Ahmad Bamieh
5cc980979b
[Docs] i18n docs add japanese (#37233) 2019-05-29 15:33:34 +03:00
Maryia Lapata
1a898b1d56
[Vis: Default editor] EUIficate Percentile Ranks and Percentiles (#35349)
* Migrate number-list

* Add types

* Refactoring

* Add number row

* Add and remove items

* Add onChange

* Add validate function

* Apply validation

* Fix merge conflict

* Apply order validation

* Fix ts

* Refactoring

* EUIficate percentiles control

* Remove unused translations

* Move helper functions to a separate file

* Fix code review comments

* Make add button 'xs' size

* Remove extra space

* Fix validation

* Remove unused translations
2019-05-29 14:32:21 +03:00
Daniil Suleiman
3665ba01a2 [Vis: Default editor] EUIficate top_aggregate and size param editors (#36567)
* EUIficate top_aggregate_and_size param editor

* Remove template

* Change typescript interfaces

* Fix browser tests

* Add an icon alert

* Changes due to comments

* Move error to a help text

* Move error to a field

* Change validation logic

* Fix discarding changes action

* Remove changed translation
2019-05-29 14:25:16 +03:00
Mikhail Shustov
b0c0165d63
introduce pre-/post-auth request hooks for HttpServer (#36690)
* introduce pre-,post-auth stages

* cleanup integration_tests. now contracts available in tests

* auth per route is configurable

* Unify lifecycle results structure

* expose api to store auth state and status via http service

* update tests

* update docs

* use full name, auth should not mutate request

* move basePath functionality under namespace

* regenerate docs

* Revert "move basePath functionality under namespace"

This reverts commit 9599d32801.

* Revert "regenerate docs"

This reverts commit 1799d3b088.

* regenerate docs

* updated yarn.lock no idea why

* extract AuthStateStorage to a separate entity

* get rid of nested ifs

* describe what is the difference between hooks

* re-wording
2019-05-29 12:26:05 +02:00
Yulong
575cdbe012
[Code] fix lsp init unit test by using fake timers (#37201)
* [Code] fix LSP init unit test by using fake timers
2019-05-29 18:06:14 +08:00
Maryia Lapata
0ff093651c
[Vis: Default editor] EUIficate controls of Geohash agg (#37213)
* EUIficate controls of geohash agg

* Fix tests
2019-05-29 12:58:46 +03:00
Mikhail Shustov
906a078f62
add docs how to use config in New Platform (#36782)
* add docs how to use config in NP

* do not encourage storing initializer context in plugin
2019-05-29 11:57:52 +02:00
Daniil Suleiman
f6e91ccaaa Upgrade enzyme and enzyme-adapter-react-16 to the latest (#37064)
* Upgrade enzyme and enzyme-adapter-react-16 to the latest

* Skip failed expectation

* Update yarn.lock

* Update snapshot
2019-05-29 12:56:55 +03:00
Vitali Haradkou
8007c3fb1b
[TSVB] [AT] TimeSeries refactor (#36987)
* move tsvb timeseries tests into new file
2019-05-29 12:10:27 +03:00
Daniil Suleiman
38b95b1cc1 [Vis: Default editor] EUIficate top_sort param editor (#36629)
* EUIficate top_sort param editor

* Set field if only one available

* Remove unused translations

* Fix functional tests

* Fix browser tests

* Rewrite functional test for combo_box field select

* Remove unused translations

* Update label
2019-05-29 11:43:47 +03:00
Maryia Lapata
e28dc58db5
[Vis Editor] Fix undefined error in Field control (#37179)
* Add default value for labels in sortByLabel function

* TS: make label optional
2019-05-29 10:47:01 +03:00
Aleh Zasypkin
580edcd1c1
Introduce Kerberos authentication provider. (#36112) 2019-05-29 10:40:19 +03:00
Liza Katz
963152f3c9
Move filter bar and apply filters to data plugin (#36778)
* Setup filter plugin
With filter_bar and ApplyFiltersPopover
Update imports

* Updated i18n keys

* Typo fix

* update JP translation names
2019-05-29 10:17:35 +03:00
Alexey Antonov
16ab6dda03
Visual Builder duration in second showing as number (#35813)
* Visual Builder duration in second showing as number

Fix: #35641 , #35805

* fix PR comments

* Visual Builder duration in second showing as number

* Visual Builder duration in second showing as number -fix placeholder
2019-05-29 10:10:57 +03:00
Angela Chuang
ac3eb8566b
[SIEM] Replace Eui chart with elastic charts for siem kpis (#36660)
* move charts to separate components

* replace areachart

* apply custom styles

* customize barchart color

* customize color for areachart

* move reusable functions into common

* exchange x & y value in barchart dataset

* replace pure component with react memo and upgrade enzyme adapter
2019-05-29 14:57:38 +08:00
Matthias Wilhelm
90fdb149e0
Remove duplicate fields of rollup based index patterns (#37221)
Rollup fields were were merged twice with other fields, this caused duplicates. Fix of a bug introduced by #28762
2019-05-29 08:52:55 +02:00
Ioannis Kakavas
f1c794045b
Remove validation from OIDC endpoint (#37159)
* Remove validation from OIDC endpoint

This change removes validation of query parameters from the
/api/security/v1/oidc endpoint. It was discovered during manual
testing that Google's OP is sending extra parameters than the ones
identified in https://tools.ietf.org/html/rfc6749#section-4.1.2
which is refernced by
https://openid.net/specs/openid-connect-core-1_0.html#AuthResponse
(for instance auth_user and session_state). The existing validation
rules only allowed the expected query parameters but this
means that Kibana wouldn't be able to complete OpenID Connect
authentication with Google acting as the OP.
As dictated in the standard (RFC6749), "The client MUST ignore
unrecognized response parameters." so we should allow but discard
any extra parameters we do not recognize and not throw an error.

* address feedback

* address feedback

* add validation for the issuer
2019-05-29 07:32:09 +03:00
chongzhe
0ba4dda70e
[Code] change Typescript to TypeScript in UI (#37270) 2019-05-28 18:32:30 -07:00
Mengwei Ding
3f8f36364a
[Code] Reenable lsp_indexer mocha tests and incooporate language filter test cases (#37266) 2019-05-28 16:43:24 -07:00
Joe Fleming
4ff32f03d9
Fix: Fullscreen sizing on old workpads (#37289)
* fix: provide css value for workpads

old workpads were missing this value, this fixes scaling in fullscreen mode

* fix: make workpadCss a required prop

this will cause warnings in the future if the value is missing. also remove the unused css prop.
2019-05-28 16:32:07 -07:00
Matt Bargar
dbb013d425
Fix infinite loop in QueryBarInput's componentDidUpdate (#36946)
We were calling updateSuggestions unconditionally in componentDidUpdate
which in turn called setState unconditionally, so componentDidUpdate
was running in an infinite loop.
2019-05-28 17:10:15 -05:00
Dmitry Lemeshko
ddc24b8255
[visualize/_shared_item] skip test due to #37130 (#37131) 2019-05-28 22:51:07 +02:00
Mikhail Shustov
ab6f0a72f0
Expose plugin contracts to Legacy platform (#37218)
* expose plugin contracts to Legacy platform

* move mapToObject to src/core/utils
2019-05-28 21:12:32 +02:00
Frank Hassanabad
a6847564c8
[SIEM] Fix state issues to avoid potential React update issues (#37261)
## Summary

Fixed prevState issues with React setState
  * This will avoid subtle bugs with the react update renderer
  * Enabled one lint rule from warn to error
  * Turned off the other linter issue as it has an open ticket against it.
  * https://github.com/elastic/ingest-dev/issues/468

Summarize your PR. If it involves visual changes include a screenshot or gif.

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [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~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### 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)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-05-28 13:10:53 -06:00
spalger
a0d75ea59a update yarn.lock file 2019-05-28 11:56:01 -07:00
Melissa Alvarez
e42651823c
[ML] Prevent overflow of large metric values in data visualizer/file data visualizer cards (#36932)
* filedataviz cards - abbrev long numeric values

* add directive for index dataviz values

* Add arg to indicate format. update tests

* truncate with ellipsis

* use eui ellipsis truncation

* increase card content height

* ensure truncation for firefox and safari
2019-05-28 14:41:02 -04:00
Frank Hassanabad
74a2b7f12e
[SIEM] Fixed unescaped HTML entity issue (#37257)
## Summary
  * Turned on linter rule to be an error
  * Removed the extra character
  * https://github.com/elastic/ingest-dev/issues/467

Removes the extra `}` character seen after line 84 below in the screen shot:

<img width="368" alt="Screen Shot 2019-05-28 at 9 39 28 AM" src="https://user-images.githubusercontent.com/1151048/58498271-f4672f00-813a-11e9-8b80-2326db363bb0.png">

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [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~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### 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)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-05-28 12:33:51 -06:00
Xavier Mouligneau
ab4d8b18f3
fix persistence of timeline when you pinned or add a note to an event (#37248) 2019-05-28 14:12:06 -04:00
Frank Hassanabad
1cfad73abd
[SIEM] Low impact linter rules to start with (#37137)
## Summary

Low impact linter rules to help catch bugs for back-porting as well as moving into the future. We will slowly turn the warns into errors and fix the errors as we go along. This helps us avoid a "big bang" switch over approach to avoid back-port issues as we are porting bugs aggressively at the beginning.

Added a custom pattern detection rule for determining if the UI is trying to import anything from the server backend since that would cause web-pack front to pull in backend code. Also forbid the use of NodeJS imports on the front end.  

Double checked that I was not duplicating rules from:
* https://github.com/elastic/kibana/blob/master/packages/eslint-config-kibana/typescript.js
* https://github.com/elastic/kibana/blob/master/packages/eslint-config-kibana/javascript.js

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~
~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~
~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~
~- [ ] [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~
~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

### 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)~
~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
2019-05-28 11:14:17 -06:00
Melissa Alvarez
ca2a66dd26
return false for each jobId if it does not exist (#37116) 2019-05-28 11:58:43 -04:00
Andrew Goldstein
50bd081722
[SIEM] Fixes timeline notes overflowing the modal (#37134)
## [SIEM] Fixes timeline notes overflowing the modal (#37134)

Beginning in Chrome 74 (see elastic/eui#1902), the timeline notes modal can overflow in some browsers, per the _Before_ gif below.

This fix uses `EuiModal` and other `EUI` components to address the overflow issue across all the browsers tested in the gifs below:

### Before (Chrome `74.0`)

![01-before-chrome](https://user-images.githubusercontent.com/4459398/58355997-4d7d4d00-7e33-11e9-864b-7e77d0635116.gif)

### After (Chrome `74.0`)

![02-after-chrome-74 0](https://user-images.githubusercontent.com/4459398/58356028-6128b380-7e33-11e9-8c7d-3022e45b1f41.gif)

### After (Firefox `67.0`)

![03-after-firefox-67 0](https://user-images.githubusercontent.com/4459398/58356056-6ede3900-7e33-11e9-92ca-a6dd8e0b804b.gif)

### After (Safari `12.1.1`)

![04-after-safari-12 1 1](https://user-images.githubusercontent.com/4459398/58356123-a947d600-7e33-11e9-80ab-d6b3d3c601c0.gif)

### After (IE`11.0.9600`)

![05-after-ie-11](https://user-images.githubusercontent.com/4459398/58356131-aea52080-7e33-11e9-989e-51aab7c4e9da.gif)

https://github.com/elastic/ingest-dev/issues/442
2019-05-28 09:55:52 -06:00
Walter Rafelsberger
149160f261
[ML] Fix to not add configs with names which would result in nesting conflicts (#37212)
Two group-by or aggregation names could result in conflicting nested fields which would return an error for pivot previews. For example, two names like responsetime and responsetime.avg are not allowed.

This PR fixes the issue by extending the tests whether a configuration is allowed to be added to the list of group-by and aggregation configurations. If a conflict is detected, a toast notification gets triggered and the configuration won't be added.
2019-05-28 17:46:04 +02:00
Lisa Cawley
03fe26942e
[DOCS] Facilitates content re-use in the monitoring configuration (#37123) 2019-05-28 08:34:53 -07:00
Walter Rafelsberger
4095908adb
[ML] Fix access denied for data frames. (#37178)
With insufficient privileges, a user would be redirected to the ML plugin's access-denied page which mentions the required user roles to access the pages. Since data frames introduces new user roles these messages were not correct.

This PR fixes it by redirecting to a specific access-denied page for data frames. To avoid to much refactoring as a fix, the page is a copy and port to React of the original one. In a follow up for 7.3, we should merge the two pages and it should have options to display required user roles given a certain context like anomaly detection or data frames.
2019-05-28 17:09:12 +02:00
Liza Katz
bc37f86afa
Moved query filter and push filter into filter manager (#36764)
* Moved query filter and push filter from filter bar to filter manager
2019-05-28 17:55:46 +03:00
Brandon Kobel
af34b9f3d5
[docs][skip ci] Infrastructure and Logs read only access (#35566)
* Adding a read only access section to the infrastructure docs

* Adjusting where the infrastructure read only access section is and
adding the logs readonly access section

* Fixing grammar
2019-05-28 10:23:08 -04:00
Daniil Suleiman
be145478c6
Move all switches to the SwitchParamEditor (#37215) 2019-05-28 17:01:12 +03:00
Walter Rafelsberger
959416a8d4
[ML] Data Frames: Fix to avoid queries for indices with more than 1024 fields. (#37183)
- 7.0 introduced indices.query.bool.max_clause_count which defaults to 1024. This can break certain queries (e.g. simple_query) for indices which have more than 1024 fields (e.g. certain beats indices). The optional data frames query uses simple_query and could therefor break the source index preview as well the pivot preview and pivot job itself given these conditions.
- Originally the default query (* used for simple_query) was always applied for source index previews and pivot previews. A new check isDefaultQuery() will now allow a) the source index preview to use a more efficient match_all query and b) avoid adding the query to the pivot config. This avoids triggering the max_clause_count when no optional query is set.
- If an index has more than 1024 fields, the input form for an optional query will be hidden. A helper text explains the reasoning. This avoids triggering max_clause_count related errors from within the UI. A user can still copy a UI created config to the clipboard and add an optional query in Kibana dev console.
- Additionally, this PR adds a fix to format date fields in the source index preview table using moment-timezone and formatHumanReadableDateTimeSeconds to display dates with the correct timezone.
2019-05-28 15:58:48 +02:00
Dmitry Lemeshko
7c556ca337
TSVB: functional test for color picker, preview disable and series clone (#37186)
* [visualize/_tsvb_chart] test for color picker, changing  preview and cloning series
2019-05-28 14:44:46 +02:00
Matthias Wilhelm
7d21cb1c14
Add automatic alignment to gauge visualisation (#34845)
Add flexibility to alignment of multiple gauge vis by supporting the following alignments: automatic, horizontal, vertical. the default is: automatic, it aligns the gauges depending on screen space to horizontal or vertical

Further Adaptions
- sample data
- migration of saved objects
- removal of jquery as depencency
- adaptions of rendering to prevent clipping
2019-05-28 12:39:01 +02:00
Oliver Gupte
255fc9246e
Closes #36992 by fixing path params bug by checking if serviceName even (#37062)
exists in the current pathname
2019-05-28 00:32:08 -04:00
spalger
288f4715d6 Revert "Fix Canvas fullscreen"
This reverts commit f02c78b8b6
2019-05-27 19:36:11 -07:00
Rashid Khan
f02c78b8b6
Fix Canvas fullscreen
Closes #34080

For whatever reason, `Style.it` is unwrapping and dropping the root node of the component it wraps. No idea why. This simply wraps the tree up in a sacrificial `<div/>` for `Style.it` to eat.
2019-05-27 19:25:43 -07:00
Vitali Haradkou
ed29276c5f
[TSVB] markdown variables(revert fix) (#34067)
* add markdown tests
2019-05-28 00:26:28 +03:00
Vitali Haradkou
3c0bc3086a
Tsfy screenshot service and comparepng internal lib (#37177) 2019-05-28 00:09:18 +03:00
Alexey Antonov
80d9a255eb
TSVB: selecting the colour picker crashes Kibana (#37176)
Fix: #37115
2019-05-27 15:42:25 +03:00
Dario Gieselaar
57bc4b8334
[APM] Navigate to default transaction sample (#36223)
* [APM] Navigate to default transaction sample

If the distribution data changes, and the currently selected transaction sample is no longer available, we navigate to the default sample of the latest distribution data.

Previously, a displayed sample would "stick" if the new distribution data did not have a default sample.

Readability improvements

Use location primitives

Simplifies hook logic in TransactionDetails/Distribution by only passing the necessary primitives (pathname, hash, search) to the history.replace() call rather than the full location object. Removes the need for memoization w/ useRef too.

Fix lint error

* Remove unused translations

* Simplify redirectToDefaultSample callback

* Use history.location instead of location prop
2019-05-27 09:17:30 +02:00
Mengwei Ding
d187ba0242
[Code] improve project status polling management (#36841)
* [Code] improve project status polling management

* [Code] Use make repository status polling cancellable

* change back to 1000ms polling interval

* deduplicate repository status polling runner before run
2019-05-26 16:27:43 -07:00
Mengwei Ding
bfadef6daa
[Code] Reset the default search scope (#37014) 2019-05-26 16:27:24 -07:00
Walter Rafelsberger
987b27e381
[ML] Data Frames: Fixes aggregation item overflow. (#37068)
Fixes an issue where long field names would overflow the aggregation item of the pivot config list. This fix was already done for the group-by-items, now brought over to aggregations too.
2019-05-25 18:19:06 +02:00