Commit graph

70 commits

Author SHA1 Message Date
Matthew Kime 8b50d70a36
[7.x] [data views] clarify field subtype typescript types (#112499) (#114222)
* [data views] clarify field subtype typescript types (#112499)

* separate out multi and nested subTypes

* separate out multi and nested subTypes

* add undefined checks

* remove expect error statements

* use helper functions in es-query

* simplify changes with helper functions

* checking existence instead of getting value x2

* simplify types and revert discover changes

* update discover sidebar with helper methods

* try helpers with group_fields file

* try different helper with group_fields file

* revert group field changes, try nested field helpers

* revert nested field changes, try field_name.tsx helpers

* fix maps jest test

* use helpers in discover instead of setting types

* fix field_name.tsx

* Update index_pattern_util.test.ts

* lint  fix

* fix common exports

* reduce data_views plugin bundle size

* reduce data_views plugin bundle size

* remove discover reliance on es-query package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-es-query/src/es_query/handle_nested_filter.ts

* fix test
2021-10-07 17:49:42 -04:00
Tyler Smalley c16480e849
[7.x][DX] Upgrade prettier to v2.4.0 (#112359) (#112524)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-09-19 22:34:46 -07:00
Kibana Machine 7336717d61
chore(NA): replace babel config files by inline presets by default in the jsts_transpiler rule (#110620) (#111217)
* chore(NA): replace babel config files by inline presets by default in the js_ts_transpiler rule

* chore(NA): update @kbn/ace build to exclude worker file

* chore(NA): remove config file support

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-09-03 18:41:32 -04:00
Matthew Kime 8b5ef3ff43
[data views] deprecate indexPattern exports, provide dataView exports (#109987) (#110551)
* first pass at renaming exports

* type fixes

* fix jest test

* look for correct error type

* remove transitional error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts
2021-08-30 21:35:41 -04:00
Kibana Machine 94b12f1af4
[Data][Es Query] Use ES types in Filters (#108378) (#109793)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* types for filters

* sec fixes

* filtersss

* typey type

* typey type

* comparator options

* test typescript

* test

* fixes

* test types

* test

* cr

* cleanup a bit more

* Jest fix + types

* Remove geo bounding box and geo polygon filters

* delete geo filters

* geo

* geo

* Fix tests \_0_/

* doc

* types and fixes

* jests

* ts

* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs

* ts

* plg ts

* types

* cast

* Update types.ts

* Update create_threat_signal.ts

* Update packages/kbn-es-query/src/es_query/migrate_filter.ts

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

* Code review

* revert change

* docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-08-24 07:56:17 -04:00
Liza Katz d3a9cc540d
[Data cleanup] Remove geo filters (#109097) (#109118)
* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs
2021-08-18 13:41:22 -04:00
Mikhail Shustov dd33a5558e
[7.x] Update dependency @elastic/elasticsearch to ^7.15.0-canary.3 (#107536) (#108890)
* Update dependency @elastic/elasticsearch to ^8.0.0-canary.17 (#107536)

* Update dependency @elastic/elasticsearch to ^8.0.0-canary.15

* update tests for new error message building mechanism

* fix integration tests

* fix functional test

* mute new type errors

* fix new type errors

* bump es client to canaary.16

* fix integration test

* fix type errors in infra plugin

* mute type error in ml plugin

* fix type errors in monitoring plugin

* fix and mute errors in security solution plugin

* bump version to canary.18

* remove an unnecessary change

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: restrry <restrry@gmail.com>

* bump to canry3

* fix another conflict

* fix another conflict in test file

* fix test. use assetion against stable parts

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-17 14:14:50 -04:00
Kibana Machine 70d8ef3573
[Data][Es Query] Use ES types in Kuery functions (#108367) (#108848)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* sec fixes

* typey type

* test typescript

* test

* fixes

* test

* cr

* cleanup a bit more

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-17 12:18:04 +00:00
Kibana Machine 9203a5918b
[Data][Es Query] Use ES types instead of DslQuery (#108290) (#108447)
* es-query types

* jest and lint

* cc

* options

* type

* type

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-12 23:25:46 +00:00
Lukas Olson d2aa433d4d
Add scoring support to KQL (#103727) (#108321)
* Add ability to generate KQL filters in the "must" clause
Also defaults search source to generate filters in the must clause if _score is one of the sort fields

* Update docs

* Review feedback

* Fix tests

* update tests

* Fix merge error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-12 03:16:43 -04:00
Spencer 79e45f2190
[build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139)
* [build_ts_refs] improve caches, allow building a subset of projects

* cleanup project def script and update refs in type check script

* rename browser_bazel config to avoid kebab-case

* remove execInProjects() helper

* list references for tsconfig.types.json for api-extractor workload

* disable composite features of tsconfig.types.json for api-extractor

* set declaration: true to avoid weird debug error

* fix jest tests

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	.gitignore
#	examples/hello_world/tsconfig.json
#	tsconfig.json
#	tsconfig.refs.json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 05:08:54 -04:00
Kibana Machine 32ebd0af7b
[Data cleanup] unify serializable state (#107745) (#108020)
* Use Serializable from package

* Rename to align with core

* fix

* more replacements

* docssss

* fix

* Move it to @kbn/utility-types and remove core export

* buildy build

* tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-08-10 13:33:44 +00:00
Liza Katz 272a2af379
[7.x] [Data] Cleanup filter docs (#107169) (#107834)
* Update SM doc for alert per object (#107420)

Update stack monitoring doc to account for alert notification now being send for each node, index, or cluster based on the rule type, instead of always per cluster (PR# 102544)

* [Data] Cleanup filter docs (#107169)

* Move more utils to package and cleanup API

* docs and imports

* better imports

* change comment

* Better docs

* typos

* typo

* fixes

* casting

* Code review

* Update meta_filter.ts

* fix

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.castestokbnfieldtypename.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getkbntypenames.md
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.buildqueryfromfilters.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.castestokbnfieldtypename.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.esqueryconfig.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.filter.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldsubtype.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.kuerynode.md
#	src/plugins/data/public/public.api.md

* doc

Co-authored-by: Ravi Kesarwani <64450378+ravikesarwani@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-07 14:48:17 -04:00
Kibana Machine 73cb1647a5
chore(NA): moving @kbn/es-query to babel transpiler (#107281) (#107318)
* chore(NA): moving @kbn/es-query to babel transpiler

* chore(NA): update limits

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-07-30 16:02:22 -04:00
Kibana Machine d4ef7a7eab
[Data][Filters] Move more filter utils to package and cleanup API (#106566) (#106988)
* Move more utils to package and cleanup API

* docs and imports

* better imports

* change comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-07-28 09:50:29 -04:00
spalger 78b3b3b98b Revert "[i18n] [7.x] Integrate 7.14.0 Translations (#106359)"
This reverts commit 4d356ed432.
2021-07-22 13:47:56 -07:00
Ahmad Bamieh 4d356ed432
[i18n] [7.x] Integrate 7.14.0 Translations (#106359) 2021-07-22 11:41:06 -04:00
Kibana Machine 2c4aaf67b6
[Es query] Move to package (#103530) (#106417)
May the forces of bootstrapping helps us 🙏🏻 😉

Co-authored-by: Liza Katz <lizka.k@gmail.com>
2021-07-21 13:32:55 -04:00
Luke Elmers a812ee93fe
[7.x] Move @kbn/es-query into data plugin (#51014) (#51783) 2019-11-26 16:07:16 -07:00
Alexey Antonov 01acf69497
Move @kbn/es-query into data plugin - remove unused code (#50903) (#51003) 2019-11-19 13:55:03 +03:00
Alexey Antonov 88558f4ccf
[7.x] Move @kbn/es-query into data plugin - es-query folder (#50182) (#50824)
* Move @kbn/es-query into data plugin - es-query folder (#50182)

* Move @kbn/es-query into data plugin - es-query

* fix eslint issues

* Fix PR comments

* fix CI

* fix Ci

* remove extra ts-ignore

* fix imports

* fix imports

* Test importing from data/public and casting to ES Field Types.

* Test importing from data/public and casting to ES Field Types.

# Conflicts:
#	src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
#	x-pack/legacy/plugins/siem/public/lib/keury/index.ts
#	x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
#	x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
#	x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx

* fix merge conflicts
2019-11-16 13:21:39 +03:00
Alexey Antonov 2cdb800988
Move @kbn/es-query into data plugin - filters folder (#49843) (#50100)
Dismissing reviews from ml and canvas as this is only an import change. 


* Move @kbn/es-query into data plugin - filters folder

* fix PR comments
2019-11-08 16:32:22 +03:00
Matt Bargar 7a1f9fbaec
Add nested field support to KQL (#47070) (#49762)
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 14:44:26 -04:00
Spencer 07caa65860
[7.x] Update moment related packages (#46849) (#49517)
* Update moment related packages

* unify moment version in yarn.lock

* adapt ro pluralization fixes

* update some bad pluralization in fixtures/snapshots
2019-10-28 15:40:39 -07:00
Spencer 4bd85e3194
[7.x] Remove rimraf (#48985) (#49187)
* Update dependency del to v5

* unify del/rimraf usage with del v5

* update yarn.lock

* update kbn-pm distributable

* remove poorly transformed code

* force some deletes from tmp

* mock less of the fs module

* force tmp deletion in a few more suites

* please make this the last force

# Conflicts:
#	packages/kbn-plugin-helpers/package.json
2019-10-24 08:10:17 -07:00
Matt Bargar 52122d0a34
Stop generating filters with old invalid match phrase query syntax (#48033) (#48951)
We've migrated the old syntax at query time for a long time, but when creating a phrase filter we still used the old (now invalid) syntax. This could be confusing to users since the raw query DSL is viewable in the filter editor. Also, since map_phrase.ts only expected the old syntax, it wouldn't detect a match_phrase filter if the user entered the new syntax into the raw DSL editor.

This PR updates all of the filter generation code that I know of to use the new syntax, and it updates the map_phrase.ts file to accept both syntaxes.
2019-10-22 16:26:14 -04:00
Lukas Olson 1a86af2440
[7.x] Refactor, deangularize courier/search source (#48681)
* Backport 45235 to 7.x

* Fix search source tests
2019-10-18 15:49:19 -07:00
Rudolf Meijering 83bf4ef0ce
Server saved objects client through request context (#44143) (#48378)
* Expose Saved Objects client in request context

* API Integration test for savedobjects in req context

* SavedObjectsClient docs

* SavedObjectsClient#find remove dependency on indexPatterns

And use the saved objects mappings instead

* Review comments

* Review comments, fixes and tests

* Use correct type for KQL syntax check
2019-10-16 12:08:32 +02:00
Alexey Antonov c3b9013082
Convert ui/agg_types/buckets to TypeScript / Jest (#47730) (#48266)
* Convert `ui/agg_types/buckets` to TypeScript / Jest

* fix eslint issues

* fix CI

* fix JEST test

* fix mocha tests

* Fix PR comments
2019-10-15 23:16:50 +03:00
Liza Katz 570cbf7d51
Remove indexPatterns dependency from filter service (#47471) (#48217)
* 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 19:23:01 +03:00
Wylie Conlon f6c0ea623c
[lens] Use top nav in Lens app (#46190) (#47238)
* [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-04 11:16:05 -04:00
Xavier Mouligneau aa36b9e994
Add KQL functionality in the find function of the saved objects (#41136) (#47182)
* 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-03 08:42:35 -04:00
Alexey Antonov f27d31de68
Convert filter_manager/lib to TypeScript / Jest (#45785) (#46778)
* 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 18:00:27 +03:00
Spencer 24208ace6c
Update dependency del to ^4.1.1 (#44806) (#44825)
# Conflicts:
#	packages/kbn-plugin-helpers/package.json
2019-09-05 11:14:29 -07:00
Spencer 31e7eec1ce
[7.x] Update babel related packages (#43595) (#43837)
* Update babel related packages (#43595)

* upgrade all babel related modules, and bump lodash minors

* update kbn-pm dist

* update fetch-mock, necessary to use core-js 3

* use regenerator transform in jest tests, as required by EUI

* disable useBuiltIns rather than using regenerator plugin

* remove extra regenerator-runtime import

* Update package.json

* update yarn.lock
2019-08-23 08:24:52 -07:00
Luke Elmers ee3b21f698
[7.x] Initial conversion of Index Patterns service to TypeScript. (#39247) (#42288) 2019-08-03 06:44:19 -06:00
Matt Bargar 65258a4ed8
Put filters back in the filter context where they belong (#42095) (#42496)
Filters were never really meant to take part in scoring in the first place. This PR puts filters back in the filter context where they were in 4.x so they can benefit from the filter cache.
2019-08-02 10:36:00 -04:00
Spencer 614af05967
[7.x] [autoprefixer] upgrade to 9.6.1, unify browserslist hand… (#41145)
* [autoprefixer] upgrade to 9.6.1, unify browserslist handling

* remove debug option from datemath babel config
2019-07-15 13:01:17 -07:00
Brandon Kobel b89231d119
Updating lodash (#40702) (#41025)
* Updating to @elastic/lodash to 3.10.1-npm-kibana2

* Updating lodash to 4.17.13

There's a stray dependency to lodash 4.17.11 via cypress which doesn't
use "^". This is a dev dependency, so we can ignore it for a bit while
they update their package.json

* Updating some forgotten references to @elastic/lodash@3.10.1-kibana1

* Updating lodash-es to 4.17.13

* Updating to @elastic/lodash to 3.10.1-npm-kibana3

* Using the root resolutions to update cypress's version of lodash.

Thanks @spalger!!!
2019-07-12 11:42:06 -07:00
Spencer 1591c25148
[7.x] [ts] upgrade to 3.5.3 (#40228) (#40795)
* [ts] upgrade to 3.5.3 (#40228)

* [ts] upgrade to 3.5.2

* [ts] run from cwd so that relative paths are correct

* move eslint-disable-line comment into jsx attribute

* autofix eslint violations

* avoid generic type, it's not necessary and problematic

* make elasticsearch.cluster optional, many instances don't have them

* remove invalid prop

* expand AllowUnknownProperties to cleanly handle arrays

* esfilter values can sometimes be an array of strings

* allow exception objects to have unknown properties

* define accumulator as a boolean

* fix return type

* return a 404 if beat isn't found after update

* use Object.values for better types

* define return type of get() call

* define value type for Set

* define return value of get()

* define State property type

* use less get(), so ts can infer types

* define Set item type

* map state type

* make default_operator optional, since it's not always defined

* remove seemingly unused prop

* define return type of get() fn

* define inner type for state

* don't define base types are objects with index signatues

* regenerate public api docs

* make indices privileges optional too

* remove unnecessary index-signature from Exception interface

* use variadic _arg instead

* [core/plugin] use Record<string, any> rather than {}

* replace a couple more instances of {}

* revert some unnecessary changes

* remove unused types

* [reporting] output, payload, and meta are required properties

* bump to latest patch version

# Conflicts:
#	x-pack/legacy/plugins/canvas/server/usage/custom_element_collector.ts
#	x-pack/legacy/plugins/canvas/server/usage/workpad_collector.ts

* define inner type for Set

* default `config.get()` to any instead of unknown
2019-07-10 15:22:35 -07:00
Peter Pisljar 5341d11005
updating metricvis interpreter func arguments (#34532) (#39872) 2019-06-28 08:16:09 +02:00
Matt Bargar e1a19ccd57
[7.x] Enable use of KQL and autocomplete in filters agg editor (#37287) (#38468)
* Enable use of KQL and autocomplete in filters agg editor (#37287)

This PR updates the filters agg editor to use the full QueryBar component, enabling use of KQL and autocomplete inside the editor for this aggregation in Visualize.

* remove unused translation
2019-06-10 18:24:20 -05:00
Stacey Gammon 5c66668c69
Backport #37527 (#38298) 2019-06-06 16:35:14 -04:00
Spencer 3fe5c954bf
[7.x] dependency updated (#37406) (#37465)
* Pin dependencies (#37406)

* Pin dependencies

* include core-js in babel packages

* specify core-js version when using `useBuiltIns`

* dedupe @babel/types to avoid "range of null" problem

* chore(deps): update dependency del to v4 (#37466)

* chore(deps): update dependency del to v4

* remove @types/del since they ship with the package now

(cherry picked from commit c60e3491a2)

* Update gulp related packages (#37456)

(cherry picked from commit 62893ec0bc)

* Update babel related packages (#37464)

(cherry picked from commit 830bd1f0ca)
2019-05-30 14:57:56 -07:00
Peter Pisljar 0da40546f2
Fix histogram range update when x axis is scripted field (#25379) (#36973) 2019-05-24 07:04:53 +02:00
Matt Bargar 7e17ce66df
Improve KQL error messages (#34900) (#35559)
Attempts to make KQL syntax errors more sensical to the average user.

I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.

So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.

I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
2019-04-24 19:21:23 -04:00
Matt Bargar 11a05bd8a4
Add esTypes property to index pattern field (#35251) (#35438)
Adds an array property to the Field object containing all of the types the field is mapped as across ES indices.
2019-04-23 13:36:30 -04:00
Spencer 0f342e3c3f
[7.x] [npm] upgrade getopts (#34603) (#35106)
Backports the following commits to 7.x:
 - [npm] upgrade getopts  (#34603)
2019-04-15 15:45:10 -07:00
Christiane (Tina) Heiligers 088c591883
Enables optional use of the timezone set in Advanced Settings in queries (#34602) (#34753)
* Adds time_zone to query

* Adds dateFormatTZ to kuery query

Removes comments

* Adds defaults for the dateFormatTZ to the function signatures

* Adds tests for date match in kuery

Modifies test

* Adds a test for get_es_query_config

* Adds test for get timezone from settings utility method

* Adds tests for modified range method

Adds config param test to node_types/functions

code clean up

* resolves initial PR comments

* Refactors build_es_query test

* Refactors get_time_zone_from_settings test

* Uses spys to test that the config is passed down to children in ast toElasticsearchQuery

* removes default config nulls

* Deletes sinon.spy tests in kuery

* removes moment.setDefault from __tests__/get_timezone_from_settings.js
2019-04-08 15:15:14 -07:00
Tiago Costa f062c97302
chore(NA): merge and solve conflicts with 7.x (#34645) 2019-04-05 19:14:26 +01:00