Commit graph

14668 commits

Author SHA1 Message Date
Zacqary Adam Xeper
97d0142f7f
[Sample Data] Add event.dataset to sample web logs (#48150)
* [Sample Data] Add event.dataset to sample web logs

* Update saved_objects.js
2019-10-15 10:35:41 -05:00
Greg Thompson
71b1bbd4cb
Upgrade EUI to 14.5.0 (#48119)
* eui 14.5.0

* snapshot updates

* update ChromeBreadcrumb interface

* change bad id selector to data-test-subj selector
2019-10-15 09:59:38 -05:00
Liza Katz
338851f5d3
Remove indexPatterns dependency from filter service (#47471)
* Get rid of addFiltersAndChangeTimeFilter

* ts fix

* remove timefilter dependency from filter manager

* code review change

* Fixed bug in tests

* changeTimeFilter

* Refactored mappers and filter service to have no dependency on indexPatterns by generating the filter disaplyName in the relevant components.

* Fix map and flatten test

* Fixed filter state manager test

* Remove async from addFIlters and setFilters

* Fixed saved objects test - removed (display)value from url

* Make removeAll sync

* defer setFilters and removeAll in dashboard controller - temp hack

* fixed translation in filter view

* update strings

* Fixed range rendering

* map range converter
2019-10-15 15:23:24 +03:00
Mikhail Shustov
27dbcb2796
Expose package info to NP plugins (#48101)
* provide packageInfo to server plugins

* provide env to kbn server

* provide env to client plugins

* update server mocks and tests

* update client mocks and tests

* add integration test

* regen docs

* remove weird file

* export types for the client from special folder

* env should not affect test ourcome
2019-10-15 14:19:11 +02:00
Alexey Antonov
2ed0ccb6d2
Prepare data.indexPatterns for move to NP (#48083)
Replace ui/saved_objects by core.savedObjects
2019-10-15 14:28:15 +03:00
Jean-Louis Leysens
a8ce1db62b
Added track_total_hits autocomplete (#48146) 2019-10-15 10:54:44 +02:00
Mikhail Shustov
92917c1c19
Document custom validation for http request (#47699)
* document custom validation for http request

* generate docs
2019-10-15 10:51:45 +02:00
Mikhail Shustov
7ea28a561b
fix config reload for legacy plugin. failed due to ES fields validation (#48080) 2019-10-15 09:29:35 +02:00
Tiago Costa
507324b316
chore(NA): set back older terser defaults on new major version (#48140) 2019-10-15 01:00:06 +01:00
CJ Cenizal
e8df2fa216
Add API Keys app to Management > Security. (#45740)
* Add API Keys app to Management > Security.
- For admins, list all API Keys created by the user: Name, Date Created, Expiration Date, Status, User, and Realm.
- For non-admins, list own API keys: Name, Date Created, Expiration Date, and Status.
- Surface admin status above table.
- Ability to search by Name and Revoke (invalidate) API keys, and filter by User and Realm.
- Surface feedback when API keys are disabled on Elasticsearch or when user lacks required permissions.
* Add `SectionLoading` component to `es_ui_shared` plugin.
2019-10-14 15:37:16 -07:00
Matthew Kime
b92faf22b4
Field list - from indexed array to arrays and maps (#47921)
* make fieldList extend array
2019-10-14 12:27:50 -05:00
Joe Reuter
6d7aedf5c9
Look up axis format from series instead of using default formatter (#47696) 2019-10-14 18:31:35 +02:00
Joe Reuter
af60adf130
Timelion: improve error handling (#47958) 2019-10-14 18:31:15 +02:00
Joe Reuter
7373c796d6
make sure filters are not re-synced accidentally (#47937) 2019-10-14 18:30:49 +02:00
Lukas Olson
6383a4b693
Default to _search instead of _msearch in courier (#45174)
* Default to _search instead of _msearch in courier

* Fix callClient tests

* Revert accidental commit

* Fix proxy to properly return response from ES
2019-10-14 09:19:50 -07:00
Maja Grubic
1e11c36beb
[Discover] Making filter of fields Lens-like (#47847)
* Making filter of fields Lens-like

* Removing unnecessary import

* Calculate number of filtered fields

* Exclude missing fields from calculation

* Highlight facet if filtersActive > 0

* Applying eui sass variables to styles

* Exclude search from filtering
2019-10-14 13:51:38 +01:00
Joe Reuter
cb944e4906
Saved object finder: Include freely specifable fields in request (#47321) 2019-10-14 14:26:31 +02:00
Alexey Antonov
73040e4081
Prepare index_patterns/index_pattern.ts for move - remove ui/notify (#47969) 2019-10-14 13:39:58 +03:00
Chris Mark
7e40cedc79
Add Coredns Dashboard and logo (#47961) 2019-10-14 12:43:54 +03:00
Silvia Mitter
792dc26efe
[APM] Update index pattern (#48066)
related to https://github.com/elastic/apm-server/pull/2746
2019-10-14 10:34:10 +02:00
Nick Peihl
7bcc7634ec
[Maps] Use new ems-client dependency (#44182)
* Use new ems-client dependency
2019-10-13 19:18:10 -07:00
Christiane (Tina) Heiligers
3476b19332
[Saved Queries] Saved query list pagination (#47646)
* modifies getAllSavedQueries to return the total count along with the saved queries requested for the page parameters provided. Sets defaults to 'perPage' and 'activePage' parameters for getAllSavedQueries

* Separates out getting the total number of saved queries from the call to get all saved queries

* Adds unit tests for getSavedQueryCount and getAllSavedQueries

* Uses findSavedQueries with pagination to fetch saved queries for a current page

* renames functions

* Updates saved_query_service_tests

* Removes exposed perPage and page parameters from getAllSavedQueries, fetching the total saved query count internally

* Deletes extra call to fetch the saved query count

* Saved query management component can only use the savedQueryService only once mounted. The initial async functions were running outside of effects

* Changes undefined to empty string in first argument to findSavedQueries
2019-10-11 16:56:50 -07:00
Matt Bargar
22e6d3dfdd
Fixes an issue in Discover where an unsubmitted change to the query (#47908)
I believe the cause of this issue is that we weren't saving the app state after updating it from the saved query. So the new query would be in memory but not in the URL. Something would cause the old app state to get read from the URL and override the changes. Simply adding a call to state.save after changing the query in app state seems to have solved it.

Visualize didn't have this issue, but I'm guessing there was nothing causing the old state to be read from the URL. So I applied this fix to Visualize as well to avoid any issues in the future.
2019-10-11 17:01:22 -04:00
Clint Andrew Hall
27cbdf5f50
[feature][Canvas] Share Workpads in other Websites (#46278)
* [Canvas] Embedding Workpads in other Websites (#42545)

* Testing for Workpad Snapshots

* Rename Snapshots to Shareables; update documentation. (#46513)

* [canvas][shareables] Add Localization + Tweaks (#46632)

* Add localization + tweak naming

* Fix duplicate key

* Update storyshots

* [shareables] Unsupported Renderer Warning (#46862)

* [shareables] Unsupported Renderer Warning

* Update snapshots; add test

* Addressing Feedback

* [canvas][shareables] Simplify and complete testing (#47328)

* Simplify

* Updates

* Finishing up

* A few tweaks

* Fix eslint errors; how would those happen??

* Fix CI build of runtime; assorted visual tweaks

* Update x-pack/legacy/plugins/canvas/shareable_runtime/test/index.ts

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

* Addressing feedback

* Remove null-loader from root package

* re-add null-loader until mitigation is found

* [perf] Fix unsupported renderers performance issue (#47769)

* [perf] Fix perf issue with unsupported renderers

* Fixing snapshots

* Addressing review feedback (#47775)

* Addressing feedback

* Addressing feedback (#47883)

* Branding Changes (#47913)

* Branding Changes

* Update snapshots
2019-10-11 12:15:41 -05:00
spalger
a2c234d7f0 [renovate] auto open @elastic/charts prs 2019-10-11 09:54:56 -07:00
spalger
0002b84344 [renovate] eliminate separate PRs for minor/major versions 2019-10-11 09:54:43 -07:00
Ahmad Bamieh
0564396523
remove .required from shouldShowTelemetryOptIn prop (#47940) 2019-10-11 18:39:57 +03:00
Michail Yasonik
d0c9f84bd1
Read warning to screen readers for duplicate saved objects (#47568) 2019-10-11 21:03:25 +05:30
Jonathan Budzenski
37828dbabf
[deb/rpm] set default babel cache path (#47907)
* [deb/rpm] set default babel cache path

* \\n
2019-10-11 10:24:26 -05:00
Jonathan Budzenski
d41ea22f63
[build/deb] use older systemd StartLimitInterval (#47909)
* StartLimitIntervalSec -> StartLimitInterval

* [build/deb] use older systemd StartLimitInterval
2019-10-11 10:20:36 -05:00
Dario Gieselaar
819f334c85
[APM] Replace ui/kfetch with core.http (#47635)
* [APM] Replace ui/kfetch with core.http

Closes #46548.

* Remove kfetch mocks in tests

* Expose HttpFetchError from src/core/public/index

* Make HttpFetchError public

* Simplify tests for ServiceOverview
2019-10-11 16:35:29 +02:00
Vadim Dalecky
5e2deb49a6
fix: 🐛 handle correctly basic falsy types in getType() (#47930) 2019-10-11 15:24:16 +02:00
Chris Roberson
04f42c4600
[Timefilter] Convert to ISO string instead of JS string (#47722)
* Convert to ISO string instead of JS string

* Add test
2019-10-11 09:18:08 -04:00
Carlos Pérez-Aradros Herce
dfceb68325
Add CouchDB Metricbeat module tutorial to Kibana home (#47811) 2019-10-11 13:00:54 +02:00
Joe Reuter
739807926e
fix usage of save modal callback (#47492) 2019-10-11 12:57:16 +02:00
Jean-Louis Leysens
cf4c571951
[Console] Mappings for 7.5 (#47735)
* First pass of spec update to OSS plugin

* Update existing doc links

* Move data_frame files to new depreceated namespace

* Removing this setting per https://github.com/elastic/elasticsearch/pull/47717

* Add new files

* Added transforms overrides

* Updated deprecated data transforms file names
Fixed broken __template's
Updated autocomplete for new transforms endpoints
2019-10-11 11:36:17 +02:00
Maja Grubic
d62879547a
Adding KibanaContextProvider to IndexPatternDimensionPanel component (#47773) 2019-10-11 09:42:59 +01:00
Matthias Wilhelm
c13faab6ba
Improve kbnTableHeader directive that causes warnings in console (#47829) 2019-10-11 09:38:01 +02:00
Liza Katz
0d7dfbadec
Reconstruct setup\start data shim APIs (due to savedObject N/A in setup) (#47851)
* No saved objects client in data.setup

* replace old loading of data/public/setup

* test fixes

* fix list_control_factory

* range_control_factory
2019-10-11 07:56:59 +03:00
Yulong
871601b20c
[Code] replace nodegit with native git (#45491)
* [Code]  use native git to iterate git files
* [Code] use native git to clone/update repository
* [Code] git history using native git
* [Code] use native git to read file tree and file content
* [Code] fix the 'bad file' warning from status api
* [Code] use native git to handle worktree
* [Code] use native git to resolve references
* [Code] use native git to handle blame / diff
* [Code] patch git binaries in kibana build script
* [Code] migrate unit tests to use native git
2019-10-11 11:32:03 +08:00
Jonathan Budzenski
fdfcd03448 [dev/watch] ignore chromium and sass tmp directories (#47603) 2019-10-10 13:45:20 -07:00
Varun Sharma
6aa00ce7c6 Fix typo in run_i18n_integrate (#47561) 2019-10-10 14:46:23 +01:00
Xavier Mouligneau
9e9c841ef7
[savedObject] Index patterns race condition (#47788)
* [savedObject] [bug] Race Condition

* Forget async

* fix raise condition

* fix unit test
2019-10-10 09:00:31 -04:00
Stacey Gammon
3cb74bd628
Phase 1 of search services (#46742)
* Phase 1 of search services

* First review feedback

* Start on tests

* Add functional tests for search explorer

* Add unload and fix ts error

* Add index.test.ts files for coverage completeness

* Adding unit tests

* use internal route terminology. No reason this should be a public route, at least not yet.

* Move search service into data plugin

* App mount search context needs to be optional

* Add more unit tests for server stuff

* wip types fix

* fix types for new context container stuff

* put back all jest test coverage paths

* address review comments

* delete the two test files that just tested the instantiation of the search service

* expose search fn on StartContract... tested locally only

* update mocks to account for new startcontract
2019-10-10 08:52:08 -04:00
Stacey Gammon
ae28c9b542
Don't throw an error is panel is added, then removed, before embeddable finishes loading (#46788)
* Remove this error being thrown as it can be expected in certain situations

* change test after change in logic
2019-10-10 08:51:28 -04:00
Liza Katz
effa11ef71
call isTimeRangeSelectorEnabled (#47809) 2019-10-10 15:15:25 +03:00
Joe Reuter
c2dff771f8
improve wording of save modal and listing page (#47443) 2019-10-10 14:04:30 +02:00
Vadim Dalecky
c933d2dde6
Expressions np ready (#47565)
* refactor: 💡 generalize service getters and setters in expressio

* feat: 🎸 create NP-ready plugin for expressions

* refactor: 💡 flatten expressions plugin and remove service

* chore: 🤖 re-export legacy expressions service dir for Lens

* refactor: 💡 don't import renderer registry statically

* test: 💍 mock expressions service renderers registry in Mocha
2019-10-10 12:14:25 +02:00
Joe Reuter
be9969ee02
fix infinite loop in vega tooltips (#47700) 2019-10-10 11:24:07 +02:00
Joe Reuter
dc3283f19b
Use correct color for circles (#47715) 2019-10-10 11:23:41 +02:00
Tim Roes
a2c984ce6f
Deprecate scale metrics behavior (#47599)
* Deprecate scale metrics behavior

* Fix functional tests

* Fix jest snapshot

* Add back test
2019-10-10 08:28:05 +02:00
Dmitry Lemeshko
3495f86c45
Collecting code coverage from functional tests (#40512)
* get coverage for console functional test

* instrument kibana

* collect coverage stats after each test, on url navigation, refresh and back

* switch to babel-plugin-istanbul

* switch to babel-plugin-istanbul

* [coverage service] basic version

* trigger final coverage flush when ftr finishes, wait for all logs before exiting

* add coverage report generation

* increase optimizer timeout, re-run idx/babel plugin before istanbul

* increase memory usage for node

* put istanbul preset in the beginning to run as the last one

* bump babel-plugin-istanbul up to 5.2.0

* cleanup

* save unique json files with coverage

* [functional test coverage] update coverage.json path

* run code coverage on CI

* increase max-old-space-size with env variable

* fix coverage folder creation

* use env variable to configure code coverage

* revert ci config changes

* remove duplicate plugin

* remove comments

* fixes
2019-10-10 07:56:49 +02:00
Jean-Louis Leysens
6e6fc37276
[Console] Actions menu alignment (#47227)
* Fix default font size alignment

* Git update newline behaviour

* Fix console menu for IE11

* Slightly smarter algorithm for discovering space

* - Move inline styles to SCSS
- Clean up use of formatted message in aria-label
- Remove unused prop from component

* Set flex group to not use responsive layout optimization
2019-10-09 18:46:45 +02:00
Aleh Zasypkin
0210ce47b6
Preserve URL fragment during SAML handshake. (#44513) 2019-10-09 18:12:14 +02:00
Liza Katz
88609c6a96
Remove document links dependency in data plugin (#44574)
* Use docLinks service

* Update tests to use docLinks mock service

* Test fixes

* Fixed jest test to work with functional tests

* snaps

* removed clicking on button test - as it actually tests EuiPopover
2019-10-09 17:05:09 +03:00
Tim Roes
01e8ca98d0
Prepare TypeScript for 3.7 (#47678) 2019-10-09 15:24:43 +02:00
Matthew Kime
4a73672d3e
stub_index_pattern doesn't need Private (#47649)
* stub_index_pattern doesn't need private
2019-10-09 07:51:56 -05:00
Artyom Gospodarsky
bee42120a7
Replace ui/notify with npSetup.core.notifications (#47588) 2019-10-09 15:11:32 +03:00
Tim Roes
a063535323
Minor editor tweaks (#47670)
* Remove redundant rel

* Make switches compressed
2019-10-09 14:07:18 +02:00
Mikhail Shustov
73c3e60db8
Supports metadata logging in the new platform (#47456)
* add tests for logWithMetadata in LP

* allow passing metadata to log in NP & LP

* get rid of ternary when build data to log
2019-10-09 13:35:33 +02:00
Artyom Gospodarsky
9430ca1abc
[NP] Migrate field format utils to TS (#47124)
* Migrate url.js to TS

* Typescriptify truncate util

* Typescriptify string util

* Change method name by constant

* Typescriptify relative date util

* Refactor url util

* Typescriptify percent util

* Typescriptify bytes util

* Typescriptify number util

* Make _convert as method of derived class

* Get rid of Field Format type

* Typescriptify IP and Color utils

* Typescriptify dates utils

* Change functions to arrow functions in tests

* Convert Duration, Source and Static Lookup to TS

* Remove Field Format type from Numeral

* Use MomentJS types instead of any

* Use KBN_FIELD_TYPES as field types

* Make timezone as string

* Make memoizedConverter and memoizedPattern types

* Make ugly type for createNumberFormat

* Replace any types by certain ones

* Add types to tests

* Internationalize Duration, String, Url utils

* Get rid of implicit _convert method

* Fix conflicts

* Make htmlConvert, textConvert and setupContentType as public

* Make some any's more certain
2019-10-09 12:53:45 +03:00
Maryia Lapata
6a0da3ddda [Vis: Default Editor] Euificate table options tab (#46013)
* Euificate table options tab

* Add validation

* Use SchemaConfig for dimensions

* Update snapshots
2019-10-09 12:19:45 +03:00
Spencer
9b34d6b76f
refactor failed_tests_reporter to use TS, no octokit (#46993)
* refactor failed_tests_reporter to use TS, no octokit

* update renovate config

* ensure that all kbn-test files are in ts project

* fix some type errors

* add some more tests

* [kbn-test/githubapi] cleanup and document

* collect log messages as strings instead of message objects

* ensure issue is open when updating body

* improve readability of getKibanaIssues

* expose axios helpers from dev-utils

* fix request params for fetching github issues and validate locally

* include a README for failed_tests_reporter

* improve axios error helpers
2019-10-08 13:56:07 -07:00
Daniil Suleiman
b25df015d5
[Vis: Default editor] Euification of Metric options tab (#46930)
* EUIfication of metric_vis_options

* Small fixes

* Remove unused translations

* Fix style comments

* Remove unused styles
2019-10-08 23:37:24 +03:00
Wylie Conlon
bbdc0bf595
Add telemetry to track total clicks on each visualization from grid (#47489)
* Add telemetry to track when a visualization is selected from grid

* Move all visualize tracking of metrics into one place

* Fix type errors
2019-10-08 16:29:34 -04:00
Vadim Dalecky
e496de4e43
fix: 🐛 fix "Invalid expression" messages in Canvas (#47605) 2019-10-08 20:06:36 +02:00
Tre
1947608378
[FTR] Support for new and old es clients (#47377)
* Add dep for new es client,
refactor all mentions of the old client
to the new.
2019-10-08 09:53:24 -06:00
Nathan L Smith
726a84f28c
[APM] Experimental Service Map front end (#46497)
Add service map tabs on the main APM screen and for individual services.

This is not yet hooked up to work with back-end data, so it always shows the same hard-coded graph.

This is experimental, so you must have x-pack.apm.serviceMapEnabled: true in your Kibana config for it to show up.

Also add "PSF" to the list of allowed licenses since a new dependency added uses this license (it's on the [green list](https://github.com/elastic/open-source/blob/master/elastic-product-policy.md#green-list).)

Fixes #44890
Fixes #44853
2019-10-08 09:54:11 -05:00
Rudolf Meijering
f0f75fc289
SavedObjectAttribute allow array of primitives (#47317) 2019-10-08 16:41:13 +02:00
Alexey Antonov
25e2eedfd4
Convert ui/agg_types to TypeScript / Jest (#47044)
* Convert `ui/agg_types` to TypeScript / Jest

Fix: #47044

* Remove extra generic from AggType class
2019-10-08 13:25:15 +03:00
sainthkh
8fd1a36d7d Remove injectI18n in management. (#45876)
* Remove injectI18n in management
2019-10-07 22:29:35 -05:00
Brandon Morelli
644b0ffab3
[APM] Update RUM Agent tutorial (#47057) 2019-10-07 18:41:59 -07:00
Spencer
485e9b8c73
rename bluebird imports to stop impersonating global.Promise (#47535)
* rename bluebird imports to stop impersonating global.Promise

* forgot to save a couple files

* found a missing instance

* one more
2019-10-07 16:15:34 -07:00
Andrew Cholakian
35a7de1708
[Uptime] Query Overhaul + Pagination (#42933)
Summary

Adds pagination to the Uptime app's monitor overview page. Also cleans up/removes a lot of unused code that laid the foundation for the states index approach we opted not to take.

This PR is somewhat complex due to our need to use composite aggregations with searchAfter style pagination.
Understanding our new query approach
How the schema works

At its simplest, we run a single heartbeat from a single location checking a single endpoint with a single IP.In this case, everytime we run a check we create a new document.

# Documents for a single monitor.id
# checked from one heartbeat
------ time --------------->
[D] [D] [D] [D] [D] [D] [D]

We can also check from multiple geo locations

# Documents for a single monitor.id
# checked from multiple heartbeats, on in a US-E datacenter, the other in US-W
Location | ---------- time ----------->
 US-E    ` [D] [D] [D] [D] [D] [D] [D]
 US-W    ` [D] [D] [D] [D] [D] [D] [D]

We can also check multiple ip addresses per check if there are multiple DNS entries. If the endpoint we're checking has 3 DNS entries we will create 3 documents per check. The final document has an extra summary field with two integer values: summary.up and summary.down summarizing how many documents were up vs down across all three documents in the check. All documents also contain a monitor.check_group UUID string field that has a shared value across all three documents.

# Documents for a single monitor.id checked from a single location checking 3 IP addresses total
# checked from one heartbeat.
# Documents with a summary are indicated with an [S]
Note the partially written group at the end
--------------- time --------------------->
Docs   | [D] [D] [S] [D] [D] [S] [D]
Groups | |--UUID1--| |--UUID2--| |-UUID3-

Putting it all together, we can have multiple geo locations with multiple IPs checked within each location.

# Documents for a single monitor.id checked from a single location checking 3 IP addresses total
# checked from one heartbeat.
# Documents with a summary are indicated with an [S]
Location | ------------------time-------------------------->
         `
US-W     ` [D] [D] [S] [D] [D] [S] [D]
         ` |--UUID1--| |--UUID2--| |-UUID3-
         `
US-E     ` [D] [D] [S]   [D] [D] [S] [D] [D] [S]
         ` |--UUIDA--|   |--UUIDB--| |--UUIDC--| 

The Query
Goals

Logically, what we want to do when searching is to:

    Match the most recent complete check group from each location and return all documents from that check group.
    For any specific fields (say error.message or monitor.ip) consider the monitor matched if any documents in any location have that value.
    For status filtering consider the monitor up if all documents within the latest check groups for each location are up.

Additional properties we'd like this query to have:

    Be paginatable
    Be fast
    Be in a consistent order (required for pagination)

At a High Level

There are three phases, described in detail below, but the TL;DR is:

    queryPotentialMatches() Find monitor.id,mostrecent(check_group) tuples that match the query and all filters except status. We eagerly fetch 500 results here knowing that we may discard some of these results in the next phase.
    refinePotentialMatches() Perform an additional query that pulls in all the most recent check summaries from all locations for the monitor IDs from the last phase. We compare the matched check groups from the last phase to see if what matched previously was out of date. We can now apply the status filter as well.
    enrich At this point we already have the matching monitor IDs and their status, but we haven't brought in most of their fields. Here we re-query to get all docs from the matching monitor IDs most recent checks, then format them for return via API.

queryPotentialMatches()

This query returns via a composite agg all monitor IDs matching all query. It also returns the latest matching monitor.check group of all monitor IDs with the correct monitor.status value. Note that the returned monitor.check_group value will only be the most recent value matching the query terms. It may be an old check.

So, the output of the check is all monitor.id values that have ever had a document that matched the query. However, these matches may be old.

TODO: The PR as it stands doesn't work exactly this way, I added in an optimization for status filtering that actually is incorrect. We can exclude matches that are down if we're looking for things that are up, but nothing more than that.
refinePotentialMatches()

In this phase we take the monitor.id values from the preceeding phase and query for all the latest check groups per geo-location for each via a terms query plus terms aggs, using a top hit to get the most recent (top hit size 1 is more efficient than a terms agg on a high cardinality string field sorted , I believe due to global ordinals). Then, in Javascript, we can further exclude monitors based on the monitor.status fiter. If the status filter is up we exclude any monitors that have any down checks using the summary fields. By using the summary fields we additionally ensure that we only include the most recent complete check groups, instead of partial ones.

We then combine the output of the preceding phase, kicking out results from the initial phase that didn't have their latest complete check groups match.
Enrichment

We already have the correct monitor IDs, but we don't have all the data from all matching documents inside the check groups. We only got the summary documents (and only returned the monitor.id and check group) in the preceding phase. In this straightforward phase we get all the documents for the latest check groups for each monitor and combine them into the final response. Additionally adding histogram data via an auxiliary query.
Pagination

The query phases described above omit discussion of how pagination works. We don't want to retrieve all matching monitor.ids, if a user has 30k monitors that can be expensive. Our default page only shows 10 in this patch. By limiting results we increase speed. Additionally, by using "after" style pagination as composite aggregations use, each page load is as fast as the first, we don't have the performance issues traditional page number style pagination has as you go deep into the result set.

Internally the code has an Iterator style paginator object covering all phases except the final enrichment phase that has the following functions:

    next() Gets the next monitor matching the query advances the internal cursor.
    peek() Gets the next monitor matching the query, does not advance the internal cursor.
    current() Gets the monitor at the current cursor
    paginationAfterCurrent() Checks via peek to see if there is more data, and if so returns pagination data to be sent on the next request to get the next page. This powers the 'next' button.
    paginationBeforeCurrent() Same as preceeding, but gets the pagination info for the page before the current item. TODO add this method instead of the current hacky way with reverse()

Internally we overfetch for the initial filter query to provide a buffer for the paginator; we don't want a query per next() invocation. That's currently set to 500 items at the moment, which is pretty snappy.

Fixes elastic/uptime#63
Alternative approaches considered

    Using data frames: We rejected this approach for two reasons: 1.) It's one more thing that a user can accidentally break 2.) Worry over the cost of constantly re-indexing every document with low latency. We'd need to reindex everything once every 5-10s to prevent excessive lag.
    Kibana Background jobs and a high water mark. This would involve having a background job in Kibana that would compute the most recent documents for each monitor at a given time and then mark them with a high water mark using an update by query. This has the same issues as the data frames in terms of excessive doc writes and scalability. However, there's less to break in a sense in that there's no extra indices. OTOH, users have configure kibana to let it write to uptime indices.
2019-10-07 17:19:24 -05:00
Liza Katz
4ad46e555a
Get rid of addFiltersAndChangeTimeFilter (#47450)
* Get rid of addFiltersAndChangeTimeFilter

* ts fix

* remove timefilter dependency from filter manager

* code review change

* Fixed bug in tests

* changeTimeFilter
2019-10-08 00:12:01 +03:00
Court Ewing
485eaf773d
[core] Do not overwrite saved object references if not specified (#47248)
* saved objects: allow partial update without references

For normal attributes, the update API for saved objects supports partial
updates, where it will only attempt to change those attributes you
specify. References should behave the same way otherwise they will be
replaced entirely if you call update without specifying the original
references.
2019-10-07 16:10:29 -04:00
Josh Dover
d6410b5580
Add types to Elasticsearch API calls (#46668) 2019-10-07 13:11:30 -05:00
Vadim Dalecky
b9bbde6780
Improve Interpreter TypeScript typings (#47212)
* fix: 🐛 correct createError() implementation and typings

* feat: 🎸 improve expressions service TypeScript types

* perf: ️ improve ExpressionLoader class

* feat: 🎸 improve Interpreter types

* feat: 🎸 improve Interpreter function typings

* feat: 🎸 improve Interepreter test TypeScript typings

* feat: 🎸 TypeScriptify kibana_context expression function

* feat: 🎸 TypeScriptify "kibana" expressions functions

* feat: 🎸 TypeScriptify "visualization" function

* feat: 🎸 TypeScriptify Interpreter initialization

* test: 💍 fix interpreter tests

* feat: 🎸 add TypeScript typing to some of the executor internals

* fix: 🐛 this fixes visualizations; why?

* chore: 🤖 delete redundant files and fix TypeScript error

* perf: ️ use not null assertion for .dataHandler

* refactor: 💡 stricten AnyExpressionFunction type

* fix: 🐛 set correct initial pipeline exec context

* feat: 🎸 improve expression type typings

* test: 💍 call interpreter with correct input from func tests
2019-10-07 19:01:01 +02:00
Josh Dover
c30a2f96a3
Make Core interfaces exposed to LP plugins consistent with NP… (#47074) 2019-10-07 10:48:08 -05:00
Mikhail Shustov
e290e2cf1e
To recommend how to access API not available in New platform (#46682)
* To recommend how to access API not available in New platform

* add a note about usage on the client side

* Update src/core/MIGRATION.md

Co-Authored-By: Josh Dover <me@joshdover.com>
2019-10-07 16:56:16 +02:00
Larry Gregory
dba0946906
Honor current search criteria when exporting saved objects (#47223)
* honor current search criteria when exporting saved objects

* adding core docs
2019-10-07 10:11:23 -04:00
Maja Grubic
9413939588
Adding width and height as parameters to image url (#46917)
* Adding width and height as parameters to image url

* Addressing PR comments

* Removing unnecessary error message
2019-10-07 11:44:53 +01:00
Maja Grubic
79b63e0166
Standardizing IconField implementation across the app (#47196)
* Moving FieldNameIcon implementation to FieldIcon implementation in kibana_react directory

* Adding LensFieldIcon implementation around the new FieldIcon to be used in Lens components

* Applying new LensFieldIcon in the Lens components

* Applying new FieldIcon component in Graph components

* Applying new FieldIcon component in the rest of the components

* Adding missing type to lens field icon

* adding missing type

* Addressing PR comments
2019-10-07 09:36:24 +01:00
Liza Katz
0c001e4934
Move ui/value_suggestions ⇒ NP data plugin (#45762)
* Bind search bar

* create prewired data components

* Pass NP data plugin to shim plugin, to access autocomplete
Pass storage and autocomplete to createSearchBar method
Add appName and autocomplete to IDataPluginServices
QueryBarInput to consume autocomplete and appName from context
QueryBarTopRow to consume appName from context
Remove appName from SearchBar
Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types

* Use KibanaContextProvider in vis editor and graph

* Use KibanaContextProvider in maps

* Use prewirted SearchBar in TopNavMenu

* Use KibanaContextProbider in Lens

* Fix appName usage in query bar input

* fixed query bar top row appName

* update tests

* fixed bind search bar bug

* mock SearchBar

* Removed unnecessary mocks

* Delete unused mock

* Fixed exporting of data plugin types

* Updated maps snapshot

* Fixed some TS issues

* Fixed jest tests

* Context adjustments in TSVB

* componentWillMount

* Code review fixes

* Pass dataTestSubj to query bar input

* Graph data

* - Pass NP data plugin to KibanaReactContext
- Move value_suggestions to NP

* - Pass NP data plugin to KibanaReactContext
- Move value_suggestions to NP

* ts fixes

* Added karma getSuggestions fake

* Refactored kuery autocomplete tests to jest

* Filter bar context for directives

* updated snapshot

* fix diffs

* fixed lens test
2019-10-06 17:25:24 +03:00
Liza Katz
2389fe8e1a
Remove ui/persisted_log - Part 2 (#47236)
* Added storage interface to avoid importing ui/storage

* Move persisted log into data plugin / query

* Fix jest tests

* import getQueryLog

* Add store to graph search bar

* Added window localStorage

* Deleted persisted log folder
2019-10-06 14:12:52 +03:00
renovate[bot]
445fa434d5 Update gulp related packages (major) (#46665)
* Update gulp related packages

* ts-ify and gulp4-ify x-pack tasks, remove unused canvas tasks

* remove unnecessary gulp.TaskFunction usage

* fix old references

* update renovate config

* move constants into helpers directory

* typo

* compact tasks a bit, remove unnecessary paths

* fix build directories

* deprecate testonly task

* rather than justifying an unjustifiable ts-ignore, ts-ify the imported module

* update renovate config

* update browser download tests to mock axios

* add root index.d.ts to tsconfig

* export BrowserType

* remove unnecessary `@ts-ignore`

* use consistent casing
2019-10-05 07:53:47 -07:00
Brian Seeders
7d96a13fad
Revert "Add pipeline for flaky test runner job (#46740)"
This reverts commit e89425552b.
2019-10-04 16:55:20 -04:00
Nathan Reese
3e9b0c81b2
SearchSource: fix docvalue_fields and fields intersection logic (#46724)
* SearchSource: fix docvalue_fields and fields intersection logic

* update filter logic to handle docvalue_fields that are just strings
2019-10-04 12:49:11 -06:00
Mikhail Shustov
3a5c06858a
Expose injectMetadata service temporarily (#47319)
* expose injectMetadata until config service provided

* add functional test

* update types

* fix tests. injectMetadata is a part of plugin contract

* add comment about injectedVars API
2019-10-04 20:41:24 +02:00
Brian Seeders
e89425552b
Add pipeline for flaky test runner job (#46740)
* WIP Jenkinsfile for flaky test runner

* Fix syntax

* A few more jenkinsfile fixes

* A few more fixes

* Can't round numbers in Jenkins groovy sandbox apparently

* More fixes

* Only do build_kbn_tp_sample_panel_action once during flaky testing

* Fix path and try setting a different JOB value

* Keep track of flaky test failures

* Introduce flaky test for testing

* Some flaky test pipeline cleanup

* Fix a couple of issues with flaky test failure tracking

* Update flaky test runner build name/desc with metadata

* Revert "Introduce flaky test for testing"

This reverts commit 202e9d86cf130ef37aff1817781a5b694aa2aa32.

* Try adding a local shared library

* Move local library loading logic to kibana pipeline library

* Move shared groovy code to shared library

* Add missed file

* Add ability to specify multiple agents for flaky test runner

* Update kibana-pipeline-library version

* Fix bug causing early exit for oss ciGroup1
2019-10-04 13:53:46 -04:00
spalger
cc9876c1c0 [renovate] group typescript related package upgrades 2019-10-04 08:50:28 -07:00
Spencer
3bc803e371
[mkdirp] remove in favor of recursive fs.mkdir (#47251)
* [mkdirp] remove in favor of recursive fs.mkdir

* add eslint rule to educate future contributors

* reword the eslint error message to prevent copy-pasting callback code

* Commit updated kbn-pm dist

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fix typo

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-10-04 08:15:06 -07:00
Joe Reuter
f4c697ba24
revert bad fix (#47200) 2019-10-04 17:08:14 +02:00
Alexey Antonov
e3dc525000
TSVB doesn't allow to perform basic functions showing no fields available (#47239)
Closes: #47226
2019-10-04 17:45:32 +03:00
Mikhail Shustov
d1a99ea6ee
Convert uiSettings service to TypeScript (#47018)
* tsify is_config_version_upgradeable

* tsify get_upgradeable_config

* tsify create_or_upgrade_saved_config

* tsify ui_settings_service

* tsify ui_settings_service_factory

* tsify ui_settings_service_for_request

* declare types on server object

* tsify set route

* tsify set_many route

* tsify get route

* tsify delete route

* tsify logWithMetadata

* improve ui_settings_service typings

* introduce uiService mocks

* remove private methods from public contract

* add types for server.uiSettingsServiceFactory

* rename IUiSettingsService --> IUiSettingsClient
2019-10-04 12:48:05 +02:00
Tiago Costa
393c36641d
chore(NA): use git-common-dir instead of git-dir for register git hook (#47232) 2019-10-04 03:53:40 +01:00
Josh Dover
5fc9a5501e
Simplify generics for IContextContainer (#46538) 2019-10-03 15:24:14 -05:00
Maja Grubic
00df24d850
Removing default title on dashboard save (#47079) 2019-10-03 21:18:11 +01:00
Spencer
ebb62cb6ba
support requesting reviews from specific users by package (#47246) 2019-10-03 11:27:49 -07:00
Liza Katz
3e913981c8
Remove ui/persisted_logs - Part 1 (#47225)
* Use npStart.core.chrome.recentlyAccessed and delete directive

* use recently accessed in ML

* re-update snapshots
2019-10-03 21:16:48 +03:00
Josh Dover
ef8b2a36d4
Add compatibility layer for ApplicationService in legacy platf… (#46659) 2019-10-03 11:11:21 -05:00
Wylie Conlon
ab05bbd94e
[lens] Use top nav in Lens app (#46190)
* [lens] Use top nav in Lens app

* Add tests for saved query, pass filters around more places

* Fix filter passing

* Add unit test for field popover making correct queries

* Respond to review feedback

* Fix type errors

* Respond to all review comments

* Remove commented code

* Top nav should be compatible as angular directive

* Fix rendering issue with filter updates

* Respond to review comments and add onChange test

* Add specific test for the index pattern bug from Tina
2019-10-03 11:24:45 -04:00
Vadim Dalecky
919b00b2cd
test: 💍 convert Interpreter font function tests to Jest (#47193) 2019-10-03 12:43:19 +02:00
Vadim Dalecky
be13b7d4a1
visualizations 👉 NP-ready (#47142)
* fix: 🐛 improve visualizations NP-ready plugin

* fix: 🐛 fix imports of visualizations plugin NP-ready

* fix: 🐛 remove dependency on non-existing plugin

* fix: 🐛 remove dependencies on non-existing 'visualizations' pl

* fix: 🐛 use new visualizations plugin NP-ready legacy import
2019-10-03 12:37:09 +02:00
Michail Yasonik
ea18949ce7
Variety of quick a11y fixes (#46569)
Focusing on heading structure and page layout for Home, Discover, Dashboard, and Visualize.

This is progress on #37539
2019-10-03 15:00:12 +05:30
Vadim Dalecky
cae19e80ae
refactor: 💡 convert Interpreter .js -> .ts (#44545)
* refactor: 💡 convert Interpreter .js -> .ts

* fix: 🐛 fix TypeScript type errors

* test: 💍 remove old snapshot
2019-10-03 10:44:21 +02:00
Xavier Mouligneau
d95c47f776
Add KQL functionality in the find function of the saved objects (#41136)
* Add KQL functionality in the find function of the saved objects

wip

rename variable from KQL to filter, fix unit test + add new ones

miss security pluggins

review I

fix api changes

refactor after reviewing with Rudolf

fix type

review III

review IV

for security put back allowed logic back to return empty results

remove StaticIndexPattern

review V

fix core_api_changes

fix type

* validate filter to match requirement type.attributes.key or type.savedObjectKey

* Fix types

* fix a bug + add more api integration test

* fix types in test until we create package @kbn/types

* fix type issue

* fix api integration test

* export nodeTypes from packages @kbn/es-query instead of the function buildNodeKuery

* throw 400- bad request when validation error in find

* fix type issue

* accept api change

* renove _ to represent private

* fix unit test + add doc

* add comment to explain why we removed the private
2019-10-02 18:23:44 -04:00
Greg Thompson
6f09ecc0d9
Upgrade EUI to 14.4.0 (#46949)
* eui to 14.4.0

* euicard ts updates

* snaps
2019-10-02 11:58:22 -05:00
Jean-Louis Leysens
d243697e81
[Console] Fix Safari layout issue (#47100)
* Remove 100% height, migrate console root to display flex

* Remove unused import

* Removed vendor prefixes in CSS
2019-10-02 18:30:27 +02:00
Larry Gregory
0bfa7ca5c6
Support space-specific default routes (#44678) 2019-10-02 12:05:02 -04:00
Liza Katz
0cd9d6c39e
Create a pre wired version of SearchBar (#46702)
* Bind search bar

* create prewired data components

* Pass NP data plugin to shim plugin, to access autocomplete
Pass storage and autocomplete to createSearchBar method
Add appName and autocomplete to IDataPluginServices
QueryBarInput to consume autocomplete and appName from context
QueryBarTopRow to consume appName from context
Remove appName from SearchBar
Added AutocompletePublicPluginSetup and AutocompletePublicPluginStart types

* Use KibanaContextProvider in vis editor and graph

* Use KibanaContextProvider in maps

* Use prewirted SearchBar in TopNavMenu

* Use KibanaContextProbider in Lens

* Fix appName usage in query bar input

* fixed query bar top row appName

* update tests

* fixed bind search bar bug

* mock SearchBar

* Removed unnecessary mocks

* Delete unused mock

* Fixed exporting of data plugin types

* Updated maps snapshot

* Fixed some TS issues

* Fixed jest tests

* Context adjustments in TSVB

* componentWillMount

* Code review fixes

* Pass dataTestSubj to query bar input

* Graph data
2019-10-02 16:10:00 +03:00
Maryia Lapata
d8a5765362 [Vis: Default Editor] Prevent disabling of the only metrics agg (#46575)
* Prevent disabling of the only metrics agg

* Add unit tests

* Fix when aggs with different schema name
2019-10-02 13:48:39 +03:00
Maja Grubic
1a452cdf9b
Removing default title from saving a new search in Discover (#47031) 2019-10-02 10:30:36 +01:00
Matthias Wilhelm
03ccb43e31
[Discover] De-angularize side bar search field (#46679)
* Add DiscoverFieldSearch react component

* Adapt field_chooser.js

* Add jest test

* Adapt scss
2019-10-02 10:11:05 +02:00
Josh Dover
1381e9a2ef
Make check_core_api_changes script faster (#47068) 2019-10-01 17:46:20 -05:00
Matthew Kime
072f332385
time picker to filter (#47055) 2019-10-01 13:02:52 -05:00
Alexey Antonov
c0465258d0
Preparation for move core_plugins\kibana\common\field_formats into data plugin (#46921)
* Preparation for move core_plugins\kibana\common\field_formats into data plugin

Related to: #44973

* Fix PR Comments
2019-10-01 16:59:37 +03:00
Søren Louv-Jansen
dca6b3b93e
Increase breadcrumb max setting (#46595) 2019-10-01 14:49:54 +02:00
Maja Grubic
f09d01ae5b
Removing New Visualization title on save (#46719)
* Removing New Visualization title on save

* Removing title from saved visualization
2019-10-01 13:22:04 +01:00
Vadim Dalecky
f4ea04c9cc
Advanced ui actions 2 np (#46948)
* feat: 🎸 move advanced_ui_actions plugin to NP

* fix: 🐛 fix NP plugin configs

* fix: 🐛 remove import from legacy platform
2019-10-01 12:25:45 +02:00
Maryia Lapata
4ac0201260
[Vis: Default Editor] 'Metrics & Axis' tab - unit tests (#45881)
* Add unit tests for ValueAxisOptions

* Add unit tests for ValueAxesPanel

* Add unit tests for index.tsx

* Update index.test.tsx

* Update y_extents.test.tsx.snap

* Rename folder

* Update snapshots

* Fix code review comments

* Move data to mocks.ts

* Replace mount to shallow

* Update snapshots

* Move tests to the same directory as source code files
2019-10-01 11:37:41 +03:00
Artyom Gospodarsky
69bbd1199d
URL field formatter fix (#46332)
* Fix url render relative hyperlinks

* Fix test cases

* Make prefix less errorable

* Add some tests for url formatter
2019-10-01 11:35:26 +03:00
Rudolf Meijering
85c8232c0b
Move KibanaMigrator into Server SavedObjectsService (#43433)
* Rename SavedObjectsService -> SavedObjectsLegacyService

* Expose legacy pluginSpecs from Core LegacyService

* Expose legacy uiExports from Core LegacyService

* Move kibana config to NP

* Expose pluginExtendedConfig from LegacyService

* Make KibanaMigrator NP compatible

* KibanaMigrator -> NP SavedObjectsService

* SavedObjectsService never stop retrying ES connection error

* Move waiting for migrations to complete till after legacy service start

* Fix ESArchiver's KibanaMigrator

* Fix reload logging config tests

* Run migrations on savedobjects start

* Fix env tests

* Fix and make legacy tests more robust/isolated

* Cleanup code

* Fix invalid config test

* Fix SavedObject Migrations logging test

* SavedObjectsService tests

* Lifecycle logging and improve getting kibanaConfig instance

* Fix awaitMigration bug and test

* Fix typing error

* Review comments

* Remove unecessary KibanaConfig class

* Move legacy plugin config extension, specs, uiExports entirely into Core

uiExports, specs, disabledSpecs, config now get injected into KbnServer

* Fix config deprecation test

* Use existing logger mock

* Create SavedObjectsConfig for migration config

* Define KibanaMigratorContract type

* KibanaMigratorContract -> IKibanaMigrator + docs improvements

* Fix esArchiver's KibanaMigrator

* Fix plugin generator integration test

* ConfigServiceContract -> IConfigService

* Address review comments

* Review nits

* Document migrations.skip config

* Review comments continued...

* awaitMigrations -> runMigrations

* Type improvements
2019-10-01 09:11:33 +02:00
Spencer
5266349fee
[dev-utils] implement basic KbnClient util for talking to Kiba… (#46673)
* [dev-utils] implement basic KbnClient util for talking to Kibana server

* update KbnClient to expose full KibanaServerService API

* expose request() function and uriencode helper

* [uiSettings] retry read on conflicts auto upgrading

* expose function for resolving a Kibana server url

* only use apis in test hooks

* run x-pack-ciGroup2 60 times

* log retries as errors so they are included in console output for job

* bump

* Revert "run x-pack-ciGroup2 60 times"

This reverts commit 6b6f392edf.

* refactor urlencode tag to be a little clearer

* support customizing maxAttempts in request method
2019-09-30 22:52:07 -07:00
Mikhail Shustov
ee168f2765
Convert uiSettings tests to TypeScript (#46776)
* convert create_or_upgrade_saved_config into TS

* convert service tests to TS

* convert router tests to TS

* simplify stub setup

* address comments
2019-09-30 23:16:11 +02:00
Caroline Horn
a972486faa
Added Readme for EuiUtils (#46736) 2019-09-30 15:10:52 -04:00
Rudolf Meijering
08b86784ef
Expose serverBasePath fixes #45991 (#45995)
* Expose serverBasePath fixes #45991

* Review comments

* Fix basepath mock types

* AppBasePathContract -> IBasePath

* Match basepath test description with assertion

* Fix eslint errors
2019-09-30 20:49:15 +02:00
CJ Cenizal
cccbe386c4
Add head http method to request type. (#46927) 2019-09-30 11:37:27 -07:00
CJ Cenizal
3316d44aca
Migrate Console to use Node http instead of Hapi to support GET requests with bodies (#46200)
* Cleaned up use of es.send API
  - Converted Elasticsearch proxy config to TS (now we can see the types with https.AgentOptions)
  - Wrap request in util.promisify and refactor
  - Use 'url' lib for parsing URLs
  - Remove rejectUnauthorized from proxy_route.js (this is a TLS setting handled in agent setup)
* Retained original proxying behavior
* Re-enable support for setting rejectUnauthorized via proxy config settings
* Updated tests.
2019-09-30 10:19:48 -07:00
Matthias Wilhelm
50afec91ba
Remove redundant request to fetch index patterns (#44998)
* Add getCache method to IndexPatterns

* Refactor to use IndexPatternCache instead of another request

* Improve getCache function to be async if necessary

* Adapt discover controller code
2019-09-30 17:50:42 +02:00
Jean-Louis Leysens
c33a670def
[Console] Editor component smoke tests (#45872)
* First attempt at editor.tsx integration test

* Fix typo in variable name

* Expanded smoke test integration tests

* Mounting happens in beforeEach
Added i18n context to suppress error messages
Updated name of data-test-subj for the send request button
2019-09-30 16:44:30 +02:00
Matthew Kime
447319a52d
rename tests that may fail in dev env (#46878) 2019-09-30 08:26:08 -05:00
Matthew Kime
a57a5e7984
FieldFormat registry - use new platform ui settings (#46542)
* use new platform ui settings
2019-09-30 08:15:18 -05:00
Matthias Wilhelm
f9cc456de0
[discover] De-angularize index pattern selection (#46347)
* Implementation of DiscoverIndexPattern React component

* Implement usage of the DiscoverIndexPattern

* Adapt tests
2019-09-30 11:19:28 +02:00
Peter Pisljar
bd1ac0dad4
Remove VisTypesRegistry (ui/registry/vis_types) (#46323) 2019-09-30 10:11:24 +02:00
Caroline Horn
e85cb718be
[Embeddables] Time range per panel design fixes (#46630)
* Fix loading state
* Fix modal’s footer button spacing
* Better alignments of the panel header contents
* Fix alignment of badge if title doesn’t exist
2019-09-27 20:49:20 -04:00
Caroline Horn
59d33d3476 Update EUI to 14.3.0 (#46824)
* Update EUI to 14.3.0

and update snaps

* TS Colors fix
2019-09-27 15:16:57 -07:00
spalger
5bbb3e2d6f [renovate] group moment deps together 2019-09-27 12:05:40 -07:00
Brian Seeders
3a34d9b0a4
Add bootstrap cache fallback (#46804)
* Read branch from package.json as a backup for bootstrap_cache
2019-09-27 14:49:34 -04:00
Brian Seeders
146df62836
Add missing env vars for xpack reporting plugins (#44117) 2019-09-27 14:28:46 -04:00
Nick Partridge
858ad4d28f
Add ability to whitelist visible elements in percy (#45733)
* add ability to whitelist visible elements in percy

* allow white and blacklisting elements in visual tests

* remove unnecessary webElement methods

* refactor snapshot options to use show and hide

* refactor add/remove and visual test helpers

* [percy] rework css rules to allow hiding inside shown elements

* [percy] adjust logic to support showing inside hiding

* attach styles to hide percy when capturing the snapshot

* refactor in order to make sure all logic is executed if snapshot fails

* remove sleeps

* add back skipFirefox tag
2019-09-27 12:07:33 -05:00
Chris Cowan
8f8c080ef4
[Infra UI] Remove internal Hapi request for makeTSVBRequest (#45598)
* [Infra UI] Remove internal request for TSVB

* removing unused import

* Update x-pack/legacy/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts

Co-Authored-By: Felix Stürmer <weltenwort@users.noreply.github.com>

* removing unused variable
2019-09-27 10:02:02 -07:00
Daniil Suleiman
b322b6057b
[Vis: Default editor] Euification of heatmap options tab (#45766)
* EUIficate heatmap options

* Move collections

* Split labels in a panel

* Remove angular templates

* Remove unused translations

* Fix functional tests

* Fix validation

* Fix UI details

* Compress color picker

* Improve types

* Replace headings h2 with h3

* Add functional tests

* Create setCustomRangeByIndex
2019-09-27 17:00:09 +03:00
Vadim Dalecky
f7b95eccdd
Embeddables 2 np (#46771)
* chore: 🤖 move embeddable_api to NP "embeddable" plugin

* fix: 🐛 fix TypeScript type check errors

* fix: 🐛 fix TypeScript and build errors

* test: 💍 fix Jest tests

* fix: 🐛 fix translations

* test: 💍 add Mocha mocks

* fix: 🐛 change import syntax from function test sample plugin

* fix: 🐛 revert canvas changes back and leave placeholders

* chore: 🤖 revert more changes

* chore: 🤖 revert more changes

* fix: 🐛 fix TypeScript type check errors

* fix: 🐛 fix functional test imports

* fix: 🐛 fix x-pack Jest test importa

* test: 💍 fix advanced_ui_actiosn import for tests
2019-09-27 15:15:19 +02:00
Maja Grubic
b4887d8586
Adding gte and lt symbols in range filter fileds and popup (#46697) 2019-09-27 14:04:51 +01:00
Alexey Antonov
905d021c5a
Convert filter_manager/lib to TypeScript / Jest (#45785)
* Convert filter_manager/lib to TypeScript / Jest

Fix: #44952

* Update map_query_string.ts

* remove extra ts-ignore

* formatting

* fix PR comments

* Fix PR comments

* fix PR comments

* fix PR comments

* fix merge conflicts

* revert logic

* Fix PR commnets

* add tests for compare_filters

* fix PR comments
2019-09-27 15:22:29 +03:00
Vadim Dalecky
a99a5d62bf
refactor: 💡 separate server-side function reg from executor (#44531)
* refactor: 💡 separate server-side function reg from executor

* refactor: 💡 separate Canvas functionality of Interpreter

* refactor: 💡 simplify, move server fn init into Canavas

* fix: 🐛 adjust Expressions service usage after master merge
2019-09-27 14:01:55 +02:00
Daniil Suleiman
721b5d0a00
[Vis: Default editor] Fix spacing after EUI upgrade (#46568)
* Fix margins in vis editor data tab

* Fix margins in vis editor options tab

* Add a custom class to a string param
2019-09-27 12:28:27 +03:00
Tim Roes
fc05a8358c
Style guide cleanup (#46574)
* Enable one-var rule

* Prevent built-in extension

* Group more rules into modern language features

* Fix typing error use eslint disable instead

* Improve wording slightly
2019-09-27 10:07:24 +02:00
Spencer
bbe6eacebb
switch to debounce private module to make sure it's available (#46660) 2019-09-26 13:43:03 -07:00
Matthias Wilhelm
38dca89a4c
Euification of Discover FieldNameIcon (#46485)
* Migrate FieldNameIcon to use Eui icons

* Adapt colors, cleanup, add test
2019-09-26 18:59:03 +02:00
Sébastien Loix
4e7a4dd1ae
Es ui shared updates (#46570) 2019-09-26 17:06:33 +02:00
Larry Gregory
0ec11b6a22
i18n - allow plugins to specify multiple paths (#46578)
* allow plugins to specify multiple paths

* use native Array.flat instead of _.flatten()
2019-09-26 10:37:07 -04:00
Jean-Louis Leysens
7e3d375650
[Console] Notifications Service (#46215)
* Add notification service to Console and use it from the editor

* Revert original PR 45966

This reverts commit e60f4ed9ae.

* Re-add i18n import

* Updated copy
2019-09-26 14:31:10 +02:00
Alexey Antonov
e0a3dc541e
Move src/legacy/utils/kbn_field_types to data plugin (#46565)
* Move `src/legacy/utils/kbn_field_types` to data plugin

Fix: #44186

* fix CI
2019-09-26 14:57:49 +03:00
Artyom Gospodarsky
237ad82b84
[NP] Timelion (#44039)
* Move index.js to index.ts

* Migrate Vis, interpreter, home and 2 hacks to setup() and start()

* Move Timechart hack to start()

* Add featureCatalogueRegistryProvider to an interface

* Add types to a server param

* Move some .js to .ts

* Add ExpressionFunction<> to interpreter

* Remove Feature Provider

* Remove extra export

* Add an interface to a timelion response

* Add an inteface to the panel

* Add IPrivate interface

* Make nit notes

* Edit uiCapabilities() type

* Shim Timelion plugin

* Shim start() plugin method

* Change InternalCoreStart to LegacyCoreStart

* Move Angular dependencies to a separate module

* Change visualizations import path due to recent changes

* Rename directives

* Take a common property out

* Get rid of require in schema

* Use core.uiSettings

* Refactor timelion request handler

* Remove Private from tests

* Remove redundant dependencies from tests

* Update visualizations paths

* Change expressions paths due to expessions movement

* Refactoring according to reviews

* Add a comment over the uiCapabilities field

* Edit the comment

* Ignore uiCapabilities issue

* Take angular controller out

* Get rid of

* Get rid of config

* Get rid of config in start

* Unwrap handler from redundant promise

* Move npSetup npStart dependencies in a high level

* Rename some details

* Fix reviews

* fix CI

* Take visFactory out
2019-09-26 14:44:05 +03:00
Liza Katz
09ea3d529f
Start using useKibana context in data shim (#46478)
* Make FilterBar into functional component
Pass deps in using Context provider

* Turn query bar top row into functional component
Use notification.toasts in SearchBar
Use context provider in top nav.

* Added context provider to lens
2019-09-26 14:28:59 +03:00
Sébastien Loix
6ebc19b3f5
Refactor Template UI logistics form (#46576) 2019-09-26 12:04:03 +02:00
Maryia Lapata
8170a02235
Improve TS (#46452) 2019-09-26 12:17:54 +03:00
Caroline Horn
6d5d199975
Global filters editor design pass (#46276)
* Fixed helps text for dates and using delimited form control for ranges
* Adjusting width of field slightly
* Use filter icon type and single branch in svg
* Change placeholders
2019-09-25 21:42:28 -04:00
Lukas Olson
bfb0df92ad
Add docs for courier:batchSearches UI setting (#46053)
* Add docs for courier:batchSearches UI setting

* Update ui_setting_defaults.js

* Update ui_setting_defaults.js

* Update advanced-options.asciidoc

* Update advanced-options.asciidoc

* Update ui_setting_defaults.js

* Update advanced-options.asciidoc

* Update ui_setting_defaults.js
2019-09-25 17:35:44 -07:00
renovate[bot]
8e2878c0bd Update angular+jquery related packages (#46393)
* Update angular related packages

* upgrade jQuery too

* don't delete screenshots in pipeline jobs

* use ng-change so that listener is triggered after ng-model is updated

* match @types/angular versions

* update yarn.lock

* fix test

$routeChangeSuccess is no longer broadcast when resolving a redirect route, so this test has been adjusted to validate that
2019-09-25 12:15:45 -07:00
renovate[bot]
0034293867 Update jest related packages (#46391)
* Update jest related packages

* use correct type

* adapt spy and describe.each types

* update yarn.lock

* update snapshot

* define types before passing to describe.each
2019-09-25 12:00:33 -07:00
Eli Perelman
fcbb12f5c7
Make request and response properties conditionally available during HTTP interception (#42755)
* Make request and response properties conditionally available during HTTP interception

* Address review comments, fix request reference in http service tests
2019-09-25 10:59:37 -05:00
sainthkh
f260466c2f ui/render_complete 👉 src/plugins/kibana_utils (#44743)
* Moved ui/render_complete to kibana_utils.
2019-09-25 10:18:28 -05:00
Matthew Kime
ca1c486f98
FieldFormats Registry from IndexedArray to Map (#46395)
* fieldFormats from IndexedArray to Map
2019-09-25 08:11:32 -05:00
Maja Grubic
314dc23c93
Add percentile and median aggregations for timestamp fields (#46477) 2019-09-25 13:07:39 +01:00
Jean-Louis Leysens
fc875e181c
[Console] Prototype Hardening (first pass) (#46334)
* Remove potential foot-gun function

* Precaution - user input is read against these objects
2019-09-24 19:11:34 +02:00
Alexey Antonov
ce23dedbd4
Shim ui/autocomplete_providers into legacy data plugin (#46138)
* Shim ui/autocomplete_providers into legacy data plugin

Fix: #44949

* Fix PR commnets

* fix CI

* Add comment
2019-09-24 19:02:53 +03:00
Liza Katz
c28ce03065
Move timefilter and timehistory instantiation ⇒ data plugin (#44783)
* Create timefilter service

* Pass timehistory as a dependency to query bar

* Updated timefilter tests and mocks

* Fix jest test

* Fixed bad import path

* updated xpack test

* make history optional on query bar

* Fixed chart_utils test

* Fixed page.test by mocking timefilter

* Fixed explorer_charts_container_service test by mocking timefilter

* Fixed explorer_chart_distribution test by mocking timefilter

* Fixed explorer_chart_single_metric test by mocking timefilter

* Fixed explorer_charts_container test by mocking timefilter and removing some unneeded initialization

* Fixed explorer_swimlane tesy by mocking timefilter

* Added missing functions to uiTimefilterMock to fix top_nav test

* Fixed timeseries_chart test by mocking timefilter

* remove bad merge

* mock field formats

* mock field formats

* rename timefilter boolean getters

* fix ml mocks

* ml mocks
2019-09-24 17:35:24 +03:00
Maryia Lapata
7ae2d9cd43
RangeOption: Get rid of ts-ignore (#45902)
* Get rid of ts-ignore

* Update range.tsx

* Refactoring
2019-09-24 14:11:22 +03:00
Caroline Horn
914b8e26b9
NP Plugin for EUI-Charts theme (#45446)
* Create a NP plugin for a EUI/Charts theme utility
Returns back the appropriate theme object based on the Kibana theme mode.
* Update new watcher chart
* Update discover chart
* Add SASS theme files
* Make getChartsTheme observable
2019-09-23 21:53:20 -04:00
spalger
8ccc3b0557 increase test timeout to 60 seconds (#46320) 2019-09-23 11:37:52 -07:00
sainthkh
93ad3f7b9d Typescript some of src/legacy/server/index_patterns (#44993)
* TypeScriptify errors.js

* Fixed type errors in errors.ts

* Prettierize resolve_time_pattern.test.js

* Prettierize resolve_time_pattern.js

* TypeScriptify resolve_time_pattern.js

* Prettierize mixin.js

* Fixed errors.ts payload error.

* TypeScriptify and Prettierize mixin.ts

* Prettierize query_params.js

* TypeScriptified routes and used core.http features and fixed related tests.

* Fixed type errors.

* Removed anys

* Prettierize params.js

* Prettierize response.js

* Accepts string array as query param.

* Returns 404 when there's no matching pattern for fields_for_wildcard.

* Simplified schema.

* Fixed types.
2019-09-23 11:50:28 -04:00
Søren Louv-Jansen
a5b5b8816b
[APM] Minimal e2e setup with Cypress (#43463)
* APM E2E with own package.json

* Ignore cypress folder

* Add cypress/apm as separate ts project

* Exclude from parent tsconfig

* Add p-limit as dep

* Fix readme

* Fix prettier command

* Resolve feedback

* Move date range into `loginAndWaitForPage`

* Remove redundant file

* Fixed lint errors

* Remove uneeded `data-cy` attributes

* Fix snapshots
2019-09-23 15:50:00 +02:00
Daniil Suleiman
f2ee633982
Fix gauge type selection (#45783)
* Fix gauge type selection

* Get rid of angles in config
2019-09-23 12:49:00 +03:00
Peter Pisljar
2198f2f6cc removing angular_vis_type (#45888)
* removing angular_vis_type
2019-09-20 18:30:42 -05:00
Gil Raphaelli
6b2451aa83
whitelist code docker env settings (#46151) 2019-09-20 13:39:50 -04:00
Sébastien Loix
bae7f4727c
[Form Helpers + Template UI] Refactor Template UI using Form lib + helpers (#45287) 2019-09-20 15:35:30 +02:00
Joe Reuter
91f3f1432c
[Graph] Kql support for query bar (#45364) 2019-09-20 14:26:30 +02:00
Matthias Wilhelm
7ef41387b6
Add numeric_type option for correct sort order on mixed date and date_nanos fields (#44212)
* Implement getSortForSearchSource for add-on of 'numeric_type' to the ES request. Then sorting on a field that can be of date or date_nanos type works correctly

* Add functional test
2019-09-20 07:38:41 +02:00
liza-mae
4c75b55a01
Revert hiding Kibana icon, test Percy rendering (#43990)
* Revert hiding Kibana icon, test Percy rendering

* Update jobs.yml

* Use percy token for kibana dev

* Update Percy token to read from kibana-issues

* Read correct field

* increase timeout

* Run each visual job 10 times

* Revert last commit

* Increase timeout

* Disable visual tests and revert percy token

* Fix jest tests

* Another jest test fix
2019-09-19 11:23:44 -06:00
Caroline Horn
c1fd6eb9b4
Upgrade EUI to 14.2.0 (#46075)
* Upgraded EUI to 14.2.0

* Remove form row + button shim

* Uncomment compressed prop from EuiComboBoxes

* Fix and/or simplify prepend/append usages

* Update two test files to correctly call EuiRange's onChange prop
2019-09-19 12:26:15 -04:00
Caroline Horn
634738bd77
[Maps] Design updates for compressed form styles (#46088) 2019-09-19 09:45:41 -04:00
Chris Davies
62951e0e00
Promote Lens to the front of the visualization list in the add visualization dialog (#46068) 2019-09-19 09:35:16 -04:00
friol
e60f4ed9ae Console improvement: toast as visual feedback when copying request as cURL (#45966)
* Adds a toast as visual feedback when request is copied to cURL in console

* Implemented changes requested by @jloleysens

* toastid should be a number
2019-09-19 14:31:38 +02:00
Joe Reuter
c739cb6267
[Graph] EUI-ification of search bar (#45351) 2019-09-19 11:20:10 +02:00
Matthias Wilhelm
c97811fcfb
De-angularize discover doc (#44660)
* Add react component

* Remove angular

* Refactor component data fetching

* Add tests

* Remove translation that need to be retranslated
2019-09-19 08:36:42 +02:00
Peter Pisljar
43c763afe2
removes vislib_vis_type (#45874) 2019-09-19 07:37:51 +02:00
Peter Pisljar
d451d723a2
cleaning up Vis object (#44885) 2019-09-19 07:37:15 +02:00
Stacey Gammon
01daabcb53
Move actions to NP (#44707)
* move actions to np

* fix jest and types
2019-09-18 21:50:34 -04:00
Joe Reuter
45c9f8cb1e fix scope digest issue with new button in discover (#45913) (#45993) 2019-09-18 14:16:28 -04:00
Larry Gregory
15e52f2e5e
Spaces NP Migration - Moving server to the LegacyAPI model (#45382) 2019-09-18 12:57:05 -04:00
Peter Pisljar
70d2777c2e
adding get to visulization.types (#45869) 2019-09-18 18:01:42 +02:00
Josh Dover
261a46ba73
Ensure core context providers are always provided to plugin pr… (#45918) 2019-09-18 10:41:28 -05:00
Brian Seeders
4142659079
Run pipeline scripts with runbld (#45844)
Change how runbld is invoked, and skip junit processing by default
2019-09-18 10:38:39 -04:00
Daniil Suleiman
35e0f9cf5b
Remove extra code from point series functional tests (#45895)
* Remove extra code

* Remove unused ids
2019-09-18 17:22:20 +03:00
Peter Pisljar
3d23deea07
moving agg_config and agg_configs to ui/agg_types (#45877) 2019-09-18 16:05:57 +02:00
Aleh Zasypkin
dc0851e03d
Do not restart server if TypeScript tests change. (#45867) 2019-09-18 11:54:43 +02:00
Josh Dover
812c950045
Move ui/notify banners to New Platform (#43610) 2019-09-17 16:11:59 -05:00