* Prometheus: user metrics metadata to inform query hints
- no longer analyse datapoints
- either use metrics metadata to determine metrics type or use metric
name suffix
- removed testcases based on datapoints
* Added hint certainty and tests
* Prometheus: Disable suggestions at beginning of value
- fixed comparison operator regex
- no longer suggest anything at beginning of label value
* Detect cursor in front of label values
* Loki: fix filter expression suggestions
- dont suggest term completion items in filter expression
- allow at least one character before suggesting term items
- keep logql expression when switching between Metrics/Logs mode
- show only history by default in completion items
* Clear results when changing mode
- `unless`, `or` and `and` are binary operators
- if they appear in a query the query was broken up so the suggestor
only works on the current term
- this change fixes the splitter logic to make sure those keywords are
not inside a word
* Prometheus data source: Update tooltip for _Scrape interval_
The old tool tip was plainly wrong. The globally configured scrape
interval is not necessarily the most used scrape interval, so the new
wording is describing what actually matters. The evaluation interval
wasn't even mentioned before. And finally, the configured value is
not strictly a lower limit for the step query parameter as it can be
overridden by the panel option _Min time interval_.
I plan to explain the overriding intricacies in the tool tip for _Min
time interval_.
Signed-off-by: beorn7 <beorn@grafana.com>
* Improve tooltip for _Min step_
The previous tool tip was mostly addressing aspects that are not
specific to _Min step_ (and might be more appropriate to be added to
the _Min time interval_ tool tip as that setting has a wider
scope). The new version emphasizes the important gotchas: that this is
an _additional_ lower limit, and that it is _not_ multiplied by the
resolution factor.
Signed-off-by: beorn7 <beorn@grafana.com>
* Fixed snapshot
Co-authored-by: David <david.kaltschmidt@gmail.com>
Closes#19598
Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
* Pagerduty notifier: configurable severity
Instead of hardcoding `critical` make it configurable per notification channel instance.
* fix html
* Add a test to ensure default severity is correct
* Notifications doc
* Add a non-default test
* Add err check on NewJson (all tests)
* Add default severity (critical) to AlertNotificationEditCtrl class
- prometheus explore editor introduced new styles for the hint display
- when multiple rows are rendered the hints are covered because they are
forced to have 0 height
- this change removes the 0-height
Much easier to wrap one's head around it if it is expressed more
directly.
This is not mathematically the same as the previous version involved
more rounding than necessary because of the way the intervalFactor was
handled. I'd argue the new version is better because it gets closer to
the 11,000 points limit and thus approaches better what the user
wanted within the limits of Prometheus.
Note that in practice, the 11,000 points limit should never be of
relevance. (Even a 4k screen doesn't have 11k points on the x axis.)
Signed-off-by: beorn7 <beorn@grafana.com>
* Table: Set & use field display processor
* Use applyFieldOverrides outside in story instead
* Change types a bit
* Table: Move to flexible layout
* Simplest possible custom field option
* Skip default column
* Added textAlign
* Explore: Set display processor for table data frame
* Fixed storybook
* Refactoring
* Progress on cell display mode
* Major progress
* Progress & refactoring
* Fixes
* Updated tests
* Added more tests
* Table: Progress on cell style customization
* Restored testdata random walk table scenario
* put back unrelated change
* remove unused things
* Updated table story
* Renamed property
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Dashboard: started to implement new time picker.
* TimePicker: working in full screen (except calendar).
* TimePicker: first draft on narrow screen variant.
* TimePicker: small adjustments to the narrow design.
* TimePicker: enabled range selection and started to style calendar.
* TimePicker: applied some more styling.
* Calendar: added so the calendar range selection is styled properly.
* Calendar: added styling for timepicker calendar in narrow screen.
* TimePicker: made it possible to select range from calendar.
* TimePicker: made the calendar have previous selected value.
* TimePicker: moved calendar to be able to update form state.
* TimePicker: calendar is now displayed onFocus or onClick.
* TimePicker: calendar will be closed if click outside input.
* Calendar: fixed the styling of the calendar in narrow screen.
* Calendar: made it work properly with narrow screen.
* TimePicker: connected recent to absolute time range.
* TimePicker: changed the label on recent ranges.
* TimePicker: cleaned up the range list and options.
* TimePicker: some more cleaning up.
* TimePicker: cleaned up the calendar a bit.
* TimePicker: some more refactorings.
* TimePicker: refactorings.
* TimePicker: styled modal properly.
* TimePicker: empty recent list.
* TimePicker: width when calendar in full screen.
* TimePicker: will validate input value.
* TimePicker: removed unused code.
* TimePicker: positioning with emotion instead of sass.
* Calendar: Made sure we send the dates in the correct order to the calendar.
* TimePicker: fixed theme.
* TimePicker: fixed positioning of the content.
* TimePicker: positioning of narrow.
* TimePicker: added some simple tets.
* TimePicker: fixed issue with invalid and added error message.
* TimePicker: added history.
* TimePicker: cleaned up snapshot data.
* TimePicker: fixed so we keep the quick values in the input.
* TimePicker: fixed the missing styling on UTC.
* TimePicker: added missing caret icon.
* TimePicker: fixed formatting on recent time ranges.
* TimePicker: added missing -.
* TimePicker: refactorings after feedback.
* TimePicker: renamed reserved prop name.
* TimePicker: added missing onChange call.
* TimePicker: removed alternative return type.
* TimePicker: fixed the sorting order on the recent list.
* TimePicker: added useCallback for the onEvent functions.
* TimePicker: moving away from default export.
* TimePicker: used the isMathString instead of private function.
* TimePicker: minor refactoring simplify the code.
* TimePicker: Added empty container that will expand when less then 4 recent searches.
* TimePicker: changed the top to be absolute relative to the container.
* TimePicker: updated snapshots for failing tests.
* Fixed shadow
* Move it down a bit
* added some more tests.
* Fixed so we change the anchor point of the time picker in really small screens.
* removed memo.
* fixed snapshot.
* Make sure that we always use the correct timeZone when formatting output.
* Fixed form background.
* Some minor fixes after demo.
* Making sure that empty info box is centered.
* updated snapshots for timepicker after css changes.
* fixed so we don't overflow when input validation error.
* adjusted final things on the time picker.
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Tooltip: preventing xss injections via the colors variable.
* added xss check for single series tooltop color.
* added sanitize to the hoverInfo.value.
* first working example
* Support sorting, adding types while waiting for official ones
* using react-window for windowing
* styles via emotion
* sizing
* set an offset for the table
* change table export
* fixing table cell widths
* Explore: Use new table component in explore (#21031)
* Explore: Use new table component in explore
* enable oncellclick
* only let filterable columns be clickable, refactor renderrow
* remove explore table
* Keep using old merge tables logic
* prettier
* remove unused typings file
* fixing tests
* Fixed explore table issue
* NewTable: Updated styles
* Fixed unit test
* Updated TableModel
* Minor update to explore table height
* typing
* Refactor: Adds params to visit
* Refactor: Restructures exported Pages somewhat
* Refactor: Moves more into new framework but holdup because of bugs in digest
* Refactor: Finish migrating templating e2e tests to new framework
* Refactor: Changes after merge with master
* Refactor: Removes weird change
* Refactor: Adds duplication test
* Refactor: Adds move down and move up variable asserts
* Refactor: Adds some test to value select dropdown