Commit graph

752 commits

Author SHA1 Message Date
Fuyao Zhao
bb94f4aaaf [Code]: fix duplicate import agains kbn/test/types package, update typescript language server version (#32439) 2019-03-05 10:02:05 +08:00
Fuyao Zhao
6c6e79ec4a Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-03-04 13:59:30 -08:00
Chandler Prall
8b0e3a7de1
Fix IE11 by pinning top-level core-js node module to 2.5.3 (#32159)
* Fix IE11 by pinning top-level core-js node module to 2.5.3

* Re-force core-js in yarn.lock
2019-03-04 12:38:50 -07:00
Mikhail Shustov
d89a97fb14
update @types/node to latest v10 (#32306) 2019-03-01 17:44:10 +01:00
Fuyao Zhao
c4f4f2e982 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-28 22:50:11 -08:00
Spencer
4749c6aab6
[ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948)
In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
2019-02-28 12:06:00 -08:00
Yulong
4511305c2c [Code] specify nodegit commit sha in package.json (#32170) 2019-02-28 09:56:41 -08:00
Mikhail Shustov
8c6b1e5908
Update Typescript to the latest version (#32063)
* bump typescript version to 3.3.3333

* fix tests after updating TS version

* suppress type errors until they fixed appropriately

* address comments

* add type def for UnconnectedKibanaLink

* remove fix @ts-ignore

* fix snapshot test. provide displayName
2019-02-28 17:21:47 +01:00
Mikhail Shustov
5fc7addac5
Update jest to v24 (#31825)
* udpate jest, jest-cli, @types/jest to v24

* fix type error in kibana-i18n package

* return serivce explicitly to fix typings

* add explicit never

* suppress typings errors

* update jest versions in x-pack

* make tests in x-pack more robust and fix incompatibility

* suppress CallCluster mock typings

Mock interface doesn't match CallCluster. Requires
additional work

* x-pack. resolve other typing conflicts

* remove unused types/jest

* fix snapshots

* restore mocks after jest.spyOn

* remove outdated definitions for jest

* cleanup x-pack package.json and update @types/jest

* fix tests merged from master

* updated yarn.lock and log errors for scripts/type_check

* This commit fixes error in TS, which failed on parsing the file.

* suppress type errors from master

* jest-cli is devDep
2019-02-28 13:26:16 +01:00
Jonathan Budzenski
25e7b077c3
remove aws-sdk (#31002)
* rm aws-sdk

* remove references

* readd gitignore

* rm dlls/

* gitignore
2019-02-26 10:01:11 -06:00
Fuyao Zhao
6de9fa00d9 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-22 12:30:12 -08:00
Mengwei Ding
a4cc1d1ae9
[Code] Remove socket.io and use polling message to pull progresses (#31398)
* [Code] Remove socket.io and use polling message to pull progresses

* [Code] refactor the status polling logic

* [Code] fix a minor test issue
2019-02-22 16:12:28 +08:00
Clint Andrew Hall
923f360fab Fix Shortcut EventEmitter Leak/Re-render leaks (#31779) 2019-02-22 09:10:02 +01:00
Tiago Costa
514673c46e
Improve dll plugin relation with webpackshims (#30129)
* chore(NA): remove specific watch for x-pack webpackShims folder.

* chore(NA): remove xpack security plugin angular-ui-select webpackShim.

* chore(NA): bump ui-select version on x-pack to match the one used on oss kibana

* chore(NA): remove manual searching for webpackShim imports into the dll plugin. chore(NA): explicit avoid max dll compilations in all environments for the dll plugin. chore(NA): explicit throw an error and list all the not allowed modules bundled into the dll bundle.

* refact(NA): move ui related actions inside webpackShims to proper ui related files

* chore(NA): move angular ui dependencies from webpackShims to kibana core module.

* test(NA): enable xpack jest tests to be able to resolve plugins/xpack_main/*. refact(NA): rewrite code for the old xpack jquery flot webpackShim.

* refact(NA): use the already declared ui module get to list the dependencies for the kibana legacy core plugin.

* chore(NA): move angular ui requires to a better centralized place.

* refact(NA): rename areMaxCompilationsPerformed to assertMaxCompilations.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): remove unnecessary promise resolve on async function.

* refact(NA): apply changes according pr review.

* refact(NA): change from requires to imports in xpack_main plugin jquery flots.

* refact(NA): jquery flots missing statements.

* fix(na): linting problems.

* chore(na): re add jquery flot requires instead of imports.

* refact(NA): moving jquery flots from require to import. test(NA): fix mock for jquery_flot.

* feat(na): allow dynamic dll plugin public modules on dll bundle.

* feat(NA): step verification to not allow modules from xpack source.

* chore(NA): fix linting problems.
2019-02-22 01:45:42 +00:00
Vitali Haradkou
75e49e667c tests typescript migration (#31234)
* add typescript support for functional tests
2019-02-21 19:38:54 -06:00
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
Fuyao Zhao
be376d1d70 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-19 16:10:27 -08:00
Chandler Prall
bf0efec8b3
Upgrade EUI to 7.1.0 (#31282) 2019-02-15 11:03:52 -07: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
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
Fuyao Zhao
d3ceee5cf1 Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-02-08 17:43:45 -08:00
Court Ewing
0b4f41dc7f
Bump to 8.0.0 2019-02-08 09:04:02 -05:00
Chris Davies
beb4542079
Remove custom WebPack bundles from Canvas (#30123)
This removes the custom build process for Canvas plugins. Canvas plugins are now regular
Kibana plugins. They can register server-side functions like so:

```js
server.plugins.interpreter.register({
  serverFunctions: [yourFunctionsHere],
});
```

And client-side functions need to be included in `uiExports.canvas`, then they need to
register themselves like so:

```js
// kbnInterpreter is a global, sadly, but it makes registration simple
kbnInterpreter.register({
  elements: [yourElementsHere],
  browserFunctions: [yourFnsHere],
});
```
2019-02-08 08:42:03 -05:00
Nathan Reese
ae580e3a26
[Maps] upgrade mapboxgl to 0.52.0 (#30431) 2019-02-07 18:30:56 -07:00
Chandler Prall
b47a92cfa9
Upgrade EUI to 6.10.1 (#30404) 2019-02-07 15:00:56 -07:00
Court Ewing
6f2a1c1933
Revert "bump to 8.0.0 (#30246)" (#30337)
This reverts commit 661ac59116.
2019-02-06 21:16:01 -05: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
Court Ewing
661ac59116
bump to 8.0.0 (#30246) 2019-02-06 10:04:54 -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
dave.snider@gmail.com
fafa9fa9ae
EUI 6.8.0 (#29860)
Upgrades Kibana's EUI dep.
2019-02-01 14:38:46 -08:00
Fuyao Zhao
1e25ad87b1 [Code]: Upgrade typescript server version 2019-01-31 15:16:03 -08: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
Josh Dover
908db0de07
[7.0] Add reindex feature to Upgrade Assistant (#27457) (#29516) 2019-01-29 17:55:35 -06:00
Fuyao Zhao
7172f61f7e Merge remote-tracking branch 'origin/master' into feature/merge-code 2019-01-28 18:53:12 -08:00
Nathan Reese
2f70a23372
upgrade to eui 6.7.2 (#29387) 2019-01-25 15:42:13 -07: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
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
Jason Rhodes
a11e471420
Updates React et al to 16.6 (#24707)
* Updates react to 16.6 (latest)

* Updated fragment-based snapshots for Kibana root unit tests

* Updated fragment-based snapshots for x-pack unit tests

* Removed xpack yarn.lock file bc it is no longer needed, it was reintroduced by accident during a rebase in this branch

* React 16.6 snapshot updates, round 2 (mostly Fragment snapshot diffs)

* Updated last round of React 16.6 snapshots

* Fixes query bar issue with 16.4 gDSFP lifecycle

* Updated yarn lock (arraybuffer.slice updated)

* Updates snapshots where executeQueryOptions prop appears
2019-01-23 13:46:09 -05:00
Fuyao Zhao
c391ec71a1 Code: Upgrade typescript language server version 2019-01-22 15:01:10 -08:00
spacedragon
a9b3fe1421 [Code] use master version of our nodegit 2019-01-23 00:42:04 +08:00