Commit graph

2666 commits

Author SHA1 Message Date
Fuyao Zhao
240eac612c Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-21 14:28:32 -08:00
Joel Griffith
a6ed6a3b24
Using content-disposition pkg for non-US font titles in reporting (#30895)
* Using content-disposition for non-US font titles in reporting
2019-02-21 09:18:01 -08:00
Felix Stürmer
6e31c1d127
Upgrade react to 16.8.3 (#31268) 2019-02-21 11:27:35 +01:00
Andrew Goldstein
437bba3dec
# Inline Notes, With Markdown (#31562)
Notes can be added inline, with Markdown, to events in a timeline:

![inline-notes-with-markdown](https://user-images.githubusercontent.com/4459398/53070177-80fab500-349b-11e9-85b1-0e1c356e3a05.gif)

In the animated gif above, the [Kibana README.md](https://raw.githubusercontent.com/elastic/kibana/master/README.md) is pasted as a markdown note in a timeline, and rendered inline.

### You may link to animated gifs in timeline notes:
![link-to-animated-gifs](https://user-images.githubusercontent.com/4459398/53075549-b22eb180-34aa-11e9-8e7a-cf41f52338e9.gif)

META WARNING: In the animated gif above, an animated gif of notes being added to a timeline is added to a timeline.

* The Notes modal also supports Markdown

# Who's Viewing

See who's currently viewing a timeline:
![who-is-viewing](https://user-images.githubusercontent.com/4459398/53069720-375d9a80-349a-11e9-8de4-5b2ebae88bec.gif)

# Other Changes
* fixed styling issues associated with the latest merge from `master`
* migrated more styles and layout to `EUI`
* refactored some components to support re-use

https://github.com/elastic/ingest-dev/issues/293
https://github.com/elastic/ingest-dev/issues/294
2019-02-20 22:48:56 -07:00
Fuyao Zhao
be376d1d70 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-19 16:10:27 -08:00
Marco Vettorello
00fbc2572e
Removed old package, fix import (#31428) 2019-02-19 12:23:03 +01:00
Spencer
a48a03cd3e
Revert "Replace Leadfoot with WebDriver API (#26477)" (#31382)
* Revert "Replace Leadfoot with WebDriver API (#26477)"

This reverts commit 0bd3b4fdfb.

* leadfoot expectes execute args to be an array

* disable flaky graphql tests
2019-02-17 18:59:03 -08:00
Dmitry Lemeshko
0bd3b4fdfb
Replace Leadfoot with WebDriver API (#26477)
* [services/browser] switch to webdriver API

* [services/find] switch to webdriver API

* [services/remote] update to use webdriver service

* rename WebDriver service

* [services/remote] remove browser_driver_api

* [services/find] update to use WebDriver element wrapper

* [services/web_element_wrapper] use wrapped elements

* [services/find] use element wrapped moveMouseTo function

* [services/find] fix webdriver service init, add missing functions

* add missing functions for Leadfoot Element API

* [services/web_element_wrapper] add search by tag name

* tune WebDriver API calls to match Leadfoot

* Fixed implementation of moveMouseTo that is causing el.getClientRect error.

* fix references to WebElementWrapper

* [services/find] fix findElement call on webElementWrapper object

* fix issues in find and test_subject services

* [web_element_wrapper] add search by partial link text

* [services/find] adjust wrapper functions with Leadfoot API to support tests

* fix dragAnDrop & filer on elements displayed

* [visualise_page] improve searching of bucket element

* [discover_page] wait for visualisation loaded + dragAndDrop

* [service/find] fix exists, add pressKey for element

* fixes for visualize tests

* [services/browser] update dragAnddrop

* Made change to test to use move() code path in drag and drop.

* tune page objects for chart tests

* fix discover & xpack tests

* [page_objects/upgrade_assistant] fix locator

* [page_objects/discover_page] retry on brushHistogram to fix staleElementException

* update dragAndDrop, retry on getHeaders

* retry on getTextTag

* [services/screenshots] fix webdriver image take

* skip histogram brushed test & remove --bail

* use legacyAction for dragAndDrop with offset

* add missing await

* page objects update

* increase mocha timeout to 5 min

* use data-rendering-count to track visualization loading completion

* adjust waitForVisualizationRenderingCompleted

* [page_objects/visualize_page] add waiting for visualization

* fixes for xpack functional tests

* improve logging in find & testSubjects

* [services/find] fix wrapped element usage

* [page_objects/visual_builder_page] use BACK_SPACE key, supported by WebDriver

* page objects fix

* [services/test_subjects] add async/await

* [visualize/_tile_map] add missing await in tests

* fix tile_map tests for webdriver

* replace bluebird.prop with async/await

* try to wait for rendering in openLegendOptionColors

* additional logs in find.allByCssSelector

* [services/find] fix implicit wait  handling

* fix mapping in getRowsFromTable

* add timeouts and waitForVisualisation in failed tests

* [services/test_subjects] set default timeout to FIND_TIME

* [services/test_subjects] replace bluebird.filter with for loop

* replace retry.try with waitForVisualisation

* add 'visualize' PO import

* [services/web_element_wrapper] add scrollIntoView support

* fixing kibana-intake

* fixes after merging master

* Switching browser temporarily to firefox to get a CI run on FF.

* set chrome back to default browser

* print logs for some WebElementWrapper functions

* fix _wrap function

* update NOTICE.txt

* Fixed some firefox config to get the browser working. Consolidated some of the calls to build out the driver.

* Cleaning driver instance creation

* Added network throttling option for chrome.

* fix implicit wait setting

* uncomment bail

* adjust waiting for timepicker popup

* [services/inspector] process table in sequence

* Added conditional for TEST_THROTTLE_NETWORK option along with updating the speed and comments.

* add cheerio checks

* [services/apps_menu] get links quicker via innerHtml

* install webdriver dependency via yarn

* [services/combo_box] wrap getComboBoxSelectedOptions with retry

* remove leadfoot

* [testSubjects] remove unnecessary method

* [ftr/browser] explicitly export specific keys, keep `BACKSPACE` name

* Revert "[ftr/browser] explicitly export specific keys, keep `BACKSPACE` name"

This reverts commit 779335f2d4.

* [ftr/filterBar] allow finding filters even if they're off the page

* [webdriver] write verbose logs

* [webdriver] shim executor to run all commands in series

Best we can tell WebDriver locks up sometimes when we send too many
commands at once, sometimes... It causes random lockups where we never
receive another response from WedDriver and we don't want to live with
that risk, so for now I've shimmed the Executor class in WebDiver to
queue all calls to Executor#send() if there is already a call in
progress.

* [webdriver] add comment about why we're shimming

* [webdriver] fix queue, actually put things there and take things off

* run all functional four times per build

* [webdriver] extract preventParallelCalls to test it

* Revert "run all functional four times per build"

This reverts commit f91996d977.
2019-02-16 08:29:29 +01:00
Chandler Prall
bf0efec8b3
Upgrade EUI to 7.1.0 (#31282) 2019-02-15 11:03:52 -07:00
Joe Reuter
562edd6578
Downgrade vega to 4.3 (#31274) 2019-02-15 17:50:09 +01:00
Clint Andrew Hall
3727b5355a
[Canvas] Storybook for testing and development (#29072)
## Summary

This PR adds [Storybook](https://storybook.js.org/) to our testing and development suite.

![screen shot 2019-01-21 at 4 35 32 pm](https://user-images.githubusercontent.com/297604/51502196-9f856780-1d9a-11e9-97bf-07c99c3f279b.png)

This will allow us to:

1. create a site outlining all components within Canvas, including their TS type information;
2. demonstrate usage of all components by example;
3. allow for individual component testing, both manually and by Jest;
4. iterate and fix bugs on individual components *without* having to start up Kibana, in a [HMR](https://webpack.js.org/concepts/hot-module-replacement/) environment;
5. automatically generate [snapshots](https://jestjs.io/docs/en/snapshot-testing) based on any examples written;

This PR also converts a few components to Typescript and adds examples.

## How this can help us, (with examples)

I was inspired to add this when I was fixing #25342.  In order to fix my changes, I had to run elasticsearch and kibana, as well as refresh my page whenever I needed to test a change.  Had I had a Storybook instance, I would have been done much faster.

In this PR, you'll see I converted `AdvancedFilter` from `renderers` and `FontPicker` and `ImageUpload` from `public/components`.  Would you believe I discovered and fixed bugs just by converting to Typescript and writing examples?

### `AdvancedFilter`

- `onChange` and `commit` are not marked as required in `propTypes`, but the component will error out if they're not supplied.
- `commit` was actually being called twice when 'Apply' was clicked.  This was shown in the 'Actions' panel when I was testing it.

### `FontPicker`

- The `fonts` collection was not strongly-typed, therefore any string could be passed to the `value` parameter without error.
- While the code allows for any font string to be given to the component, there is no way to currently select that value, nor type it in within the control.  This is likely a bug in design.
- The `aria-labeledby` attribute in the drop down includes `undefined`.  This is likely a bug in EUI:

![screen shot 2019-01-21 at 4 25 58 pm](https://user-images.githubusercontent.com/297604/51501908-5ed91e80-1d99-11e9-913a-ce1bb5f4e352.png)

## How to use

- `cd x-pack/plugins/canvas/`
- Run `node scripts/storybook` to start up a local development version, with HMR.
- Run `node scripts/storybook_build` to build a complete static version of the book.
- Run `node scripts/jest` which will run the Storyshots test; run `node scripts/jest --updateSnapshot` if source code has changed as expected.

## Future Work

- Adding Jest coverage and output to the info panels, ([this](https://www.npmjs.com/package/@storybook/addon-jest) is *sick* functionality).
- Adding automatic [a11y testing](https://www.npmjs.com/package/@storybook/addon-a11y), (currently [blocked](https://github.com/storybooks/storybook/issues/4889)).
- Adding generic knobs for stories
- Adding more example info, (e.g. who edited last, descriptions, etc).
2019-02-15 10:35:30 -06:00
Fuyao Zhao
75e349712d Code: fix type errors and remove uneccesary deps 2019-02-14 13:09:30 -08:00
Pengcheng Xu
4a263e4543 [Code] Fix Java launcher (#31109)
* [Code] Fix Java launcher

* [Code] Ignore changes of java_langserver during development mode
2019-02-14 10:35:23 -08:00
Larry Gregory
c4a161b4c9
removes unnecessary url-parse dependency (#31029) 2019-02-14 06:36:39 -05:00
Joe Reuter
2ede2e330e
Update vega to version 4 (#30628) 2019-02-14 11:35:05 +01:00
Fuyao Zhao
572a2b56c4 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-13 22:54:21 -08:00
Jonathan Budzenski
5b545ca8a0
remove pivotal-ui (#30975) 2019-02-13 15:44:02 -06:00
Nathan Reese
892ccc241a
bump EUI to 7.0.0 (#30980) 2019-02-13 11:55:28 -07:00
Garrett Spong
44ec857719
Merge branch 'master' of https://github.com/elastic/kibana into feature-secops 2019-02-11 15:23:30 -07:00
Mike Côté
e60d6d119d
Clone saved object document before migrating to prevent accidental mutations (#30475)
* Clone saved object document before migrating to prevent accidental mutations

* Add tests

* Add example comment

* Use latest version of lodash cloneDeep

* Revise spaces functional tests to use same sample data.

* Fix broken test
2019-02-11 16:01:12 -05:00
Aleh Zasypkin
088d5f6919
Add zh-CN.json translations and respective compatibility checks via i18n tools (#30378) 2019-02-11 14:39:59 +01:00
WangQianliang
e7e4491a87 fix(code/frontend): close import modal after import project (#29917) 2019-02-08 21:11:00 -08:00
Fuyao Zhao
d3ceee5cf1 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-08 17:43:45 -08:00
Larry Gregory
3fba1f3fd5
Upgrade grunt to 1.0.3 (#30504) 2019-02-08 16:15:27 -05:00
Frank Hassanabad
f63073f80c
Added toaster alerts for errors (#30332)
* Added Toaster alerts for when you have Apollo GraphQL data integrity errors
* Added Toaster alerts for when you have Networking errors from Apollo GraphQL
* Added  apollo-link-error package
* Added it as a link to the http linking of Apollo
* Wired up the Toasters to it
* https://github.com/elastic/ingest-dev/issues/89
2019-02-08 13:26:33 -07:00
Spencer
120606d037
[yarn] upgrade to @elastic/makelogs 4.4.0 (#30447) 2019-02-07 17:36:26 -08:00
Nathan Reese
ae580e3a26
[Maps] upgrade mapboxgl to 0.52.0 (#30431) 2019-02-07 18:30:56 -07:00
Xavier Mouligneau
28f9b68ca1
Fix re-rendering (#30034)
* fix rerendering

* fix re-rendering on timeline

* rename props to match with reality + add memoize-one

* put back Ecs data instead of EcsEdges to not change props of body component

* change "@types/memoize-one" to be a dev dependency

* fix unit testing + some review

* cleanup
2019-02-07 17:09:42 -05:00
Chandler Prall
b47a92cfa9
Upgrade EUI to 6.10.1 (#30404) 2019-02-07 15:00:56 -07:00
Spencer
9ce8a7d131
[yarn] upgrade elasticsearch-js (#30294) 2019-02-06 13:58:02 -06:00
Jason Rhodes
a64ed95b84
[APM] Updates head title and fixes breadcrumb string issues (#29960)
* Solves several breadcrumb string/object problems, adds title to page

* Updates breadcrumb tests and adds title tests

* Removes switch logic from route config in favor of a single switch around all routes

* Adding draft version of withBreadcrumbs HOC with TS errors

* ProvideBreadcrumbs implemented

* Adds tests to provide breadcrumb logic

* Fixed up generics and tests
2019-02-06 12:04:12 -05:00
Caroline Horn
f8c7320277
EUI 6.10.0 & Background color fixes (#30136)
* First foray into turning .application background off

* Hopefully fixing the last few plugins

* Update EUI to 6.9.0

* removing hacks

* last fixes

* Remove a few more `100vh`

* Can I remember to copy & REPLACE

* EUI at 6.10.0
2019-02-05 21:29:30 -05:00
Tiago Costa
4cec19d9ea
Upgrade thread loader (#27518)
* chore(NA): update thread-loader version.

* chore(NA): upgrade to thread-loader 2.1.0.

* chore(NA): update thread-loader to 2.1.1

* chore(NA): bump thread loader version to 2.1.2
2019-02-06 00:45:15 +00:00
Chris Davies
ebd3a82643
Remove WebSockets from Canvas expressions interpreter (#29792)
This modifies the interpreter to use REST instead of WebSockets.
2019-02-05 11:51:45 -05:00
dave.snider@gmail.com
fafa9fa9ae
EUI 6.8.0 (#29860)
Upgrades Kibana's EUI dep.
2019-02-01 14:38:46 -08:00
Court Ewing
7a87f03ec7
Introduce content security policy (CSP) (#29545)
* csp: nonce and unsafe-eval for scripts

To kick things off, a rudimentary CSP implementation only allows
dynamically loading new JavaScript if it includes an associated nonce
that is generated on every load of the app.

A more sophisticated content security policy is necessary, particularly
one that bans eval for scripts, but one step at a time.

* img-src is not necessary if the goal is not to restrict

* configurable CSP owned by security team

* smoke test

* remove x-content-security-policy

* document csp.rules

* fix tsconfig for test

* switch integration test back to regular js

* stop looking for tsconfig in test

* grrr, linting errors not caught by precommit

* docs: people -> you for consistency sake

Co-Authored-By: epixa <court@epixa.com>
2019-02-01 17:11:38 -05:00
Caroline Horn
b1b941dd8f
Finally remove leftover LESS files (#29486)
* Use mixin for full screen graphics

- Moved svg assets to one folder under `ui/public/assets/images`
- Deleted .less files

* Fix Kibana logos as well

* forgot to remove

* adds dark mode images

* Removed search_select

In favor of pattern to be created in EUI : https://github.com/elastic/eui/issues/1498

* No LESS in plugin generator

* remove comment

* Remove .less from testbed

* snaps

* Update dark mode graphics to be a bit lighter

* [karma] load css via url, rather than webpack

* [karma] css isn't built at config time, concat at request time
2019-02-01 01:35:25 -05:00
Fuyao Zhao
1e25ad87b1 [Code]: Upgrade typescript server version 2019-01-31 15:16:03 -08:00
Maryia Lapata
17bb0d0483
Update kbn-i18n dependencies (#29699) 2019-01-31 15:54:22 +03:00
Fuyao Zhao
39f1ac00c4 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-30 11:51:13 -08:00
Nathan Reese
6e6be37f2b
update to eui 6.7.4 (#29560)
* update to eui 6.7.4

* remove use of euiHeaderChildSizeMobile for xs header check
2019-01-30 10:20:56 -07:00
Fuyao Zhao
7172f61f7e Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-28 18:53:12 -08:00
Spencer
2cb94be6fd
[sass] copy and rename url()s from sass files (#29306)
* [sass] copy and rename url()s from sass files

* [yarn] upload yarn.lock

* [optimize/bundlesRoute] fix tests

* Fix error message

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

* [sass/build] copy assets async

* [sass/build] prevent url() errors from breaking watchers, make more obvious

* [sass/build] check resolve first, print sourcePath for error

* [sass/build/tests] avoid quotes in snapshots

* [sass/build] add support for using ui/public/assets

* [sass/build/tests] fix assertion, assert image is copied

* update jest snapshots

* [sass/build] test ui/assets handling

* [sass] use more generic publicPath for sass
2019-01-28 14:00:22 -08:00
Nathan Reese
2f70a23372
upgrade to eui 6.7.2 (#29387) 2019-01-25 15:42:13 -07:00
Spencer
4f4768507d
[yarn] upgrade caniuse-lite and browserlist (#29358)
An old version of caniuse-lite was added somehow and it is logging with `console.log` to instruct us to update, which I find very aggressive but I suppose is also effective...

![image](https://user-images.githubusercontent.com/1329312/51757558-8faaa380-2078-11e9-8af2-5dba0577a16d.png)
2019-01-25 09:32:57 -08:00
Xavier Mouligneau
3b51264eb3 Merge branch 'master' of github.com:elastic/kibana into feature-secops 2019-01-25 11:46:32 -05:00
Nathan Reese
e320d511c1
Upgrade to EUI 6.7.0 (#29330)
* Upgrade to EUI 6.7.0

* comment out tests that are broken by brittle selector
2019-01-25 08:47:16 -07:00
Søren Louv-Jansen
dc3a354b3e
[APM] Use idx everywhere for picking deeply nested properties (#29297) 2019-01-25 10:43:07 +01:00
Fuyao Zhao
602d39678f Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-24 15:03:13 -08:00
Søren Louv-Jansen
9d33143ff9
[APM] Remove v1 and make required ECS changes (#28068)
* [APM] ECS changes

* Remove ambient types for idx

* Update `observer.listening`

* Added type safety to property config

* More ECS updates

* Juan fixes for ECS
2019-01-24 12:13:14 +01:00