Commit Graph

901 Commits

Author SHA1 Message Date
Torkel Ödegaard
b48e1f897e
Dashboard: Improve diff styling (#81509)
* Dashboard: Improve diff styling

* Update public/app/features/dashboard-scene/settings/version-history/DiffGroup.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Fix

* Update

* Update

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-01-30 16:07:24 +01:00
Andre Pereira
8440eadec2
Data trails: Homepage redesign (#81496)
* Rename trails and tweak styles in homepage

* Use design system card and update layout. Add createdAt date to trail

* Small style tweaks

* Move queryDef state to metricScene

* Date format update

* More style tweaks

* betterer update

* Use smaller padding on Card and use Badge istead of Tag

* Increase badge max width

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-01-30 13:51:31 +00:00
Matias Chomicki
2a734a9e3f
Supplementary queries: allow plugin decoupling by allowing providers to return a request instance (#80281)
* Supplementary queries: add support for providers returning a request instance

* Formatting

* DataSourceWithSupplementaryQueriesSupport: update getDataProvider signature

* getLogLevelFromLabels: fix buggy implementation

* getLogLevelFromKey: fix key type

Why number??

* Revert "getLogLevelFromKey: fix key type"

This reverts commit 14a95298a6f803cc3270e0421b2e04dd0d65f131.

* getSupplementaryQueryProvider: remove observable support

* Datasources: remove unnecessary check

The switch is doing the same job

* Supplementary queries: update unit test

* datasource_srv: sync mock with real api

* Formatting

* Supplementary queries: pass targets from getSupplementaryQueryProvider

* LogsVolumeQueryOptions: remove range and make extract level optional

* logsModel: add missing range to test data

* query: sync tests with changes

* Formatting

* DataSourceWithSupplementaryQueriesSupport: update interface with deprecated and new methods

* DataSourceWithSupplementaryQueriesSupport: sync Loki and Elasticsearch

* queryLogsVolume: extractLevel no longer customizable

* Loki: update test

* Supplementary queries: add support for the new method

* hasSupplementaryQuerySupport: update signature

* Formatting

* Betterer

* Query: update test

* Supplementary queries: add test for the legacy API

* Update public/app/features/explore/utils/supplementaryQueries.ts

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2024-01-30 12:36:20 +02:00
Torkel Ödegaard
2ce81c1a52
DashboardScene: Support detecting and ignoring variable value changes (#81448)
* DashboardScene: Saving and ignoring variable value changes

* Update
2024-01-29 17:45:18 +01:00
Haris Rozajac
fc82b0286f
Dashboard-Scene: Add and remove Panel Editor queries and expressions (#81027)
* wip

* Functionality for adding and deleting queries and expressions

* Remove console.log

* handle counter updates

* revert unintended change

* Revert tsconfig.json

* revert
2024-01-29 08:13:51 -07:00
Konrad Lalik
26e71953a4
Alerting: Improve integration with dashboards (#80201)
* Add filtering by dashboard UID annotation

* Update the inline doc for search

* Add AlertRulesDrawer to the dashboards toolbar

* Use DashboardPicker as a filter on the alert rules page

* Fix accessibility errors

* Update drawer subtitle

* Display Alerting toolbar button only if there are linked alert rules

* Change toolbar rendering method, prevent displaying when no linked rules

* Improve text

* Use React.lazy to load the Alert rule toolbar button and drawer when needed
2024-01-29 16:09:10 +01:00
Torkel Ödegaard
1d5edb2a18
DashboardScene: Saving (#81163)
* DashboardScene: First save works

* Updates

* version mismatch works

* Error handling

* save current time range working

* Progress on save as

* Save as works

* Progress

* First tests

* Add unit tests

* Minor tweak

* Update

* Update isDirty state when saving
2024-01-29 12:04:45 +01:00
Joey
d8d9121b6d
Tempo: Clean up older styles (#81247)
* Clean up uber styles

* Use theme spacing
2024-01-29 09:12:49 +00:00
Domas
e9a99a46b0
Tempo: Support multiple filter expressions for service graph queries (#81037)
* support "OR" for service graph queries

* make betterer happy

* continue appeasing betterer

* betterer results
2024-01-26 16:37:49 +02:00
Gábor Farkas
29e8a355cb
sql: extract frontend code into separate package (#81109)
* sql: extract frontend code into separate package

* updated package version
2024-01-26 11:38:29 +01:00
Fabrizio
366dc8db1b
Tempo: Rewrite style using object (#81278) 2024-01-25 23:41:23 +01:00
Andre Pereira
2c7e95a680
Data Trails: Cleanup and explore+share buttons (#81062)
* 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
2024-01-25 20:06:22 +00:00
Tobias Skarhed
add5a5c01e
LDAP: Use InteractiveTable and remove gf-form usage (#80291)
* Use InteractiveTable

* Remove unused return

* Fix icon alignment

* InteractiveTable in LdapUserMappingInfo

* Update no teams text

* InteractiveTable in LdapUserGroups

* Remove unused code

* Cleanup

* LdapSyncInfo to InteractiveTable

* Update more tables

* Memoize

* Fix connection status

* Update lockfile

* Refactor LdapSyncInfo

* Fix lockfile

* Remove showAttributeMapping as it is always true
2024-01-25 17:01:22 +01:00
Sergej-Vlasov
9ba13dd309
Dashboards: Remove emptyDashboardPage feature flag (#81188)
* remove emptyDashboardPage feature toggle from DashNav

* remove emptyDashboardPage feature toggle from NewDashboardWithDS

* remove emptyDashboardPage feature toggle from DashboardGrid

* remove emptyDashboardPage feature toggle from DashboardModel

* remove emptyDashboardPage feature toggle from initDashboard

* remove unused AddPanelWidged component

* remove add-panel type from test

* remove emptyDashboardPage feature flag from registry.go
2024-01-25 14:04:29 +00:00
kay delaney
b2f2864628
Scenes: Add panel frame options and visualization options to panel editor (#80884) 2024-01-24 14:01:00 +00:00
Nathan Marrs
cd2abce914
Table: Fix case where undefined data crashes the visualization (#80498) 2024-01-23 13:59:22 -08:00
Matias Chomicki
e07417dca3
Infinite scroll: share loader with log context + small fixes (#81067)
* Loading indicator: refactor

* Infinite scroll: use ref to keep the last scroll

* Infinite scroll: share loading indicator with log context

* Infinite scrolling: override state

* Infinite scroll: clean up imports and dependency array

* Logs: disable order while loading

* Infinite scroll: update ref before calling shouldLoadMore

* Loading indicator: remove unused export

* Logs order: move disabled prop to inline field

* Formatting

* Update betterer file
2024-01-23 18:52:38 +02:00
Fabrizio
51c19afcb2
Tempo: Rewrite styles using objects (#81038) 2024-01-23 16:33:08 +01:00
Gilles De Mey
d84d0c8889
Alerting: Detail v2 part 2 (#80577) 2024-01-23 15:04:12 +01:00
Fabrizio
57609e1388
Remove unused file (#81036) 2024-01-23 14:27:13 +01:00
Andrej Ocenas
59595c7318
Table: Keep expanded rows persistent when data changes if it has unique ID (#80031) 2024-01-23 14:14:57 +01:00
Fabrizio
b9d2f8c73b
Extract duplicated code (#80991) 2024-01-23 08:35:34 +01:00
Fabrizio
6cbc3df11e
Add grafana-o11y-ds-frontend workspace package (#80362) 2024-01-22 13:47:50 +01:00
Laura Benz
0e4c6742c8
GettingStarted: Improve styling and add tracking (#80410)
* 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()
2024-01-19 10:50:56 +01:00
Ivan Ortega Alba
3b401d0d4d
CustomVariable: Be able to edit them using scenes (#80193)
---------
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2024-01-17 19:14:01 +02:00
Victor Marin
5a509ef1f1
Scenes: Compare versions in dashboard settings (#80286)
* Add versions tab in dashboard settings

* Fetch and render dashboard versions

* Be able to compare two versions

* PR discussion changes

* remove unnecessary async in test

* PR discussion mods

* linter fix

* styles and tests

* Fix show more versions bug

* migrate files + style fix

* fix test

* refactor styles - css object keys to camelCase

* refactor file migrations

* more files migrations

* remove unused type, cleanup
2024-01-17 17:14:29 +02:00
Fabrizio
e1ead0f537
Tempo: Minor refactoring (#80701) 2024-01-17 12:45:17 +01:00
Giordano Ricci
9770768efc
Chore: refactor some styles in explore to use the object syntax (#80080)
* 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.
2024-01-16 19:49:12 +00:00
Andre Pereira
d27e2fec88
Data Trails: Actions redesign and overview tab (#80216)
* 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>
2024-01-16 20:22:53 +02:00
Joey
6796e66fb8
Pyroscope: Add standalone build (#80222)
* Pyroscope standalone build

* Fix for tests

* Add missing packages

* Remove import

* Update trace to profiles

* Update test
2024-01-16 12:46:15 +00:00
Ivan Ortega Alba
07778cb221
DashboardLinksSettings: Move them to Scenes (#79998) 2024-01-16 13:24:54 +02:00
Ivana Huckova
67d77e76be
Loki: Refactor debug section to remove dependency on deprecated getFieldLinksForExplore (#80594)
* Refactor debug section

* Show href only if matched regex
2024-01-16 12:00:31 +01:00
Fabrizio
522519f671
Tempo: Decouple Tempo from Grafana core (#79888) 2024-01-16 11:36:40 +01:00
Ashley Harrison
406ace27c0
Chore: remove merge conflict from .betterer.results (#80563)
remove merge conflict
2024-01-15 16:19:16 +00:00
Torkel Ödegaard
8157711893
DashboardDataSource: Implement sharing logic inside the data source (#80526)
* 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>
2024-01-15 16:43:30 +01:00
Victor Marin
1cf53a34d1
Scenes: Render versions in dashboard settings (#80229)
* Add versions tab in dashboard settings

* Fetch and render dashboard versions

* PR discussion changes

* remove unnecessary async in test

* PR discussion mods

* linter fix
2024-01-15 16:57:45 +02:00
Ashley Harrison
d5db67a073
Chore: type improvements (#80464)
* type improvements

* some more fixes

* add TODOs to remove type assertions
2024-01-15 14:29:39 +00:00
Sonia Aguilar
10f0d094ad
Alerting: Visualize autogenerated policy tree for simplified routing. (#79509)
* 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
2024-01-15 13:36:26 +01:00
Jamin
66c85d9826
Frontend: Migrate LoadingIndicator.tsx from aria-label e2e selectors to data-testid (#79664)
* refactor: update component to use data-testid

* refactor: update loading indicator e2e selector

* oops - forgot to update betterer results

* update loading indicator in variable picker

---------

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2024-01-12 18:30:11 +02:00
Giordano Ricci
e471064cda
Explore: use numeric ids for panel ids when building query transactions (#80135) 2024-01-12 14:05:46 +00:00
Matias Chomicki
aa670280fc
Logs: add infinite scrolling to Explore (#76348)
* 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
2024-01-12 13:22:03 +02:00
Ivan Ortega Alba
e9f1b41d23
EditVariable: Add base form to edit variables (#80172) 2024-01-12 12:01:11 +02:00
Dominik Prokop
cd66149c65
DashboardScene: Handle Dashboard data source when editing panel (#79991)
* 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
2024-01-12 01:21:32 -08:00
Leon Sorokin
b53e0521d2
Panels: AnnotationsPlugin2 (#79531)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-01-12 09:02:40 +02:00
Sonia Aguilar
e1af9bcecc
Alerting: Fix group filter (#80358)
* Fix group filter

* Fix Warning: Receivedfor a non-boolean attribute

* remove defaultQueryString.length > 3 from the logic to check if input is invalid
2024-01-11 17:28:12 +02:00
Jamin
71b98163e5
Frontend: Migrate DataSourceHttpSettings.tsx from aria-label e2e selectors to data-testid (#79615) 2024-01-10 11:51:16 +00:00
Ashley Harrison
1162c28a55
Connections: hook up search to url params to match cloud behaviour (#80166)
hook up connections search to url params to match cloud behaviour
2024-01-10 09:57:17 +00:00
Ashley Harrison
68ba6cc67b
Chore: some type fixes (#80094)
* some type fixes

* few more fixes

* more

* fix unit test
2024-01-09 10:00:00 +00:00
Tobias Skarhed
fbd0ceec7c
Chore: Remove gf-form in Permissions (#79908)
* Remove empty table in favor of Alert

* Change to using Box and Text
2024-01-05 14:32:01 +01:00
Adela Almasan
935ecdd809
XYChart: Improved new tooltip (#75818)
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-01-05 00:55:23 +02:00