kibana/docs
Lukas Olson 0f00c23a68
Kibana query language autocomplete (#15945)
* First stab at refactoring typeahead

* Don't double submit on enter

* Add item templating

* Introduce simple kuery language

* Rename to kql and add modules

* Update KQL syntax

* Automatically insert matching pairs

* Don't match quotes after alphanumeric chars

* Get field and value suggestions

* Remove accidental changes

* Remove unnecessary test

* Don't submit on enter

* Fix typeahead

* Suggest matching recent searches

* Suggest operators

* Suggest conjunctions

* Use template, separate suggestions into separate modules

* Whoops, add this module back

* Add clarifying comment

* Fix history log key

* Don't update suggestions on every key press

* Fix key handling

* Update terminology to be clearer

* Fix typo

* Simplify building of nodes

* Don't always hide on submit

* Check items exists

* Add icon directive which wraps EuiIcon.

* kql design start

* remove comment bits

* Simplify select next/prev and reset selected on hide/backspace

* Add test

* Put persistedLog on scope so it can be tested

* Fix typos

* Build up AST for sublist by returning functions that take a field name

* Remove single quoted strings and add double quote to special characters

* Build nodes with arg nodes instead of args themselves

* Add support for exact phrase search for quoted values

* Update typeahead items when language changes

* Finish that work I didn't do in the last commit

* This commit makes Bargs very happy cuz it does a lot

* Add wildcard field support to range query

* Remove range support for wildcard values

* Remove KQL as a separate language

Updates kuery to use KQL's grammar. This will lead to a smoother
transition for both us and Kuery users. We mainly added KQL as a
separate language so that we could notify Kuery users that the syntax
had changed. I realized we could do the same by trying to parse their
query strings with the old grammar if the new grammar fails, and if the
old grammar parses successfully we can display an error message with a
link to the docs describing the syntax changes. Since Kuery now uses the
more simple KQL syntax, I've also re-enabled the filter bar when Kuery
is selected.

* Fix typeahead behavior

* Update conjunctions

* Use scope apply

* Suggest conjunctions after ranges

* Support strings in wildcard node constructor and add tests for wildcard node

* test updates

* Removing unused serializeStyle and toKueryExpression, updating tests

* Fix functional test

* Fix typo

* Show fields that match in any part of the name

* Alter order of operators

* Preserve focus after selecting by click

* Ports tests for `fromKueryExpression` to `fromKqlExpression`

* More KQL syntax tests

* Suggest conjunctions after ranges

* Fix suggestions inside parens

* fromLiteralExpression tests

* remove serializeStyle arguments which no longer exist in the function definition

* tests for getFields

* Case insensitive search for field names

* update tests for is.js

* add wildcard fieldname test for range.js

* Fix removed div

* Fix line spacing for autocomplete suggestions

* Fix conjunction suggestions with escaped preceding literals

* Escape special characters in fields and values

* Don't suggest the value that's already selected

* Update icons

* Sort prefix first

* Simplify cursor detection and suggest booleans

* Use quotes for suggested values

* get rid of references to KQL

* Don't show errors from parsing

* That didn't even exist

* Use config to determine if values are suggested

* Update suggestions on home/end

* remove hack

* Update reference to kql

* Suggestions for quoted values

* Clean up grammar

* Better support for cursor inside spaces

* Create grunt task to generate parsers from peg files

* Simplify wildcard handling

* Don't filter out the exact fields/values

* Update parsing modules

* Fix peg task

* Make operator syntax more visible

* Update OR verbiage

* Simplify and improve match pairs

* Revert "Simplify wildcard handling"

This reverts commit 915861beab.

* Support escaped backslashes inside quoted strings

* Support escaped keywords

* Remove lodash dependency cuz w33ble

* Escape user input and fix conjunction description

* Clear suggestions after submitting

* Fix insertion of suggestion to account for selection

* Remove unnecessary?

* Remove extraneous file

* Better name for method

* Move functions out of event handler

* Don't wrap result in promise

* Don't show kuery suggestions for lucene

* some cleanup and polish for kql autocomplete

* Omit description completely for values

* Don't suggest and/or for quoted strings that end in spaces

* Submit recent search suggestions on select

* Scroll selected suggestion into view

* Better handling of key events and hiding typeahead

* Update suggestions to work in other apps with multiple index patterns

* Only update suggestions if not submitting

* Hide suggestions on focus

* Simplify wildcard (again)

* Fix console error

* Remove references to kql

* Fix match pairs so that suggestions occur with cursor in correct place

* Memoize value suggestions

* Debounce model updates

* Add tests for suggestion providers

* Add setting and docs

* Add custom error, helper for detecting leading wildcards, and check for
leading wildcards in the Value rule of the grammar.

* Better handling of suggestion clicks

* Dedup suggestions

* Sort keywords first

* Fix value suggestions memoizing

* Check if query exists

* Reduce size of dialog and fix ranges

* Create grunt task to generate parsers from peg files

* Lazy load typeahead items

* Fix wildcard tests

* Fix value suggestion tests

* Fix typeahead tests

* Fix value suggestion memoize resolver

* Leave comment

* Add a ttl for the value suggestion resolver

* Move grunt config to config/

* Bargs can suck it

* Fix more tests that bargs broke (and one I did too)

* Fix tests
2018-03-22 08:51:35 -07:00
..
console [DOCS] Add Dev Tools to Kibana Guide (#12438) 2017-06-21 16:07:12 -07:00
development Add link to the EUI docs to Kibana docs (#11835) 2018-03-21 14:16:32 -07:00
discover Update Kuery Syntax (#15857) 2018-03-07 08:29:34 -08:00
getting-started Getting Started - Shakespeare (#16827) 2018-03-14 15:42:48 -05:00
images adding documentation for visualization development (#14252) 2017-10-03 13:07:28 +02:00
limitations Adding limitations section to Kibana docs (#11296) 2017-04-19 08:57:51 -07:00
management Kibana query language autocomplete (#15945) 2018-03-22 08:51:35 -07:00
migration Remove tribe node support (#16397) 2018-01-30 14:36:38 -05:00
plugins [DOCS] Add new plugins "Polar" and "Radar" to known-plugins (#16952) 2018-03-08 07:38:38 -06:00
release-notes [DOCS] Add placeholder for 7.0.0-alpha1 Release Notes (#14585) 2017-11-16 10:09:24 -08:00
setup [DOCS] Added monitoring upgrade details (#17138) 2018-03-14 13:18:53 -07:00
timelion [DOCS] Fixed cross doc link issues. 2017-04-26 21:45:31 -07:00
visualize add more details to range option (#16286) 2018-01-29 08:00:59 -07:00
console.asciidoc docs: remove reference to ES host input in console 2017-09-01 08:17:44 -04:00
dashboard.asciidoc Update dashboard docs for view/edit mode and landing page (#10965) 2017-03-31 14:54:19 -04:00
development.asciidoc docs: kibana developer and known plugin docs (#9477) 2016-12-13 22:37:55 -05:00
discover.asciidoc Fix jpg encoding issue causing weird colors in Chrome (#11367) 2017-04-24 16:22:11 -04:00
getting-started.asciidoc [DOCS] Changed xrefs to cross doc links to enable GS mini-book builds. 2017-07-18 14:43:38 -07:00
gs-index.asciidoc Add link to the EUI docs to Kibana docs (#11835) 2018-03-21 14:16:32 -07:00
index-shared1.asciidoc Docker docs v6 (#14683) 2017-11-02 15:32:46 +11:00
index-shared2.asciidoc [DOCS] Added index-shared6.asciidoc 2017-09-19 10:37:49 -07:00
index-shared3.asciidoc [DOCS] Added index-shared6.asciidoc 2017-09-19 10:37:49 -07:00
index-shared4.asciidoc [DOCS] Added index-shared6.asciidoc 2017-09-19 10:37:49 -07:00
index-shared5.asciidoc [DOCS] Added index-shared6.asciidoc 2017-09-19 10:37:49 -07:00
index-shared6.asciidoc [DOCS] Added index-shared6 Remove index-shared11 2017-09-19 10:38:49 -07:00
index.asciidoc [DOCS] Added index-shared6.asciidoc 2017-09-19 10:37:49 -07:00
index.x.asciidoc [DOCS] Build Kibana Guide from kibana repo (#16450) 2018-02-01 10:19:00 -08:00
introduction.asciidoc docs: Overhaul of doc structure for 5.0+ (#8821) 2016-10-24 21:41:32 -04:00
limitations.asciidoc Adding limitations section to Kibana docs (#11296) 2017-04-19 08:57:51 -07:00
management.asciidoc docs: Overhaul of doc structure for 5.0+ (#8821) 2016-10-24 21:41:32 -04:00
migration.asciidoc [DOCS] Remove X-Pack release note reference (#14983) 2017-11-15 15:22:03 -08:00
plugins.asciidoc [DOCS] Added section header 2018-03-09 08:57:38 -08:00
release-notes.asciidoc [DOCS] Add placeholder for 7.0.0-alpha1 Release Notes (#14585) 2017-11-16 10:09:24 -08:00
setup.asciidoc Remove tribe node support (#16397) 2018-01-30 14:36:38 -05:00
timelion.asciidoc [DOCS] Timelion Getting Started Guide (#11065) 2017-04-26 16:11:03 -07:00
visualize.asciidoc Migrating vega_vis from plugin (#15014) 2018-01-13 15:14:04 -05:00