* 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
Name |
Last commit
|
Last Update |
---|---|---|
.. | ||
base | Loading commit data... | |
components | Loading commit data... | |
layout | Loading commit data... | |
mixins | Loading commit data... | |
pages | Loading commit data... | |
utils | Loading commit data... | |
.sass-lint.yml | Loading commit data... | |
_grafana.scss | Loading commit data... | |
_old_responsive.scss | Loading commit data... | |
_variables.dark.scss | Loading commit data... | |
_variables.light.scss | Loading commit data... | |
_variables.scss | Loading commit data... | |
fonts.scss | Loading commit data... | |
grafana.dark.scss | Loading commit data... | |
grafana.light.scss | Loading commit data... | |
icons.json | Loading commit data... |