* updated rules for variable name and fixed files that didn't follow new rules
* fixed test so it uses new rule
* made exceptions to rule in interval_variable
- load recording rules from prometheus
- map rule name to rule query
- query hint to detect recording rules in query
- click on hint fix expands rule name to query
* Explore: Query hints for prometheus
- time series are analyzed on response
- hints are shown per query
- some hints have fixes
- fix rendered as link after hint
- click on fix executes the fix action
* Added tests for determineQueryHints()
* Fix index for rate hints in explore
* Add click on explore table cell to add filter to query
- move query state from query row to explore container to be able to set
modified queries
- added TS interface for columns in table model
- plumbing from table cell click to datasource
- add modifyQuery to prometheus datasource
- implement addFilter as addLabelToQuery with tests
* Review feedback
- using airbnb style for Cell declaration
- fixed addLabelToQuery for complex label values
- prometheus datasources passes its own interpolator function to the
template server
- that function relies on incoming values being strings
- some template variables may be non-strings, e.g., `__interval_ms`,
which throws an error
This PR makes this more robust.
Adds a datasource selector to the Explore UI. Only datasource plugins
that have `explore: true` in their `plugin.json` can be selected.
- adds datasource selector (based on react-select) to explore UI
- adds getExploreSources to datasource service
- new `explore` flag in datasource plugins model
- Prometheus plugin enabled explore
* Fix bar width issue in aligned prometheus queries
This was broken because null values were filled in with unaligned times.
* use aligned times for result transformation
* add tests
An earlier version of this fix aligned the times again in the transformer, but
I think it's safe to only deal with aligned times in the response.
* Fixed prometheus heatmap tranformer test
The interval needs to be 1 to prevent step alignment.
* the existing query date alignment shifts the range forward to match
a multiple epoch of the interval, but keeps the range length the same,
the result is that the start date is shifted forward as well, leaving a
gap in the graph (or a zero-line when null-as-zero was set, issue #12024)
* this pr extends the aligned range to cover the original start date as
well
* style header like other grafana components
* use panel container for graph and same styles for query field
* fix typeahead CSS selector (was created outside of .explore)
* use navbar buttons for +/- of rows
* moved elapsed time under run query button
* fix JS error on multiple timeseries being returned
* fix color for graph lines
* show prometheus query errors
* refactor: tracing service refactoring
* refactor: sqlstore to instance service
* refactor: sqlstore & registory priority
* refactor: sqlstore refactor wip
* sqlstore: progress on getting tests to work again
* sqlstore: progress on refactoring and getting tests working
* sqlstore: connection string fix
* fix: not sure why this test is not working and required changing expires
* fix: updated grafana-cli
* moved datasource related functions to panel sub-class
* expand panel template vars for url
* added keybindings for x -> Explore
* url encoding for explore state
* panel container menu gets new Explore entry (between Edit and Share)
* entry only shows if datasource has `supportsExplore` set to true (set
for Prometheus only for now)
* click on Explore entry changes url to `/explore/state` via location provider
* `state` is a JSON representation of the panel queries
* datasources implement `getExploreState()` how to turn a panel config into explore initial
state
* Explore can parse the state and initialize its query expressions
* ReactContainer now forwards route parameters as props to component
* `pluginlist` and `singlestat` panel subclasses needed to be adapted because
`panel_ctrl` now has the location provider as a property already