Commit Graph

1259 Commits

Author SHA1 Message Date
Josh Hunt
e3e580edfa Chore: Prevent direct path imports from workspace grafana packages (#98940)
* restrict imports from @grafana/ui/src paths

* prevent path imports from all grafana packages

* just run on ui, runtime, data packages

* update
2025-01-15 15:47:44 +02:00
Konrad Lalik
5aeaccadff Alerting: Add read-only GMA rules to the new list view (#98116)
* Reuse prom groups generator between GMA, external DS and list view

* Improve generators, add initial support for GMA in grouped view components

* Improve handling of GMA rules

* Split componentes into files

* Improve error handling, simplify groups grouping

* Extract grafana rules component

* Reset yarn.lock

* Reset yarn.lock 2

* Update filters, adjust file names, add folder display name to GMA rules

* Re-enable filtering for cloud rules

* Rename AlertRuleLoader

* Add missing translations, fix lint errors

* Remove unused imports, update translations

* Fix responses in BE tests

* Update backend tests

* Update integration test

* Tidy up group page size constants

* Add error throwing to getGroups endpoint to prevent grafana usage

* Refactor FilterView to remove exhaustive check

* Refactor common props for grafana rule rendering

* Unify identifiers' discriminators, add comments, minor refactor

* Update translations

* Remove unnecessary prev page condition, add a few explanations

---------

Co-authored-by: fayzal-g <fayzal.ghantiwala@grafana.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-01-15 11:36:32 +01:00
Nathan Marrs
009d7f42b3 Feature Toggles: Add two test feature toggles to test potential AB test setup (#98844)
* add two dummy feature toggles to use for testing potential AB testing setup

* update betterer

* update auto generated files

* fix camelcase test case
2025-01-13 13:13:13 -08:00
Tom Ratcliffe
1ba9a27f70 Chore: Update no-untranslated-strings to check tooltip and template literals (#98281) 2025-01-10 16:26:03 +00:00
Tom Ratcliffe
3fa0834c49 Chore: Remove unneeded betterer package & results that have been fixed (#98280) 2025-01-10 14:44:37 +00:00
Andre Pereira
ce1ae404db Trace View: Set span filters as panel options (#98328)
* Set span filters through panel options WIP

* Replace vars, tags editor, service and span name are now selects

* Fix undefined access

* Fix sync between panel options and span filters component

* Refactor tags input and use it in the plugin options

* Fix options to panel communication

* Rename Tags file. Fix tag values loading in dropdown

* Fix clear tags

* useMount instead of useEffect

* Replace HorizontalGroup with Stack

* Update betterer results

---------

Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
2025-01-09 17:47:07 +00:00
Tom Ratcliffe
42894ba840 Alerting: Use common i18n phrases for cancel and save (#98600) 2025-01-09 10:02:15 +00:00
Matias Chomicki
44e65c5bc9 Logs: Added support to disable and re-enable the popover menu (#98254)
* PopoverMenu: add disable menu item

* PopoverMenu: disable and reenable with shift

* Style confirmation dialog

* Update unit tests and add tracking

* PopoverMenu: i18n

* Translations

* Update tracking property

* Use alt+select to re-enable

* Update betterer
2025-01-07 17:17:06 +02:00
Tom Ratcliffe
df80bdeb14 Chore: Sort eslint betterer results by name (#98208) 2025-01-07 14:56:12 +00:00
Dominik Prokop
e974cb87d8 Schema v2: Read API integration (#97953)
* Introduce DashboardScenePageStateManagerLike interface

* Implement dash loader for handling v2 api

* Transformation improvements

* Update response transformer test

* v2 schema: Remove defaultOptionEnabled from ds variable schema

* v2 schema: Make annotations filter optional

* WIP render dashboard from v2 schema

* Force dashbaord scene for v2 api

* V2 schema -> scene meta transformation

* v2 api: Handle home dashboard

* Use correct api client in DashboardScenePage

* Correctly use v2 dashboard scene serializer

* Remove unnecesary type assertions

* Handle v2 dashboard not found

* Fix type

* Fix test

* Some more tests fix

* snapshot

* Add dashboard id annotation

* Nits

* Nits

* Rename v2 api

* Update public/app/features/dashboard-scene/serialization/transformSaveModelSchemaV2ToScene.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* add getDashboardsApiVersion test for forcing scenes through URL

* add links to ResponseTransformers

* Update public/app/features/dashboard/api/ResponseTransformers.test.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Nit rename test case

* Add tests for DashboardScenePageStateManagerV2

* Update test

* Typecheck

* Add console error for debugging

* Fix typo

---------

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-01-02 12:23:58 +01:00
Haris Rozajac
a110917577 Dashboard SchemaV2: V2 -> Scene -> V2 integration test (#98146)
* Tests for layout, transformations; displayMode

* wip

* fix annotations

* fix panel query and transformation topic

* fix dash id, default options, fieldConfig

* Complete integration test

* fix annotation query

* Fix test

* Clarify

* Have default value of builtIn

* update import path
2024-12-31 11:43:04 -07:00
Pepe Cano
287f3a75eb Alerting: add help tooltip for the Preview silences UI (#98028)
* Alerting UI: add tooltip for the Preview silences UI

* fix typo

* Update translations for silences preview

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-12-24 15:23:29 +01:00
Ivan Ortega Alba
a06779614e Implement detect changes tracking to V2 Schema (#98153)
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2024-12-19 13:00:59 +02:00
Jack Westbrook
b88ce9df38 Chore: Remove Dashboard datasource barrel file (#98040)
* chore(dsahboard-datasource): delete barrel file

* refactor(dashboards): update paths for dashboard ds imports

* chore(betterer): update file

* style(dashboard-datasource): fix linting errors
2024-12-18 13:18:55 +01:00
Tom Ratcliffe
6df7d1fbc0 Alerting: Split out components for notification policies (#97191) 2024-12-18 12:16:46 +00:00
Dominik Prokop
070f0e4457 Dashboard API versions handling (#96666)
* structure apic

* API versioning proposal

* Make api service independent from version

* Update v2

* Fix public dashboards page test

* Uncomment reload dashboard feature code

* Revert

* Betterer

* Fix imports

* useV2DashboardsAPI feature toggle

* POC/v2 schema: Add v1<-> v2 transformers (#97058)

* Make dshboard access interface more precise

* Add first pass for schema v1<->v2 transformers

* Update response transformer test

* Import fixes

* Manage dashboards validation: Handle v2 schema

* Handle new dashboard with v2

* Fix tests

* Move dashboard is folder error handling to legacy API implementation

* Add tests for dashboard api client

* betterer

* Use dashboard DTO when capturing dashbaord impression

* prettier

* Dashboard API: resolve folder metadata

* Add tests for resolving folder metadata

* Fix DashboardPicker

* Renames and nits

* POC Alternative Suggestion for  Dashboard API versions handling (#97789)

* Add transitional_dashboard_api, reset components that are not ready for v2 schema, and start working on migrating
DashboardPicker to use v2 schema

* reset DashboardScenePageStateManager

* Improve logic in transitional api, also remove isDashboardResource checks from components

* REmove transitional_dashboard_api and apply PR feedback

* Apply PR feedback, use 'v2' as a parameter and remove unnecesary if

* Fix tests

* Adding missing comments from original PR and also changing order to improve diffing in github :)

* update betterer

* fix prettier

* Add tests for DashboardPicker

* Do not use unified alerting mocks

* Fix unused type in dashboard test

* Improve comments in DahboardPicker

* Update folder validation fn

* Validation update

* Update legacy api test

* Lint

---------

Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-12-17 22:17:09 +01:00
Ashley Harrison
687e207b48 SingleTopNav: Clean up and remove code + toggle (#97937)
* clean up almost all of the toggle

* betterer

* clean up searchBarHidden and extract translations

* fix remaining unit tests

* remove redundant topPosition
2024-12-17 13:32:38 +00:00
Tom Ratcliffe
a9cd0f19f4 Chore: Update no-untranslated-strings rule to check some text props as well (#97190)
* Update no-untranslated-strings rule to check some props as well

* Update betterer with new no-untranslated-strings results
2024-12-13 12:04:00 +02:00
Matias Chomicki
3fdf0ea1f4 Logs: Added option to show the log line body when displayed fields are used (#97209)
* LogDetailsBody: create and integrate component

* Chore: sort prop names

* Add tests

* Address lint issues

* Update betterer

* Update public/app/features/logs/components/LogDetailsBody.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

* Update public/app/features/logs/components/LogDetailsBody.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

* Update tests

---------

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2024-12-12 17:44:06 +02:00
Tom Ratcliffe
5be8a9b3c3 Alerting/chore: Deprecate MockDataSourceSrv and remove from Alerting tests (#97267)
* Mark MockDataSourceSrv as deprecated

* Add `module` into necessary existing mock datasources

* Remove config mock

* Update helper method for test datasources to more accurately reflect real behaviour

* Update alerting/unified tests to remove mock datasource srv

* Lint fix

* Remove some unused re-exports

* Make mock mimir use correct module

Ⓜ️

* Add necessary handlers for mimir query editor responses

* Lint fix

* Add implementation to mock mimir data source
2024-12-12 09:50:36 +00:00
Piotr Jamróz
bb673fc8ed Explore: Show links to queryless apps (#96625)
* Extract basic extensions to a separate files

* Add simple queryless apps links

* Move links for queryless apps next to the datasource picker

* Update tests

* Add translations

* Add tracking

* Update translations

* Fix tests and betterer

* Fix the mock for the test (the hook may be called twice now)

* Add a todo
2024-12-11 13:53:28 +01:00
Torkel Ödegaard
71b8f487e0 Dashboards: Rows layout & editing (#96895)
* Dashboard: Panel edit and support for more layout items

* It's working

* Fix discard issue

* remove unused file

* Update

* Editing for responsive grid items now work

* Update

* Update

* Update

* WIP rows

* progres

* Progress

* Progress

* Focus selection works

* Update

* Update

* Progress

* Update

* Editing rows work

* Row editing works

* fix delete

* Update

* Row options fix

* Fix selecting rows

* Update

* update

* Update

* Update

* Remove cog icon button

* add import to toolbar

* Update

* Update
2024-12-10 07:21:30 +01:00
Haris Rozajac
c4e19f3570 Dashboard Schema v2: Panel links (#97441)
* panel links

* Update transformer scene -> v2; update snapshot

* clean up

* data links test

* Remove type assertion
2024-12-09 08:23:23 -07:00
Jack Westbrook
1ff0978efe Chore: Remove sharemodal and search service barrel files (#97563)
* refactor(search-service): delete barrel file and update imports across frontend

* refactor(sharemodal): delete barrel file and update imports

* refactor(search-service): update features/search/service imports

* chore(betterer): update results file
2024-12-06 16:44:30 +01:00
Jack Westbrook
1fc9b4bfc1 Chore: Remove dashboard state barrel file (#97562)
* refactor(dashboard-state): delete dashboard/state barrel file and update imports

* chore(betterer): update results
2024-12-06 16:01:51 +01:00
Ida Štambuk
2e342e5b1b CloudWatch: Add OpenSearch PPL and SQL support in Logs Insights (#97508)
Cloudwatch: OpenSearch PPL and SQL support in Logs Insights

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Nathan Vērzemnieks <njvrzm@users.noreply.github.com>
2024-12-06 15:27:19 +01:00
Haris Rozajac
9e885cab7c Dashboard Schema v2: Add tests for variables, annotations, and dataTransformer (#97314)
* Add tests for variables, annotations, dataTransformer

* Simplify variable validation; test additional variable fields

* Move helpers to a separate file

* remove unused param, rename helpers file

* fix

* Move remaining vizPanel test to helper

* use ts
2024-12-05 10:49:11 -07:00
Ivana Huckova
3e96431bd6 Move createGraphFrames to grafana/o11y-ds-frontend package (#97394)
* Move createGraphFrames to o11y-ds-frontend package

* Remove duplicated mock response

* Rename files and function
2024-12-05 12:25:46 +01:00
Tom Ratcliffe
a2c407854f Alerting: Make alert rule policies preview use k8s API (#97070)
* Add translations for notification preview

* Make notifications endpoints use alertmanager config mock entity

* Fix translations and error handling in preview component

* Update preview hook to use new k8s APIs

* Move receivers k8s mock logic so it always comes from the mock config

* Fix test that wasn't using the correct receiver

* Fix object_matchers

* Remove mockApi method and update tests

* Update translation for error case

* Remove useMemo
2024-11-29 13:05:41 +00:00
Torkel Ödegaard
335241d93d ElementSelection: New element selection context to support selecting elements (#97029)
* ElementSelection: New element selction context to support selecting elements like panels

* Update

* Update
2024-11-28 15:06:00 +01:00
Jack Westbrook
25da5f0806 Chore: Bump Storybook to 8.4.x (#96128)
* feat(storybook): upgrade to version 8.4

* chore(grafana-ui): replace all usage of preview with canvas

* chore(grafana-ui): add fs-extra as dev dependency

* feat(storybook): copy required assets to temp static directory due to 8.4 not supporting file paths

* chore(yarn): fix up lock file so swc-loader doesnt break for decoupled plugins

* Add ExampleFrame component to render grafana-ui examples

* Prevent Storybook from styling in ExampleFrame

* Use global styles in Storybook docs

* Update mdx docs to use ExampleFrame or correct Canvas usage

* update AutoSizeInput

* Update Index mdx

* remove the gfm mdx package

* silence sass warnings

* fix(storybook): add missing imports to fix failed rendering of stories/docs

* remove empty docs

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-11-28 14:58:36 +01:00
Pepe Cano
59d4b91e4c Alerting: Explore button in Insights view (#96496)
* Alerting: Explore button in Insights view

* Fix wrong insights queries

* replace `$rule_group` in the query expression with the actual rule group value

* Add info tooltip in `Insights` title

* Remove unused `RatingModal` component

* fix betterer results

* remove unnecessary `React.Fragment`

* Remove unnecessary text space
2024-11-28 13:18:45 +02:00
Tom Ratcliffe
e4a1243948 Alerting: Consume k8s API for notification policies tree (#96147)
* Add basic usage of K8s API for notification policies

* Add permissions checks for navtree for routes

* Add and update permissions for routing tree logic

* Add capability to skip calling contact points hook

* Conditionally show list of mute timings depending on permissions

* Conditionally link to mute timings if user can see at least one

* Add work in progress k8s handlers for routing tree

* Update notification policy hooks

* Wire up policies to permissions better (conditionally calling APIs)

* Add additional checks for whether to show grafana AM

* Add permission checks to access control

* Remove accidental permissions after rebase

* Update types and const for k8s routes

* Improve statefulness and reset routing tree in tests

* Update notif policy tests to check k8s and config API

* Fix type assertion

* Move non-grafana test out of .each

* Make failure case safer

* Override tag invalidation for notification policies API

* Pass in error and add new error alert component

* Add basic mock server conflict check

* Add test to check user can save after a conflict

* Add logic to allow reloading policies if changed by another user

* Fix test

* Update translations in Modals

* Add ViewAlertGroups ability

* Tweak provisioning logic and memoize AM config response

* Update snapshots for useAbilities

* Update result destructure

* Use enums for provenance in routingtrees

* Use consistent memoisation

* Fix _metadata for vanilla AM

* useAsync for error / update state

* move k8s api error handling to separate file

* use cause for error codes

* Use `supported` bools from Alertmanager abilities and clarify default policy

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-11-26 13:46:39 +00:00
Mihai Doarna
d2fab92d8b APIKeys: Update text on API keys deprecation (#97022)
* update text on API keys deprecation

* run prettier

* add betterer results
2024-11-26 14:22:23 +02:00
Sriram
ea3bc8f253 MySQL: Datasource health check error message improvements (#96906)
* updated mysql health check error messages

* fix betterer error

* fix lint errors

* renamed moreDetailsLink to errorDetailsLink

* update

* added i18n locale files
2024-11-22 21:58:35 +00:00
Pepe Cano
706300e9b7 Alerting: notification template group (#96447)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-11-22 14:40:20 +02:00
Sonia Aguilar
977184b878 Alerting: Simplify notification step (#96430)
* Move evaluation outside folder section, and move labels in instead

* rename file

* update translations

* refactor

* rename file and component

* refactor

* fix test

* refactor

* rename files and components

* update translations

* fix style

* update translations

* Add feature toggle for simplified mode in notifications step

* WIP

* Use useAppNotification for toasts

* update label when group can not be selected yet

* update translations

* WIP

* update some texts and add comment

* update translations

* remove duplicated code

* fix typo

* update translations

* update styles and remove label

* update simplified_notifications_section name according BE changes

* remove FolderWithoutGroup

* remove commented code

* prettier

* remove SIMPLIFIED_NOTIFICATION_STEP_KEY and use MANUAL_ROUTING_KEY instead

* styles cleanup

* Update docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

* merge main and prettier doc

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-11-22 13:07:45 +02:00
Ryan McKinley
68c61514b0 Chore: Remove experimental Storage UI (#96887) 2024-11-22 12:38:02 +02:00
Ashley Harrison
c2e1a405b9 Chore: Mark up some content for translations (#96716)
* translate some of core

* more

* translate admin

* fix count translations

* update unit tests
2024-11-21 12:59:14 +00:00
Tobias Skarhed
fd3ecacd05 Angular: Remove unused admin pages (#96526)
* Remove unused Angular admin pages

* Update betterer
2024-11-21 11:23:35 +01:00
Ryan McKinley
e0b93f055f Swagger: show user icon (#96736) 2024-11-20 15:43:25 +02:00
Sonia Aguilar
1b0cc60d65 Alerting: Move evaluation outside folder section, and move labels in instead (#95121)
* Move evaluation outside folder section, and move labels in instead

* rename file

* update translations

* refactor

* rename file and component

* refactor

* fix test

* refactor

* rename files and components

* update translations

* fix style

* update translations

* Use useAppNotification for toasts

* update label when group can not be selected yet

* update translations

* update some texts and add comment

* update translations

* remove duplicated code

* fix typo

* update texts and translations

* rename FolderWithoutGroup to FolderSelector

* restore wrong updates

* restore wrong updates

* translations and remove GroupAndFolder component

* address review comments

* remove container

* address review comments

* address review comments

* prettier

* prettier
2024-11-19 17:26:49 +01:00
Alexa V
3c182a37fa Transform DashboardScene into Schema V2 (#95546)
---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2024-11-19 13:01:40 +01:00
Gilles De Mey
0929feba06 Alerting: Use NestedFolderPicker (#96398)
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-11-19 11:41:31 +01:00
Konrad Lalik
b73ab15878 Alerting: New list view (Part 1) (#95039)
* initial commit

* update styles

* wip

* update list view

* update translations

* abstract components

* metadata separator

* refactor

* cleanup

* fix tests

* WIP

* translations

* refactor to use maps and type-safety

* WIP

* UI updates

* Rule action buttons early draft

* recording rules

* WIP typescript errors

* implement action button loading

* move section loader etc

* add placeholder for group actions

* Change files structure, remove CombinedRule from AlertRuleMenu

* Refactor fetching data sources with ruler

* Fix tests

* Unify data source features

* move files

* make actions column wider

* update translations

* Update tests to reflect code changes

* Remove direct buildinfo usages

* Fix useCanSilence hook

* Add missing translations, fix lint errors

* PR feedback

* update test

* Remove featureDiscovery mock from a test

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-11-18 10:48:15 +01:00
Leon Sorokin
39fe0b29ff XYChart: Remove old implementation (#96416) 2024-11-14 10:36:18 -06:00
Tobias Skarhed
a8ab82c80f Combobox: Documentation (#96307)
* Initial Combobobox docs

* Add test docs

* Add docs to props

* Add ComboboxOption docs

* Apply suggestions from code review

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-11-14 11:01:43 +01:00
Ben Sully
b4644580cf chore: bump @bsull/augurs to v0.6.0 (#96119) 2024-11-08 22:35:22 +00:00
Sonia Aguilar
d92e17ee55 Alerting: Create reusable components for threshold (#94045)
* Create reusable components for threshold

* update translations

* do not use capital letters for keys in translations
2024-11-08 18:15:29 +02:00
Scott Lepper
6d8ee5fde0 search: use US searcher from dashboard list page (#95888)
search: wire up unified storage searcher
2024-11-05 14:30:10 -05:00