Commit graph

62 commits

Author SHA1 Message Date
Rashmi Kulkarni a0881f90e2
Test huge fields functional test (#93334)
* fixes https://github.com/elastic/kibana/issues/74449

* fix for unskipping test huge fields functional test

* fix eslint
2021-03-03 09:01:54 -08:00
Spencer 0aabc317ec
[kbn/test] add import/export support to KbnClient (#92526)
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-25 16:13:27 -07:00
Ahmad Bamieh c1d1b2b453
[Saved Objects] Allow exporting and importing hidden types (#90178)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-14 19:05:36 +02:00
Maja Grubic c37b0e1474
[Discover] Minor cleanup (#90260) 2021-02-04 15:00:22 +00:00
Maja Grubic c6be748a97
[Discover] Add support for unmapped fields using the fields API (#89074)
* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* [PoC] reading from the fields API in Discover

* Add N fields as a default column

* Make fields column non-removeable

* Do not add 'fields' to state

* Remove fields from app state and read from source when needed

* Remove fields column if a new column is added

* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* Improve error handling in search examples plugin.

* Add unit tests for legacy behavior.

* Remove uiSettings feature flag; add fieldsFromSource config.

* Rewrite flatten() based on final API design.

* Update example app based on final API design.

* Update maps app to use legacy fieldsFromSource.

* Update Discover to use legacy fieldsFromSource.

* Rename source filters to field filters.

* Address feedback.

* Update generated docs.

* Update maps functional test.

* Formatting fields column similar to _source

* Moving logic for using search API to updating search source

* Fix small merge error

* Move useSource switch to Discover section of advanced settings

* Do not use fields and source at the same time

* Remove unmapped fields switch

* Add basic support for grouping multifields

* Remove output.txt

* Fix some merge leftovers

* Fix some merge leftovers

* Fix merge errors

* Fix typescript errors and update nested fields logic

* Add a unit test

* Fixing field formats

* Fix multifield selection logic

* Request all fields from source

* Fix eslint

* Fix default columns when switching between _source and fields

* More unit tests

* Update API changes

* Add unit test for discover field details footer

* Remove unused file

* Remove fields formatting from index pattern

* Remove unnecessary check

* Addressing design comments

* Fixing fields column display and renaming it to Document

* Adding more unit tests

* Adding a missing check for useNewFieldsAPI; minor fixes

* Fixing typescript error

* Remove unnecessary console statement

* Add missing prop

* Fixing import order

* Adding functional test to test fields API

* [Functional test] Clean up in after

* Fixing context app

* Addressing PR comments

* Add support for unmapped fields

* Add data migration

* Add toggle unmapped fields logic

* Adding more unit tests

* Some cleanup

* More unit tests

* Fixing failing snapshot

* Add tooltip next to unmapped switch

* Add functional test for the feature

* Fixing a typo in a functional test

* Refetch data when unmapped fields value changes

* Updating mapping

* Support for fields API in search embeddable

* Addressing PR comments

* Fix failing unit test

* Updating the text

Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-03 15:04:55 +00:00
Pierre Gayvallet 84d49f1123
[SOM] display invalid references in the relationship flyout (#88814)
* return invalid relations and display them in SOM

* add FTR test
2021-02-01 11:03:44 +01:00
Uladzislau Lasitsa e8e8f78b39
[Vega] Use mapbox instead of leaflet (#88605)
* [WIP][Vega] Use mapbox instead of leaflet #78395

add MapServiceSettings class

some work

add tms_raster_layer

add LayerParameters type

clenup view.ts

some cleeanup

fix grammar

some refactoring and add attribution control

Some refactoring

Add some validation for zoom settings and destroy handler

Some refactoring

some work

fix bundle size

Move getZoomSettings to the separate file

update licence

some work

move logger to createViewConfig

add throttling for updating vega layer

* move EMSClient to a separate bundle

* [unit testing] add tests for validation_helper.ts

* [Bundle optimization] lazy loading of '@elastic/ems-client' only if user open map layer

* [Map] fix cursor: crosshair -> auto

* [unit testing] add tests for tms_raster_layer.test

* [unit testing] add tests for vega_layer.ts

* VSI related code was moved into a separate file / unit tests were added

* Add functional test for vega map

* [unit testing] add tests for map_service_setting.ts

* Add unload in function test and delete some unneeded code from test

* road_map -> road_map_desaturated

* [unit testing] add more tests for map_service_settings.test.ts

* Add unit tests for view.ts

* Fix some remarks

* Fix unit tests

* remove tms_tile_layers enum

* [unit testing] fix map_service_settings.test.ts

* Fix unit test for view.ts

* Fix some comments

* Fix type check

* Fix CI

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-29 16:49:51 +03:00
Pierre Gayvallet 477d0bbe21
add SavedObject export hooks (#87807)
* initial POC

* fix spaces UT

* address POC feedback, add tests for applyExportTransforms

* add sorting for transforms

* add type validation in SOTR

* add FTR tests

* update documentation

* add explicit so type export for client-side

* update generated doc

* add exporter test

* update license headers

* update generated doc

* fix so import... imports

* update generated doc

* nits

* update generated doc

* rename test plugins

* adding FTR tests on export failures
2021-01-21 15:27:28 +01:00
Maja Grubic 9b22789c3c
[Discover] Use fields API to retrieve fields (#83891)
* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* [PoC] reading from the fields API in Discover

* Add N fields as a default column

* Make fields column non-removeable

* Do not add 'fields' to state

* Remove fields from app state and read from source when needed

* Remove fields column if a new column is added

* Add search source to example plugin.

* Add uiSetting for fields API.

* Update SearchSource to support fields API.

* Improve error handling in search examples plugin.

* Add unit tests for legacy behavior.

* Remove uiSettings feature flag; add fieldsFromSource config.

* Rewrite flatten() based on final API design.

* Update example app based on final API design.

* Update maps app to use legacy fieldsFromSource.

* Update Discover to use legacy fieldsFromSource.

* Rename source filters to field filters.

* Address feedback.

* Update generated docs.

* Update maps functional test.

* Formatting fields column similar to _source

* Moving logic for using search API to updating search source

* Fix small merge error

* Move useSource switch to Discover section of advanced settings

* Do not use fields and source at the same time

* Remove unmapped fields switch

* Add basic support for grouping multifields

* Remove output.txt

* Fix some merge leftovers

* Fix some merge leftovers

* Fix merge errors

* Fix typescript errors and update nested fields logic

* Add a unit test

* Fixing field formats

* Fix multifield selection logic

* Request all fields from source

* Fix eslint

* Fix default columns when switching between _source and fields

* More unit tests

* Update API changes

* Add unit test for discover field details footer

* Remove unused file

* Remove fields formatting from index pattern

* Remove unnecessary check

* Addressing design comments

* Fixing fields column display and renaming it to Document

* Adding more unit tests

* Adding a missing check for useNewFieldsAPI; minor fixes

* Fixing typescript error

* Remove unnecessary console statement

* Add missing prop

* Fixing import order

* Adding functional test to test fields API

* [Functional test] Clean up in after

* Fixing context app

* Addressing PR comments

* Updating failed snapshot

* Addressing PR comments

* Fixing i18n translations, updating type

* Addressing PR comments

* Updating a functional test

* Add a separate functional test for fields API

* Read fields from source in a functional test

* Skip buggy test

* Use default behavior in functional tests

* Fixing remaining failing tests

* Fixing date-nanos test

* Updating FLS test

* Fixing yet another functional test

* Skipping non-relevant tests

* Fixing more tests

* Update stub import in test

* Fix import

* Fix invalid import

Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-15 14:47:35 +00:00
Matthew Kime 48ac9f706e
[index patterns] Field custom name => custom label (#83717)
* custom name => custom label
2020-11-19 16:03:05 -06:00
Matthias Wilhelm 0a7f462939
[Discover] Allow custom name for fields via index pattern field management (#70039)
Co-authored-by: Matt Kime <matt@mattki.me>
2020-11-17 13:18:07 +01:00
Matthias Wilhelm b44a0e5b02
[Discover] Unskip flaky tests based on discover fixture index pattern (#82991) 2020-11-12 05:45:17 +01:00
Pierre Gayvallet 210d6f2df1
Legacy SO import: Fix bug causing multiple overrides to only show the last confirm modal (#76482)
* Legacy SO import: Fix bug causing multiple overrides to only show the last confirm modal

* eslint

* fix for loops
2020-09-03 08:50:03 +02:00
Matthias Wilhelm 7f6cd5148a
[Discover] Improve histogram tests (#72235) 2020-07-21 07:09:25 +02:00
Liza Katz 52b42a81fa
Allow creating filters from fields with null values in discover (#70936)
* Fix bug #7189

* typo

* Test adjustments

* wait for load complete

* Fine tune test

* Update src/plugins/data/public/query/filter_manager/lib/generate_filters.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Fix filtering by an array of nulls
Allow filtering by a non existing field in the doc
simplify flatten hit logic

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 11:58:22 +03:00
Liza Katz 537d2f2de1
[FIX] Allow filters without index (#68225)
* Allow filters without index

* Explicitly return true from isFilterApplicable id no index patterns were provided

* Adjust test result
2020-06-04 20:42:52 +03:00
Liza Katz fbcb74ce28
Add error if filter index pattern is missing (#66979)
* add error if filter index pattern is gone

* docs change - why?

* Fix i18n

* Added a functional test for broken filters (field + index pattern)

* Clarify readme

* Moved readme

* New warning status

* Remove getAll

* git pull upstream master

* Fix translation files

* Fix merge

* added filterbar texts

* disabled correction

* Disable check in maps test until #64861 is resolved

* Fix tests, warning state is not disabled.

* Adjust warning filter - ignore filters from "foreign" index pattern, that are still applicable

* Add an additional unrelaeted filter test

* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fixed test data

* Revert mapping

* Update data with missing test

* Update test to match data

* Code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-03 09:35:44 +03:00
Anton Dosov 13138c05c4
Fix "Could not locate that index-pattern" recreate link is not working (#67280)
added a functional test, because we've recently fixed this link and it regressed again
2020-05-27 14:56:45 +02:00
Pierre Gayvallet 61936a1870
[SOM] Preserve saved object references when saving the object (#66584)
* create field for references and add comments

* add FTR test

* remove comments

* address comments

* use real reference in dataset and assert against it.
2020-05-16 09:08:45 +02:00
Matthias Wilhelm 2a1c8d8de4
[Discover] Hide time picker when an indexpattern without timefield is selected (#62134)
* Assign valid value whether the timepicker should be displayed

* Add functional tests
2020-04-09 14:30:21 +02:00
DziyanaDzeraviankina f29a5dd05b
Auto interval on date histogram is getting displayed as timestamp per… (#59171)
* Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed

Closes #57822

* Fixed incorrect interval label displaying while scaling the chart.

* Updated agg.test.tsx snapshot

* Got rid of context and refactored agg hooks

* Fixed agg.type.name check

* Added functional tests to cover the date histogram interval editing

* Fixed some expected values in tests

* Updated some test cases

* Added a new visualization to visualize archive

* Added testSubjects service to replace find where possible

* Updated tests to match updated behavior

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-31 17:17:09 +03:00
Maryia Lapata 45a5ad55bc
[Default editor] Catch invalid calendar exception (#60494)
* Catch invalid calendar exception

* Use isValidEsInterval directly

* Show field error message right away

* Fix for the case 2w

* Update time_interval.tsx

* Restructure validation

* Rename fn to isValidCalendarInterval

* Refactoring

* Update time_interval.tsx

* Add functional tests

* Add functional tests for interval

* Update _area_chart.js

* Don't show error when value is empty

* Use error message from InvalidEsCalendarIntervalError

* Update _area_chart.js

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-26 18:24:03 +03:00
Lee Drengenberg afca33b520
add relationship test on Saved Objects (#59968)
* just a demo of function to return saved object table elements

* fix esArchive data, extend import objects test case for relationships

* improved data-test-subjs

* update snapshot for jest test

* unskip other half of the tests

* removed commented-out code

* use new findByTestSubject methods

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 14:18:35 -05:00
Pierre Gayvallet 395d621249
migrate saved objects management edition view to react/typescript/eui (#59490)
* migrate so management edition view to react

* fix bundle name + add forgotten data-test-subj

* add FTR tests for edition page

* EUIfy react components

* wrap form with EuiPanel + caps btns labels

* Wrapping whole view in page content panel and removing legacy classes

* improve delete confirmation modal

* update translations

* improve delete popin

* add unit test on view components

* remove kui classes & address comments

* extract createFieldList and add tests

* disable form submit during submition

Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-03-19 14:09:44 +01:00
Matthias Wilhelm c42d23347a
[Discover] Fix context view for date_nanos format with custom timestamps (#54089)
* Switch from _source to fields when fetching anchor records with date_nanos timestamps

* Add testdata

* Add functional test
2020-01-14 15:15:30 +01:00
Brian Seeders d6e0e9a314
Revert "Merge branch 'savedExportImportTest'"
This reverts commit 97612ba44c, reversing
changes made to 60660fcd1e.
2019-12-20 10:34:14 -05:00
bhavyarm fdf3ed97d5 data files for saved objects 2019-12-16 10:15:17 -05:00
Matt Bargar 1dcec9d210
Add nested field support to KQL (#47070)
This PR adds a new syntax to KQL for querying nested fields.

Nested fields can be queried in two different ways:

Parts of the query may only match a single nested doc (bool inside nested). This is what most people want when querying on a nested field.
Parts of the query may match different nested docs (nested inside bool). This is how a regular object field works but nested fields can be queried in the same way. Although generally less useful, there are occasions where one might want to query a nested field in this way.
The new KQL syntax supports both.
2019-10-30 13:07:43 -04: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
Matt Bargar e233e419cf
Implement saved queries and filters (#39140)
Introduces "saved queries". Saved queries are a new saved object type similar to saved searches but more limited in scope. They allow users to store the the query string in the query bar and optionally the set of filters and timefilter in order to reload them anywhere a query is expected: Discover, Visualize, Dashboard, anywhere that uses our full SearchBar component.
2019-08-21 16:53:19 -04:00
Dmitry Lemeshko 9b9801f470
functional tests for input control range (#42483)
* [apps/visualize] functional tests for input control range

* update jest test to have 100% combined coverage with functional
2019-08-21 17:22:54 +02:00
Matthias Wilhelm a33201cf39
Support for date_nanos type timestamps in context view (#38023)
* Reenable context view for time_nanos based index patterns
2019-06-11 15:04:54 +02:00
Nathan Reese 8dbfbddb53
Fetch options for input control child select boxes (#38148) 2019-06-07 06:57:56 -06:00
Matthias Wilhelm 953930be49
Support Elasticsearch date_nanos datatype (#36111)
* Add date_nanos to date type in kibana field types
* date_nanos by default is formatted by "Date Nanos" format
* Format computed date_nanos field to strict_date_time to prevent rounding
* Hide Discover - "View surrounding documents" btn for date_nanos (will be subject of another PR)
* Append number of nano seconds to formatted timeField
* Add new key dateNanosFormat to UI setting defaults
2019-05-31 08:52:32 +02:00
Marco Vettorello 57b66c6085
Fix filling x axis values for date histogram (#35247)
The interval parameter is used to fill the gaps between missing buckets. If we are using a calendar interval it not always correspond correctly to his milliseconds representation. E.g. 1y interval can correspond to 365 or 366 days depending on the interval and. If transformed to milliseconds it can get one of those two values depending of the interval start and end. The same happens for months.

Add a new esarchive with 7 years of data, used for those functional tests

Removed angular dependency from zero injection
2019-04-24 07:37:11 +02:00
John Dorlus e79959273f
Removed createIndexPattern via UI and used ES Archiver. (#35374) 2019-04-23 10:50:04 -04:00
Spencer 133ba2360f
[esArchiver] stable archives (#30477)
* [esArchiver/save] serialize with stable json stringify

* [esArchives] rebuild all archives
2019-02-11 11:16:25 -08:00
Chris Davies 2510ccb0ae
Upgrade Kibana to Elasticsearch 7.0 (#29184) 2019-01-30 09:08:58 -05:00
Marco Vettorello 89efb81fca
Fix TSVB state updates when changing indexpatterns (#24832)
* Move fieldsFetch logic into the vis editor

* Add annotations index pattern change detection

* Fix async update of state. Add functional test

* Add missing data archive

* Force fetch when component mount the first time

* Fix parameters naming

* Refactoring indexPatterns to fetch
2018-11-06 11:50:46 +01:00
Rashmi Kulkarni 2938d94d97
Mgmt saved object test (#22564) 2018-09-05 14:19:51 -07:00
Tim Roes 6fa2b04aef
Add functional tests for visualize loader API (#22595)
* Initial visualize loader functional tests

* Extend plugin test README

* Add temporary tz work around

* Switch to Australia/North timezone

* Add filtering tests

* Add all tests

* Remove unneeded uiExports

* Improve explanation

* Add saved object test, add retry
2018-09-04 12:53:18 +02:00
Peter Pisljar c38e948c2c
fixing date_histogram to correctly work inside plugins without global time picker (#21955) 2018-08-22 12:42:28 +02:00
CJ Cenizal 87cccfc101
Revert "Tests for visualization screenshot comparison (#17545)" (#19692)
This reverts commit 84d678bbb9.
2018-06-05 17:08:29 -07:00
Bhavya RM 84d678bbb9 Tests for visualization screenshot comparison (#17545)
* undoing a messy merge

* updating screenshots

* changing the variance to account for data table failure

* trying a different variance for data table and a general one for the rest of the screenshots

* changing the variance for general to .065

* adding xy position to adjust the screensize

* changing variance and setting a small window

* create calibrateForScreenshots method

* remove empty lines
2018-06-05 19:14:29 -04:00
Stacey Gammon c14f7a72c4
Reporting API test expansion and clean up (#18986)
* Update & expand reporting API tests

* remove xpack stuff from oss archive

* wrap "it"s so they are in expected order.

* Update expected recent stats

* url was pointing to a visualization not a csv

* Move comment around

* Merging with changes on master renaming stats to usage

* fix reference to old stats file.

* bad merge
2018-05-22 12:48:20 -04:00
Stacey Gammon 3c8c23c9ef
Expand coverage of dashboard tests (#17703)
* Expand coverage of dashboard tests and decrease time

* Fix timing error when sub urls fail to save from too fast app link clicking

* discover doesn't have breadcrumbs

* Check top nav text so it works on both listing and saved object edit/view pages

* need to do the add panel operations one at a time

* Need both types of input in filter

* Give test data a title

* Remove incorrect and unnecessary comment

* Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress

* Remove code accidentally checked in
2018-05-01 09:12:36 -04:00
Rashmi Kulkarni 5ef60e09fd
adding large_string_test (#17312)
* adding large_string_test

* removed a failing test, modified the existing one

* new line at the end of mappings.json

* removed the data.json file and also removed the navigateTo() and clickKibanaIndices() as createIndexPattern() takes care of it

* more modifications
2018-03-23 10:48:51 -07:00
Bhavya RM 64ea452a0c
Functional tests to add index alias reference (#17343)
Test to make sure Kibana handles index alias reference.
2018-03-23 13:01:50 -04:00
CJ Cenizal a7147f2ca7
Improve feedback in Discover (#16771)
* Add Painless scripted field error callout to Discover. Remove recursive beginSegmentedFetch call.
* Add getDocLink service. EUIfy Discover 'no results' state.
* Rename initSegmentedFetch to handleSegmentedFetch to differentiate it from beginSegmentedFetch.
2018-03-22 12:48:19 -07:00
Lee Drengenberg db84d62faf
Getting Started - Shakespeare (#16827)
* WIP - add shakespeare data for getting started guide

* Refactor of getLineChartData, getBarChartData, getAreaChartData

* Added changing extents and test

* Fix opening axis options

* Change precision from 8 to 7

* lower precision to 6

* Fix index pattern creation

* update from review, remove comments, add others
2018-03-14 15:42:48 -05:00