Commit Graph

892 Commits

Author SHA1 Message Date
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
Yuri Tseretyan
f6a46744a6
Alerting: Support hysteresis command expression (#75189)
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>
2024-01-04 11:47:13 -05:00
Alex Khomenko
0844b87b2f
PluginDetails: Fix usage list height (#79695) 2024-01-04 15:42:28 +02:00
Jamin
576b8ccff6
Frontend: Migrate PageToolbar.tsx from aria-label e2e selectors to data-testid (#79663)
* refactor: update PageToolbar to use data-testid

* refactor: update selector text

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-01-04 13:52:38 +02:00
Ashley Harrison
54369158ce
Betterer: update results file (#79979)
update results file
2024-01-03 13:21:36 +00:00
Tobias Skarhed
65a655cfc9
Chore: Remove gf-form in DashboardLinks (#79762) 2024-01-03 13:30:17 +01:00
Adela Almasan
070e41d136
Exemplars: Update UX to match new tooltips (#79916) 2024-01-03 06:27:34 -06:00
Leon Sorokin
fb79be4a43
Transformations: Add frame source picker to allow transforming annotations (#77842)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-01-02 23:33:31 -06:00
Ihor Yeromin
a05f266e27
Units: Add scalable unit option (#79411)
* fix(units): add scalable unit option

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-01-02 18:40:57 +01:00
Khushi Jain
fe757f69c5
Forms: Remove gf-form from opentsdb/components (#79830)
* Forms: Remove gf-form from opentsdb/components

* filter and tag

* rate

* Update public/app/plugins/datasource/opentsdb/components/DownSample.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/plugins/datasource/opentsdb/components/FilterSection.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/plugins/datasource/opentsdb/components/MetricSection.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/plugins/datasource/opentsdb/components/RateSection.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/plugins/datasource/opentsdb/components/TagSection.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* prettier

* more changes

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2024-01-02 16:06:23 +02:00