* Fix Loki and Prometheus query fields on mobile devices
* Add min widt to Elasticsearch Query Field
* Remove width for Elastic, works nicely without updating it
* Update public/app/plugins/datasource/loki/components/LokiQueryFieldForm.tsx
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* QueryField: No default suggestion selected
It's been a long-standing issue that careless typing lead to unwanted
tab completion insertions. With this change the completion item list no
longer selects the first item by default. The user has to actively click
ArrowDown to select the first one.
* Added type export
* Remove width limit of typeahead list
* Datasource/Cloudwatch: Adds support for Cloudwatch Logs
* Fix rebase leftover
* Use jsurl for AWS url serialization
* WIP: Temporary workaround for CLIQ metrics
* Only allow up to 20 log groups to be selected
* WIP additional changes
* More changes based on feedback
* More changes based on PR feedback
* Fix strict null errors
* Styles: Refactoring and tweaks to inline form styles
* Minor change
* Minor fix
* Updated snapshot
* tweaks
* minor tweak
* Updated modal style
* Updated snapshot
* Updated more snapshots
* Theme: Updates old gf-form-styles
* Removed margin buttom
* updated
* updated
* This will take some time
* More style tweaks to both light and dark theme
* Minor change
* Tweaked table styles
* removed input padding variables and replaced with new inset variables, also removed unused class in _gf-form
* removed last input padding variable
* removed table-cell-padding variable
* added input padding variable to template file
* fixed input-padding variable
* removed regualt inset variable(for now), added input-padding to a class
* removed empty line
- add second query field to logging datasource query component
- second field manages search term, first field manages stream selectors
- improved logging cheat sheet to get started
- use react-highlight-words
- add highlighting (color and border) to the matching substring of the
suggested items in the typeahead
- extracted match finding from logging datasource
- created new utils/text.ts class for text-related functions
- added more types
* Refactor Explore query field
- extract typeahead field that only contains logic for the typeahead
mechanics
- renamed QueryField to PromQueryField, a wrapper around TypeaheadField
that deals with Prometheus-specific concepts
- PromQueryField creates a promql typeahead by providing the handlers
for producing suggestions, and for applying suggestions
- The `refresher` promise is needed to trigger a render once an async
action in the wrapper returns.
This is prep work for a composable query field to be used by Explore, as
well as editors in datasource plugins.
* Added typeahead handling tests
- extracted context-to-suggestion logic to make it testable
- kept DOM-dependent parts in main onTypeahead funtion
* simplified error handling in explore query field
* Refactor query suggestions
- use monaco's suggestion types (roughly), see
https://github.com/Microsoft/monaco-editor/blob/f6fb545/monaco.d.ts#L4208
- suggest functions and metrics in empty field (ctrl+space)
- copy and expand prometheus function docs from prometheus datasource
(will be migrated back to the datasource in the future)
* Added prop and state types, removed unused cwrp
* Split up suggestion processing for code readability