Commit graph

23067 commits

Author SHA1 Message Date
Spencer 8d92a940fa
[ts] add script to verify that all ts is in a project (#32727)
Based on #32705 

We currently have TypeScript code that was backported to 7.0, which was backported without issue because it falls outside of any TypeScript projects in 7.0. This means that the pre-commit hooks break on changes to these files, and that they are not getting type checked by the type_check script. To fix this we need to verify that every typescript file in the repository is covered by a tsconfig.json file as part of CI.
2019-03-08 13:51:55 -08:00
Spencer 5f6ff8b4c2
[jest/junit] fix junit reporter (#32686)
Fixes https://github.com/elastic/kibana/issues/32619

With #31825 the reporter contract changed slightly and this updates our custom reporter to fix our junit reports.
2019-03-08 13:46:01 -08:00
spalger 10d27eacbb [ci] build packer cache for other branches 2019-03-08 13:25:16 -08:00
Andrew Cholakian be952c9e35
[Uptime] Add i18n to plugin name in sidebar (#32586)
Fixes https://github.com/elastic/kibana/issues/32052
2019-03-08 15:03:47 -06:00
Spencer 441c3dddbe
[ci] derive bootstrap cache path from base branch, make optional (#32793)
* [ci] derive bootstrap cache path from base branch, make optional

* describe the path we're looking for in warning

* use PR_TARGET_BRANCH, not PR_SOURCE_BRANCH
2019-03-08 12:38:52 -08:00
Spencer ccb3a51f12
[master] [reporting/autoDownload] default to true when not in distributable (#32803) (#32805)
Backports the following commits to master:
 - [reporting/autoDownload] default to true when not in distributable (#32803) (3c3183f)
2019-03-08 12:35:50 -08:00
Clint Andrew Hall 41e68ebbe9
[intepreter][Canvas] Dedupe server functions in batched requests (#32712)
* [intepreter][Canvas] Dedupe server functions in batched requests

* Add and correct tests
2019-03-08 13:15:58 -06:00
Casper Hübertz 9e486077b6
[APM] Design - General layout updates (#32750)
* Remove default background color

* Wrapping graphs and tables in EuiPanel

* Adding titles to Transactions and Errors list tables
2019-03-08 20:09:44 +01:00
Joe Fleming d88f90186e
Fix: show actual errors on failed elements, handle null values from functions (#32600)
Closes https://github.com/elastic/kibana/issues/32356 

This PR fixes two issues.

The first there was an issue filed, #32356:

- Show non-Boom errors instead of asking users to look at server logs
  - Also write the error to the server when asking them to look there

### Before

![](https://user-images.githubusercontent.com/404731/53673728-9368b180-3c46-11e9-912e-7aaff25d3ddf.png)
*If the function failed for some reason, this is all you'd ever see*

### After

![screenshot 2019-03-06 16 24 09](https://user-images.githubusercontent.com/404731/53921029-4d3b9580-402c-11e9-85bf-21ab31e952bc.png)
*Errors are shown to the user*

![screenshot 2019-03-06 16 26 16](https://user-images.githubusercontent.com/404731/53921130-a0154d00-402c-11e9-9cb5-102d360a69f8.png)
*Code errors bubble up correctly as well*

---

The other I didn't bother opening an issue for:

- Fixes issue where functions that return `null` produce an error message
  - `null` is a valid thing to return, it's only `undefined` that causes a problem
  - This was only a problem for server functions that return `null` (currently, none of them do)
  - Introduced in #31298
  - Discovered when I ran into casting problems (see https://github.com/elastic/kibana/issues/32597)

### Before

![screenshot 2019-03-06 16 18 17](https://user-images.githubusercontent.com/404731/53921039-562c6700-402c-11e9-9650-fc51d1f91643.png)

### After

![screenshot 2019-03-06 16 19 01](https://user-images.githubusercontent.com/404731/53921044-5cbade80-402c-11e9-9cde-fdb49334dcd0.png)
2019-03-08 11:48:11 -07:00
Mike Côté 7cf91316ca
Basic server side import API for saved objects (#32158)
* Initial work

* Add overwrite and skip support

* Cleanup and add tests

* Move code into separate files

* Remove reduce

* New API parameters

* Add support to replace references

* Add better error handling

* Add spaces tests

* Fix return type in collectSavedObjects

* Apply PR feedback

* Update jest tests due to jest version upgrade

* Add docs

* WIP

* Split import routes pt1

* Add tests

* Fix broken tests

* Update docs and fix broken test

* Add successCount to _import endpoint

* Make skip by default in resolution API

* Update tests for removal of skips

* Add back support for skips

* Add success count

* Add back resolve import conflicts x-pack tests

* Remove writev from filter stream

* Delete _mock_server.d.ts file

* Rename lib/import_saved_objects to lib/import

* Filter records at stream level for conflict resolution

* Update docs

* Add tests to validate documentation

* Return 200 instead of other code for errors, include errors array

* Change [] to {}

* Apply PR feedback

* Fix import object limit to not return 500

* Change some wording in the docs

* Fix status code

* Apply PR feedback pt2

* Lower maxImportPayloadBytes to 10MB

* Add unknown type tests for import

* Add unknown type tests for resolve_import_conflicts

* Fix tslint issues
2019-03-08 13:18:36 -05:00
Pete Harverson a1a9511446
[ML] Edits data recognizer modules to use KQL in saved objects (#32766) 2019-03-08 16:35:20 +00:00
Caroline Horn 59ad77d5cb
[Vis Editor] Fix geohash checkbox group spacing (#32664)
- And alignment of text in visEditorSidebar__collapsibleTitle
- And size of advanced toggle text
2019-03-08 10:33:23 -05:00
Casper Hübertz 3a3211b72a
[APM] Distribution histogram - Replaced custom tooltip with EuiIconTip (#32753)
* Replaced with EuiIconTip
2019-03-08 16:02:42 +01:00
Søren Louv-Jansen d2e16b5da5
[APM] Improve types for tabs and properties table (#32462)
* [APM] Improve types for tabs

* Update translations

* Rename Tab to PropertyTab

* Add comment about agent names
2019-03-08 10:15:52 +01:00
James Gowdy cc7788d537
[ML] Removing duplicate calendars list in job management (#32647) 2019-03-08 08:03:04 +00:00
Robert Monfera c59db910c3
[Canvas] Fix: lose element selection on page flip (#32111)
* Fix: lose element selection on page flip

* Fix: remove selection in Redux too (PR feedback from Joe)
2019-03-08 07:06:17 +01:00
Mat Schaffer 87f1befd18
Swap defaultAddId with defaultRoute in example config (#28547)
Connected to https://github.com/elastic/kibana/issues/6902
2019-03-08 14:38:31 +09:00
Jen Huang 7afd091ecb
Move license constants from /server to /common (#32723)
* Move license constants to /common

* Fix export

* Use constant for required license type

* Remove OSS from license types
2019-03-07 20:55:20 -08:00
Spencer a854a1157c
[dev/run] typescriptify the dev/run helper (#32705)
Simple typescript conversion of the `src/dev/run` helpers.
2019-03-07 20:26:10 -08:00
Nathan Reese c91e940103
[Maps] replace angular serviceSettings service with EmsClient (#32725)
* [Maps] replace angular serviceSettings service with EmsClient

* clean up
2019-03-07 20:09:55 -07:00
Eli Perelman 78cbe42982
Prefer third-party plugin development in ./plugins instead of ../kibana-extra (#31748)
* Prefer third-party plugin development in plugins instead of kibana-extra

* Fix failing recursive directory creation and removal

* Add new built version of kbn-pm
2019-03-07 17:04:29 -06:00
Caroline Horn 1c55034e9f
[Fix] Remove gutter from advanced settings code blocks (#32700)
but also add a slight left border to the gutter for other possible instances on white backgrounds
2019-03-07 17:41:18 -05:00
Brandon Kobel f96c39e492
Upgrading handlebars (#32699) 2019-03-07 14:10:43 -08:00
Catherine Liu 35e7e4c13f
Added del as shortcut for deleting elements on osx (#32704) 2019-03-07 14:52:16 -07:00
Jason Rhodes 8c7ca7f50a
[APM] Moving the date picker into APM (#31311)
* WIP moving the date picker into APM

* Stable version of EUI date picker controls, still needs layout

* Flex layout for kuery bar and date picker

* Removes angular time picker logic and layout

* Fixes snapshot test

* Adds integration tests for date picker

* Simplifies refresh cycle with setTimeout over requestAnimationFrame

* Removes rison and local state from APM date picker flow

* Adds refresh tests, fixes some refresh logic

* Moves temporary EUI types out of component

* Moves toBoolean helper and fixes TS error

* Removes unused Link import

* Types for datepicker (WIP)

* Updates default date picker values after merging in Søren's type changes

* Streamlines new APM query types to prevent duplication

* Uses jest fake timers for refresh tests

* Updates url handling to remove Rison from APM URLs, keeps Rison in outgoing Kibana links

* Move filter bar up and out from within a react-redux-request to avoid catch-22 circular dependency

* Separates rison encoding from regular url handling

* Sets start and end defaults in urlParams reducer

* Adds IUrlParams type to initial state with correct typing

* Updated rison-related snapshots

* Resolves failing tests related to query param management

* Adds more tests for Kibana Link and Kibana Rison Link components

* Re-enables the update button for the EUI super date picker

* Adds more Discover link tests

* Moved getRenderedHref to testHelpers, switched Discover Links integration tests to TS, and added ML link integration test

* Changes how getRenderedHref works to make it clearer where location state is coming from

* Updates obsolete snapshot

* Fixes typescript-discovered errors and type errors

* Finishes up url_helpers tests, removes dead commented tests

* Removes temporary date picker types from APM

* Fixes common case for an existing URL bug by not encoding range params
2019-03-07 16:22:02 -05:00
Joe Fleming 215c8ea252
feat: import and use clear function (#32589) 2019-03-07 13:17:02 -07:00
nicknak bb437d62e5
Testing/Removal of throw on console error (#29983)
* Use hosts instead of url for elasticsearch.

* Adds jest integration tests to run in xpack intake.

* Reverting the exclusion of throwing errors in tests.

* Strange test that seems to fail without console error exception being thrown.

* Fix issues with wrong props for EuiInMemoryTable.

* Removes the masking of console errors in tests.
2019-03-07 14:21:11 -05:00
Jen Huang 44bf9490ed
Change errors to be thrown instead of returned (#32670) 2019-03-07 10:41:46 -08:00
Catherine Liu 45149c06ab
[Canvas] Improvements to Expression Editor (#32336)
* Added font size controls and expand/shrink button to expression editor

* style the expression editor controls

* Removed debug code
2019-03-07 11:22:35 -07:00
Spencer 4dc67d7542
[ci] remove hash -r, its taking 2 minutes and maybe unnecessary (#32616)
Noticed that this step takes like 2 minutes on CI, and I'm pretty sure I only added it without knowing it was necessary, so trying out removing it.
2019-03-07 10:01:34 -08:00
Thomas Neirynck cbe114856a
[Maps] Add help menu (#32561) 2019-03-07 12:56:08 -05:00
Mikhail Shustov b976694989
[New platform] Expose NP core services and plugins contracts to the legacy server (#32468)
* expose NewPlatform core and plugins to legacy server

* get rid of .core in favor of .newPlatform

* decalre start/stop contract explicitly

* expose newPlatform typings

* Remove dependency on legacy package_json util from core

* Remove dependencies on core/server in core/types
2019-03-07 17:26:22 +01:00
gchaps 1d31c2768b
[DOCS] Updates doc for 8.0 Upgrade Assistant (#32528) 2019-03-07 08:13:34 -08:00
Pete Harverson 44ae1b2cc2
[ML] Plot chart points for all anomalies where no metric data (#32645)
* [ML] Plot chart points for all anomalies where no metric data

* [ML] Clean up arrow functions following review
2019-03-07 15:45:46 +00:00
Josh Dover c03e9a02c7
Compile server TypeScript code before browser (#32578) 2019-03-07 09:26:18 -06:00
Mikhail Shustov d98538bf48
[New platform]Expose NP core services to the legacy UI (#32480)
* Expose NP core services to the legacy UI

* declare start/stop explicitly

* simplify typings + renaming
2019-03-07 16:08:51 +01:00
Mikhail Shustov a188f53e21
[New platform] Add the service level mocks for server side (#32300)
* add LoggingServiceMock

* add configServiceMock

* add httpServiceMock and elasticsearchServiceMock

* use elasticsearch.startContract instead of inlined declarations

* add createStartContract factory
2019-03-07 15:18:37 +01:00
Felix Stürmer cd47c97054
[Logs UI] Use log message field configured in the yaml file (#32502)
This fixes the message reconstruction rules to actually use the `xpack.infra.sources.default.fields.message` field configuration from the Kibana config file.

fixes elastic/kibana#31355
2019-03-07 15:17:21 +01:00
Philipp B 16f9e25916
[ML] (Accessibility) "Analyzing Data" should announce (#32472)
* [ML] (Accessibility) "Analyzing Data" should announce

* moved aria role to the header tag
2019-03-07 16:43:32 +03:00
Jason Rhodes ae754ac607
Upgrades EUI to 9.x (#32009)
* Fixed a simple argument bug and removed infra date picker EUI types

* Fixes for EUI date picker types

* eui_8.0.0

* fix type errors in query_bar

* Small changes for EUI types

* Updates EUI to 9.0.0 and removes @types/react-datepicker as it now ships with EUI

* Updates to EUI 9.0.1 and removes duplicate types in infra eui.d.ts

* ts-ignore applied to ongoing type error with styled components and EUI

* Changes EuiProgress props to avoid TS errors

* Updates EUI 9.0 snapshots

* Updates kibana root snapshots for EUI 9.0 upgrade

* Update detail_panel.test.js for EUI changes

* Updated functioanl and unit tests to properly inspect EuiTableRowCell rendered values

* Fix docs_level_security_roles.js func tests

* Update EUI to 9.0.2

* Fixed failing snapshot for EUI icon default prop
2019-03-07 07:03:11 -05:00
Liza Katz 7c2df0a5d3
presort items if there's no search query, but keep table state unsorted (#32583) 2019-03-07 12:47:18 +02:00
Daniil Suleiman 289bb66998
Add max, min, placeholder to percentile in TSVB (#32389)
* Add max, min, placeholder to percentile

* Fix adding new percentile with empty value
2019-03-07 12:34:45 +03:00
James Gowdy 37c47f60e7
[ML] Adding calendars list to job management (#32566) 2019-03-07 09:28:39 +00:00
Daniil Suleiman 6d1f0072f5
Fix table vis format date string when grouping by date field (#31783)
* Fix table vis format date string when grouping by date field

* Use DateFormat instead of moment directly

* Add a pivot_type while selecting a pivot value in table

* Move fetchFields into a separate function

* Move setDefaultIndexPattern to ReactEditorControllerProvider
2019-03-07 12:27:19 +03:00
Vitali Haradkou 2e6efe55b8
supporting tags for mocha definition (#32474) 2019-03-07 11:40:53 +03:00
Alexey Antonov 787bdb800e
TSVB display interval information when building (#32117) 2019-03-07 11:13:51 +03:00
Alexey Antonov 994cc6c308
[TSVB] Incorrect behavior when filling the 'interval' field with values: s,m,d,M,y (#32542) 2019-03-07 11:06:49 +03:00
Alexey Antonov b6902bf1d6
[deprecation warnings] Use of the joda time method [getHourOfDay()] is deprecated. Use [getHour()] instead. (#32551) 2019-03-07 10:48:28 +03:00
Spencer 71770d5ffb
Revert "Initial unit tests for embedded_visualize_handler" (#32615)
Reverts elastic/kibana#31324, failing on master
2019-03-06 23:47:55 -08:00
Luke Elmers e9c40ce0f8
Initial unit tests for embedded_visualize_handler (#31324) 2019-03-06 23:36:12 -07:00