* added tests to verify flow.
* refactoring picker reducer.
* made all the tests green.
* removed console.log's
* fixed toggle all and making sure the correct values are set on picker open.
* added more tets.
* refactored and added table tests.
* fixed so we select values from selectedValues instead of options.
* fixed so you can navigate and select even after you have filtered a variable.
* adding tests to verify flows when toggling by highlight.
* fixed so enter always selects value before closing.
* improved the code for tags.
* 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>
* Logs: Use result range instead of timepicker range for log histogram
If a logs datasource does not send histogram data for the requested
time range, the logs model computes a timeseries based on the log row
counts, bucketed by an automcatically calculated time interval. Even
when this histogram time series did not span the whole requested time
range it was still rendered in the graph across the whole range, leaving
an empty area at its start. Users find this confusing and are lead to
believe their log data is missing.
This change fixes this by anchoring the start of the timeseries on the
first log row's timestamp from the result, and adds this smaller range
as `visibleRange` to the logs model and passes it through to the logs
component that optionally takes it into account to not render the empty
area.
The interval (bucket size) is also adjusted to account for a potentially
finer resolution on the shorter visible time interval.
The bucketsize multiplier was also changed from 10 to 20 to account for
the space between the chart's bars.
* Aligned visible range with buckets
* Extract bucket size calculation and add test
* Chore: updates Explore result processor to sort dataframes based on their refId so results are displayed in a correct order
* Chore: adds types to Explore ResultProcessor getTableResult DataFrames
* add some padding to accommodate for vertical scrollbar
* use theme spacing
* Move padding to inner div and make it use actual scrollbar width
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Chore: updates add label to query method in prometheus datasource to fix loki label insert
* Chore: adds addLabelToQuery test covering differences between adding label to loki vs non-loki queries
* Chore: adds an additional comment to addLabelToQuery
* Chore: renames isLokiDatasource to hasNoMetrics in addLabelToQuery
* First pass solution
* Refactor solution
* Add test coverage, update tests
* Fix behaviour for multiple labels, add test for this
* Add recordin rules to devenv prometheus
* Update devenv/prometheus2 instead of devenv/prometheus
* Add newlines
* Fix label matching if labels include comma, add test coverage
* Refactor
* Refactor, simplify
* Shorten filter history label
* Add keyboard shortcuts for update comment in Query history
* Add test coverage for new keyboard shortcuts
* Update changed aria-label in tests
* Add test scenario for enter and ctr key