* Share button works now. Removed add to dashboard button for now
* WIP explore link
* Remove settings dropdown for now
* Use getExploreUrl to generate explore link
* Fix conflicts
* Update betterer
* Navigate to a new trail when the recent trails list is empty
* Address PR comments
* refactor: remove icons and related styling
* refactor: remove cut off on the left side
* fix: aria-labels
* feat: add tracking
* refactor: adjust button position
* refactor: move previous button back
* refactor: use emotion object syntax
* feat: add tracking
* refactor: remove console.log()
* Chore: refactor some styles in explore to use the object syntax
* refactor LiveLogs styles to use object syntax
* Revert "refactor LiveLogs styles to use object syntax"
This reverts commit 293aa2589f.
* Use last used datasource or default datasource when starting a trail
* Use tabs and move actions bar to same line when possible
* Added overview tab with description, type and labels
* Clickable labels in overview tab
* Show label value counts next to the label name
* Fix action bar zIndex
* Address PR comments
* Refactor
* Refactor getLabelOptions to utils
* Reuse language provider from state
* betterer
* testing some refactors
* Remove unreachable code
* Refactor GROUP_BY var to MetricScene
* Fix url by excluding var-groupby
* Fix conflicts
* Use <Text/> instead of custom styles
* Simplify setting overview as default tab
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Make dashboard data source query actually use DashboardDataSource
* remove commented out bit
* Always wrap SceneQueryRunner with SceneDataTransformer
* Update Dashboard model compat wrapper tests
* DashboardQueryEditor test
* VizPanelManager tests update
* transform save model to scene tests update
* Betterer
* PanelMenuBehavior test update
* Few more bits
* Prettier
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* WIP
* WIP: disable some actions when is autogenerated policy
* WIP
* Wip: add checks for group by in auto-generated policy
* Make autogenerated policy readOnly and enable Readonly modal for it
* Use real check for autogenerated root
* Fix test
* Refactor: rename consts
* Add test for policy form being read only
* Add tests
* Update some code comments
* Fix Switch component not being styled as disabled
* Rename isAutogeneratedChunkOpen property to isBranchOpen and fix test
* Revert fix for Switch as it has moved to another separate PR
* Split Policy component in smaller sub components
* use useAlertmanagerAbility form for checking autogenerated tree visibility and fix container for autogenerated policy being rendered when it's not supported
* Update useAbilities test and dont use toAbility for ViewAutogeneratedPolicyTree
* Fix Policy being unmounted every 10 secs and move the collapsed/expanded state to each Policy component
* remove permissions from createDropdownMenuActions method parameters and convert the method to a hook
* Revert using PolicyItem
* Add test for createDropdownMenuActions
* Revert having a read only view form for the policy
* Remove readonly from default policy form
* Only show collapsible when node has children
* Split DefaultPolicyIndicator
* use hidehideCurrentPolicy instead of showCurrentPolicy
* Address some review suggestions
* Explore: propose action, thunk, and decorators for load more
* LogsContainer: add loadMore method
* Query: remove unused var
* Loading more: use navigation to simulate scrolling
* Explore: figure out data combination
* Fix imports
* Explore: deduplicate results when using query splitting
* LogsNavigation: add scroll behavior
* Remove old code
* Scroll: adjust delta value
* Load more: remove refIds from signature
We can resolve them inside Explore state
* Load more: rename to loadMoreLogs
* Infinite scrolling: use scrollElement to listen to scrolling events
* Explore logs: add fixed height to scrollable logs container
* Logs: make logs container the scrolling element
* Logs: remove dynamic logs container size
It works very well with 1 query, but breaks with more than 1 query or when Logs is not the last rendered panel
* Logs navigation: revert changes
* Infinite scroll: create component
* Infinite scroll: refactor and clean up effect
* Infinite scroll: support oldest first scrolling direction
* Infinite scroll: support loading oldest logs in ascending and descending order
* Infinite scroll: use scroll to top from logs navigation
* Logs: make logs container smaller
* Logs: make container smaller
* State: integrate explore's loading states
* Infinite scroll: add loading to effect dependency array
* Infinite scroll: display message when scroll limit is reached
* Infinite scroll: add support to scroll in both directions
* Infinite scroll: capture wheel events for top scroll
* scrollableLogsContainer: deprecate in favor of logsInfiniteScrolling
* Infinite scroll: implement timerange limits
* Infinite scroll: pass timezone
* Fix unused variables and imports
* Infinite scroll: implement timerange limits for absolute time
* Infinite scroll: fix timerange limits for absolute and relative times
* Infinite scroll: reset out-of-bounds message
* Logs: make container taller
* Line limit: use "displayed" instead of "returned" for infinite scrolling
* Infinite scrolling: disable behavior when there is no scroll
* Remove console log
* Infinite scroll: hide limit reached message when using relative time
* Logs: migrate styles to object notation
* Prettier formatting
* LogsModel: fix import order
* Update betterer.results
* Logs: remove exploreScrollableLogsContainer test
* Infinite scroll: display loader
* Infinite scroll: improve wheel handling
* Explore: unify correlations code
* Explore: move new function to helpers
* Remove comment
* Fix imports
* Formatting
* Query: add missing awaits in unit test
* Logs model: add unit test
* Combine frames: move code to feature/logs
* Explore: move getCorrelations call back to query
It was causing a weird test failure
* Fix imports
* Infinite scroll: parametrize scrolling threshold
* Logs: fix overflow css
* Infinite scroll: add basic unit test
* Infinite scroll: add unit test for absolute time ranges
* Formatting
* Explore query: add custom interaction for scrolling
* Query: move correlations before update time
* Fix import in test
* Update comment
* Remove comment
* Remove comment
* Infinite scroll: report interactions from component
* Fix import order
* Rename action
* Infinite scroll: update limit reached message
* Explore logs: remove type assertion
* Update betterer
* Dashboard model compat wrapper update
* Handle changing data source type to and from Dashboard data source
* VizPanelManager tests
* Betterer
* DashboardModelCompatibilityWrapper tests
* Review: test updates
* Test updates
* Test fix
* Move the complexity of the dashboard data source edit directly to the ShareQueryDataProvider
* Make sure deactivation handler ain't called multiple times
* Make sure compat panel compat wrapper return queries for shared runner with transformations
* Betterer
* VizPanelManager: Remove data object subscription
* Remove unnecesary code
* Fix group filter
* Fix Warning: Receivedfor a non-boolean attribute
* remove defaultQueryString.length > 3 from the logic to check if input is invalid
Backend:
* Update the Grafana Alerting engine to provide feedback to HysteresisCommand. The feedback information is stored in state.Manager as a fingerprint of each state. The fingerprint is persisted to the database. Only fingerprints that belong to Pending and Alerting states are considered as "loaded" and provided back to the command.
- add ResultFingerprint to state.State. It's different from other fingerprints we store in the state because it is calculated from the result labels.
- add rule_fingerprint column to alert_instance
- update alerting evaluator to accept AlertingResultsReader via context, and update scheduler to provide it.
- add AlertingResultsFromRuleState that implements the new interface in eval package
- update getExprRequest to patch the hysteresis command.
* Only one "Recovery Threshold" query is allowed to be used in the alert rule and it must be the Condition.
Frontend:
* Add hysteresis option to Threshold in UI. It's called "Recovery Threshold"
* Add test for getUnloadEvaluatorTypeFromCondition
* Hide hysteresis in panel expressions
* Refactor isInvalid and add test for it
* Remove unnecesary React.memo
* Add tests for updateEvaluatorConditions
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>