grafana/public/app/containers
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
..
AlertRuleList Add weback-dev-server with hot/hmr support 2018-04-19 11:42:53 +02:00
Explore Refactor Explore query field (#12643) 2018-07-26 15:04:12 +03:00
ManageDashboards Refactor team pages to react & design change (#12574) 2018-07-11 11:23:07 -07:00
ServerStats Add weback-dev-server with hot/hmr support 2018-04-19 11:42:53 +02:00
Teams Refactor team pages to react & design change (#12574) 2018-07-11 11:23:07 -07:00
IContainerProps.ts dashfolders: Rename UserPicker folder => Picker. Inject the permission-store in the FolderPermissions-container instead of the Permissions component, add the PermissionsStore to the RootStore and and the error-message to the Permissions-store #10275 2018-01-25 15:36:04 +01:00