grafana/public
David 7699451d94 Refactor Explore query field (#12643)
* 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
2018-07-26 15:04:12 +03:00
..
app Refactor Explore query field (#12643) 2018-07-26 15:04:12 +03:00
dashboards public: fix codespell issues 2018-04-13 20:31:29 +02:00
emails include error message in email notification (#8392) 2017-05-17 09:51:51 +02:00
fonts ux: testing roboto font 2017-08-14 13:57:16 +02:00
img tech: updated react-grid-layout to latest official release, closes #12100 2018-05-29 13:23:07 +02:00
sass Refactor Explore query field (#12643) 2018-07-26 15:04:12 +03:00
test Refactor team pages to react & design change (#12574) 2018-07-11 11:23:07 -07:00
vendor Fix cache busting for systemjs imports for plugins 2018-05-29 12:01:10 +02:00
views refactoring: enterprise build/hooks refactorings (#12478) 2018-07-02 04:33:39 -07:00
robots.txt add support for robots.txt file 2015-06-15 19:02:38 -04:00