Commit Graph

1181 Commits

Author SHA1 Message Date
Torkel Ödegaard
038d9cabde
PanelEdit: Edit the source panel, refactor out VizPanelManager, simplify (#93045)
* Options pane, data pane queries tab and transformations tab working

* Update

* Discard works

* Panel inspect working

* Table viw works

* Repeat options

* Began fixing tests

* More tests fixed

* Progress on tests

* no errors

* init full width when enabling repeat

* Began moving VizPanelManager tests to where the code was moved

* Unlink libray panel code and unit test

* Fixes and unit tests for change tracking and resetting original state and dirty flag when saving

* migrating and improving unit tests

* Done with VizPanelManager tests refactoring

* Update

* Update

* remove console.log

* Removed unnesssary behavior and fixed test

* Update

* Fix unrelated test

* conditional options fix

* remove

* Fixing issue with editing repeated panels and scoping variable to first value

* Minor fix

* Fix discard query runner changes

* Review comment changes

* fix discard issue with new panels

* Add loading state to panel edit

* Fix test

* Update

* fix test

* fix lint

* lint

* Fix

* Fix overrides editing  mutating fieldConfig

---------

Co-authored-by: alexandra vargas <alexa1866@gmail.com>
2024-09-24 17:13:32 +02:00
Kristina
002f872ce1
Correlations: Allow correlations to target URLs (#92442)
* Pass one

* Fix linter and add new betterer problem (sorry)

* fix swagger

* Add type to tests and update single correlations sql

* Fix provisioning test and other function that needs a type

* Add errors around query/external typing and add tests

* increment number of correlations tested as we added one for testing v1 type placement

* try merging back the swagger that is in main

* try again?

* Style form a little

* Update public/app/features/logs/components/logParser.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* fix bad commit, simplify logic

* Demonstrating type difficulties

* Fix distributed union changes

* Additional type changes

* Update types in form

* Fix swagger

* Add comment around the assertion and explicit typing

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-09-24 09:38:17 -05:00
Torkel Ödegaard
ae6ea459b9
DashboardScene: Do not add hide flags to URL (#93641)
* DashboardScene: Do not add hide flags to URL

* Update
2024-09-24 15:24:56 +02:00
ismail simsek
19c7e1f376
Chore: Refactor explore metrics breakdown scene (#93368)
* refactor breakdown scene

* refactor BreakdownScene along with LayoutSwitcher

* rename

* don't pass default layout

* better type handling

* betterer

* add @bsull/augurs

* implement LabelBreakdownScene

* integrate SortByScene in LabelBreakdownScene

* move to new directory

* introduce BreakdownSearchScene

* integrate searchScene

* cleaning

* initialize @bsull/augurs

* add interaction

* use new breakdown scene

* resolve merge conflicts

* ugrade @bsull/augurs

* update import

* update css

* update tooltip text

* refine sorting

* fix unit test

* fix

* implement outlier detector

* support wasm

* jest testing fix

* localization fix

* use unknown instead of any

* update i18n

* update betterer

* fix locales

* update test

* fix tests maybe

* prettier

* chore: update jest config

* chore: create mock for @bsull/augurs (#92156)

chore: create mock for bsull/augurs

@bsull/augurs assumes it will be running as an ESM, not
a CommonJS module, so can't be loaded by Jest (specifically
because it contains a reference to import.meta.url).

This PR provides a mock implementation which gets tests passing
again.

Ideally we'd be able to load the actual @bsull/augurs module
in tests so this is just a stopgap really, until a better
solution appears.

* fix unit tests

* remove unused BreakdownScene.tsx

* set outliers as undefined if an error occurs

* Add labels

* betterer

* reset event implemented

* fix controls positioning

* remove sorting

* fix type guard

* more clean up

* remove wasm support from webpack

* betterer

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ben Sully <ben.sully@grafana.com>
2024-09-20 10:22:34 +02:00
Brendan O'Handley
4d1adf9db4
Explore Metrics: Get OTel resources and filter metrics and labels (#91221)
* add OTel filter in metric select scene

* add resource query to get matching OTEL job&instance

* filter metrics by OTEL resources

* only add otel select if DS has OTEL matching job and instance

* add folder for otel resources

* upate metric select for new otel folder

* move otel api call

* get otel resources for labels for single series job/instance target_info

* add otel resources to adhoc variable dropdown

* update otel api to check for standardization and return labels

* label types for api

* check standardization, show otel variable, select depenv, update other variables

* remove otel target list from metric select scene

* load resources if dep_env label has already been selected

* exclude previously used filters

* do not check standardization if there are already otel filters

* drop filters when switching data sources

* add experience var for switching to otel experience

* remove otel from variables and place near settings

* add error for non-standard prom with otel resources

* fix typescript errors, remove ts-ignores

* add custom variable for deployment environment like app-olly

* fix name of otel variable

* add function for getting otel resources from variables

* add otel join query const

* update standard check to be simpler

* allow for unstandard otel data sources but give warning

* add otelJoinQuery to the base query and clean up variables when state changes

* refactor otel functions to return filters for targets, use targets to filter metrics

* update metric names on otel target filter change

* when no otel targets for otel resource filter, show no metrics

* move switch to settings, default to use experience, refactor otel checks

* clean code

* fix refactor to add hasOtelResources for showing the switch in settings

* sort otel resources by blessed list

* reset otel when data source is changed

* move otel experience toggle back outside settings

* move showPreviews into settings

* do not re-add otel resources from blessed list to filters when already selected

* add otel join query variable to histogram base query

* only show settings for appropriate scenes

* show info tooltip the same but show error on hover for disabling otel exp for unstandard DS

* refactor tagKeys and tagValues for otel resources variable, fix promoted list ordering, fix dep env state bug

* default dep env value

* apply var filters only where they are using VAR_FILTER_EXPR in queryies

* change copy for labels to attributes

* do not group_left job label when already joining by job

* update copy for label variable when using otel

* remove isStandard check for now because of data staleness in Prometheus

* default to showing heatmap for histograms

* add trail history for selecting dep env and otel resources

* add otel resource attributes tests for DataTrail

* move otel functions to utils

* write tests for otel api calls

* write tests for otel utils functions

* fix history

* standard otel has target_info metric and deployment_environment resource attributes

* fix tests

* refactor otel functions for updating state and variables

* clean code

* fix tests

* fix tests

* mock checkDataSourceForOtelResources

* fix tests

* update query tests with otelJoinQuery and default to heatmap for _bucket metrics

* fix tests for otel api

* fix trail history test

* fix trail store tests for missing otel variables

* make i18n-extract

* handle target_info with inconsistent job and instance labels

* fix otel copy and <Trans> component

* fix custom variable deployment environment bug when switchiing data sources from non otel to otel

* fix linting error for trans component

* format i18nKey correctly

* clean up old comments

* add frontend hardening for OTel job and instance metric list filtering

* fix test for deployment environment custom variable to use changeValueTo

* fix i18n

* remove comments for fixed bug

* edit skipped tests
2024-09-19 09:34:31 -05:00
Oscar Kilhed
4d50cb2b7b
Scenes: Ensure scenes dashboards interpolate variables in sql queries the same as old arch (#93270)
Ensure scenes dashboards interpolate variables in sql queries the same as old arch
2024-09-17 13:33:06 +01:00
Ashley Harrison
161d452841
Chore: Type improvements (#93267)
* some type fixes + ignore graveyard folder

* few more fixes

* remove comment

* ignore global styles

* few more type fixes
2024-09-13 09:50:55 +01:00
Piotr Jamróz
3514504240
Tracing: Remove redundant types (#91835)
* Display event name of a span

* Clean up

* Retrigger the build

* Show colon only when there are fields to display

* Rollback

* Use event name when exporting to OTLP

* Allow filtering spans by event name

* Remove redundant types

* Remove redundant TraceLog

* Update betterer report
2024-09-13 10:05:37 +02:00
Gilles De Mey
90ee52e8d9
Alerting: New search UI – Part 1 (#91620) 2024-09-11 14:29:26 +03:00
Ashley Harrison
79a86b9e6a
Chore: Improve typings (#93180)
* fix some any's/type assertions

* fix some more any/type assertions
2024-09-11 09:30:33 +01:00
Yuri Tseretyan
cb372d3fa8
Alerting: Support secrets in contact points nested fields (#92035)
Back-end:
* update alerting module
* update GetSecretKeysForContactPointType to extract secret fields from nested options
* Update RemoveSecretsForContactPoint to support complex settings
* update PostableGrafanaReceiverToEmbeddedContactPoint to support nested secrets
* update Integration to support nested settings in models.Integration
* make sigv4 fields optional

Front-end:
* add UI support for encrypted subform fields
* allow emptying nested secure fields
* Omit non touched secure fields in POST payload when saving a contact point
* Use SecretInput from grafana-ui instead of the new EncryptedInput
* use produce from immer
* rename mapClone
* rename sliceClone
* Don't use produce from immer as we need to delete the fileds afterwards

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
2024-09-10 22:26:23 -04:00
Gilles De Mey
c8dc4d93d4
Alerting: Rename list view section titles (#93182) 2024-09-10 19:31:11 +03:00
Tobias Skarhed
096105fed6
New Select: Try it out with some core components (#92826)
* Export Combobox and add portalling

* Use floatingui fixed strategy and fix z-index

* Check non null

* Make value string type only

* Try with fiscal year setting

* Use combobox for WeekStartPicker

* Improve screen reader handling

* Fix faulty import

* Fix type issue

* Fix failing tests and export unstable

* Rename option and remove export

* Use comboboxMockSetup function

* Add support for number type

* menuClosed styles to emotion
2024-09-10 17:28:00 +03:00
Laura Fernández
1701dc85e7
A11y: Focus outline is not fully visible in several areas of the application (#93030) 2024-09-10 13:50:12 +02:00
Adela Almasan
af48d3db1e
Canvas: Add actions support (#90677)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-09-09 09:11:55 -05:00
Josh Hunt
cad56df002
Make Combobox Storybook story public, with indev disclaimer (#93042) 2024-09-06 17:56:03 +03:00
kay delaney
d8b6a5bde2
DashGPT: Fixes issue with generation on Safari (#90337)
* DashGPT: Fixes issue with generation on Safari

* Fix infinite loop issue + more refactoring

* Solve linter

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-09-04 18:56:20 +03:00
Kyle Cunningham
437472811e
Table: Fix nested table overlap when table is sorted (#92716) 2024-09-03 15:27:14 -05:00
Piotr Jamróz
d7d22bbbb8
TraceView: Display event names of a span (#91382)
* Display event name of a span

* Clean up

* Retrigger the build

* Show colon only when there are fields to display

* Rollback

* Use event name when exporting to OTLP

* Allow filtering spans by event name

* Show duration as a key/value pair

* Update betterer report (we do not translate panels that are planned to be externalized)

* Fix tests after changing how duration is rendered

* Handle long names

* Test handling long names

* Make parenthesis gray

* Fix a test

* Fix linting

* Fix tests

* Update label
2024-09-03 11:18:50 +02:00
Laura Benz
cdf035f813
Scenes/RestoreDashboards: Adjust DeleteDashboardModal and Toast message (#92601)
* refactor: replace soft delete method

* refactor: adjust test to new naming

* refactor: clean up unused functions

* refactor: replace delete modal

* refactor: use new delete modal outside of scenes
2024-09-02 18:04:02 +02:00
Ashley Harrison
714f2d6d51
Playlist: Add default border radius to PlaylistTableRows (#92666)
add default border radius to PlaylistTableRows
2024-09-02 09:39:47 +01:00
Tom Ratcliffe
690fbe6077
Alerting: Edit, create and delete contact points via k8s API (#91701) 2024-08-30 12:10:30 +01:00
Alex Khomenko
6abf50b0c9
Routing: Update core tests (#92582)
* Update MegaMenu.test.tsx

* Update GrafanaRoute.test.tsx

* Remove unused file

* Update SignupInvited.test.tsx

* Remove usage of match

* Update betterer
2024-08-30 12:01:32 +03:00
Erik Sundell
db0cc24f2b
Plugin extensions: Introduce new registry for added links (#92343)
* add added component registry

* fix broken test

* add tests for usePluginComponents hook

* readd expose components

* add type assertion exceptions to betterer results

* use new addedComponent registry in legacy endpoints

* remove unused code

* cleanup

* revert test code

* remove commented code

* initial commit

* refactor sync method and hook

* fix tests

* subscribe to the correct registry

* remove old registry

* cleanup types

* add use usePluginLinks hook

* add more tests

* fix import order

* fix typo

* fix and temporarly skip failing tests

* wip

* add hook tests

* add more tests

* remove old hook

* fix versioning

* add version to all extension point ids

* remove cleanup

* remove unused imports

* revert touched file

* fix test

* test: remove hook creation

* catch init error

* send error to faro

* fix broken hook

* comment out call hook initialization

* use the right import ofr isString

* remove unused import

* remove registryState type

* pr feedback

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* remove no longer relevant comment

* fix broken tests

* Fixed test to verify that the memotization works properly.

* simplify hooks

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2024-08-30 10:09:01 +02:00
Erik Sundell
b648ce3acf
Plugin extensions: Introduce new registry for added components (#91877)
* add added component registry

* fix broken test

* add tests for usePluginComponents hook

* readd expose components

* add type assertion exceptions to betterer results

* use new addedComponent registry in legacy endpoints

* remove unused code

* cleanup

* revert test code

* remove commented code

* wrap in try catch

* pr feedback
2024-08-27 11:14:04 +02:00
Gilles De Mey
00381711a4
Alerting: useProduceNewRuleGroup for creating / updating alert rules. (#90497)
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-08-22 15:57:23 +03:00
Ashley Harrison
ab312914cd
Chore: cleanup util SCSS styles (#92078)
migrate SCSS util classes
2024-08-20 09:31:04 +01:00
Ryan McKinley
427dad26a2
Swagger: Add a custom swagger/api page (#91785)
Co-authored-by: Kristian Bremberg <kristian.bremberg@grafana.com>
2024-08-14 09:03:00 +03:00
Tom Ratcliffe
735954386f
Alerting: Consolidate contact points dropdown and add filter in alert rules (#91690)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2024-08-13 12:56:13 +01:00
Yulia Shanyrova
8044cb50f1
Plugins: Plugin details right panel is added. All the details were moved from thee top to the right panel (#90325)
* PluginDetailsRight panel is added. All the details were moved from the top to the right panel

* Add feature toggle pluginsDetailsRightPanel,Fix build, fix review comments

* Fix the typo

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* hasAccessToExplore

* changes after review, add translations

* fix betterer

* fix betterer

* fix css error

* fix betterer

* fix translation labels, fix position of the right panel

* fix the build

* add condition to show updatedAt for plugin details

* add test to check 2 new fields at plugin details right panel;

* change the gap and remove report abuse button from core plugins

* add more tests

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-08-13 11:55:30 +02:00
Ashley Harrison
dface46474
Chore: Migrate gf-form classes to emotion globals (#91632)
* migrate gf-form classes to emotion globals

* should be sm due to the different way the breakpoints work
2024-08-12 13:16:16 +01:00
Gilles De Mey
add99fb3d0
Alerting: Add basic support for active_time_intervals (#91710) 2024-08-12 14:51:12 +03:00
Bogdan Matei
3303900c09
Scopes: Lift scopes at global level (#90136) 2024-08-12 14:11:50 +03:00
ismail simsek
faf7cb9312
Chore: Refactor explore metrics layout switcher and breakdown scene (#90944)
* refactor breakdown scene

* refactor BreakdownScene along with LayoutSwitcher

* rename

* don't pass default layout

* better type handling

* betterer
2024-08-11 23:48:36 +02:00
Beto Muniz
a8b2a75dab
GOps: Setup FullStory in the IRM configuration tracker (#90442)
* GOps: Setup support FullStory in the IRM configuration tracker

* fix: improve fs-unmask class application

* fix: remove extrtag as requested in PR review

* fix: revert extratag removed since it affects UI alignment

* fix: wrap text with trans component as betterer ask

* fix: update extraction
2024-08-07 18:08:13 -03:00
Andrej Ocenas
04d8f0f063
Runtime: Add provider and access hook for location service (#90759) 2024-08-01 15:59:20 +02:00
Tom Ratcliffe
6c64d1d443
Alerting: Consume k8s Time Intervals API (#90094) 2024-07-31 16:59:15 +03:00
Kristina
783ff71560
Explore: Allow saving to Query Library from query row (#89381)
* wip

* Add save functionality to query row

* add success conditional

* move around translations

* Add translations

* Add key to fix test

* Add key to the right spot

* define specific save button

* WIP - Use RowActionComponents to add action without modifying the core component

* Only add component once on render

* Move logic to main explore page

* Add keyed render actions to prevent redundancy, use this to add keyed action

* Overcome the forces of dayquil to attempt to make actual sense

* Add scoped actions to query action component

* Spaces not allowed in generateName
2024-07-30 13:56:44 -05:00
kay delaney
b80e16075f
Scenes/Dashboards: Fix issue where changes in panel height weren't saved (#91125)
* Scenes/Dashboards: Fix issue where changes in panel height weren't saved
2024-07-30 12:34:30 +03:00
Josh Hunt
d7e85354d1
E2C: Improvements to workflow (#91045)
* E2C: Improvements to workflow

* no eslint comment

* i18n

* i18n:

* lint
2024-07-26 16:56:03 +01:00
renovate[bot]
3383e2f6b9
Update dependency @grafana/aws-sdk to v0.4.1 (#90898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 18:03:44 +03:00
Ryan McKinley
ec6c6bd6c3
Identity: Add read-only identity apiserver (#90418) 2024-07-26 17:09:08 +03:00
Sonia Aguilar
8423d06988
Alerting: Implement UI for grafana-managed recording rules (#90360)
* Implement UI for grafana-managed recording rules

* use undefined for the duration instead of null , for recording rules

* Fix tests

* add tests

* Add pause functionality for grafana recording rules

* update translations

* remove obsolete snapshot

* use createUrl instead of renderUrl

* refactor

* Add validation for grafana recording rule name

* create util functions for rule types and add record field in mock function

* add util isDatatSourceManagedRuleByType

* refactor

* Add metric field in alert rule form

* fix alert name component

* update width for alert name and metric

* fix test

* add validation back to cloud recording rules name

* Alerting: Recording rules PR review (#90654)

Update type helper methods

* add slash in createUrl

* fix baseurl in the returnTo

* nits

* Add metric on expanded row in the alert list view

* nits
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>

* update snapshot

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-07-26 13:52:22 +02:00
Josh Hunt
7e6e76f4ff
E2C: Show rebuild snapshot button (#90941)
* E2C: Show rebuild snapshot button

* i18n

* Update public/app/features/migrate-to-cloud/onprem/Page.tsx

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

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2024-07-25 18:03:59 +03:00
Dominik Prokop
2e5b41cbcb
TemplateSrv: Backportable version of 90808 (#90833)
TemplateSrv: Backportable version of 90808 (#90816)

* TemplateSrv: Add test case for SafeSerializableSceneObject

* Update dashboard data source to use scoped vars scene object valueOf

* 11.1.x Backportable version of 90808

* lint
2024-07-23 16:02:20 +02:00
Dominik Prokop
89945b1bc2
Revert "TemplateSrv: Backportable version of 90808 (#90816)" (#90831)
This reverts commit 6849a6b86b.
2024-07-23 16:28:15 +03:00
Vickie Chen
a1182b119e
Chore: Remove deprecated layout components from Plugins Platform (#88523)
* Chore: Remove deprecated layout components from Plugins Platform

Resolves #86878

* Chore: Use `Box` instead of `div`
2024-07-23 14:16:26 +02:00
Dominik Prokop
6849a6b86b
TemplateSrv: Backportable version of 90808 (#90816)
* TemplateSrv: Add test case for SafeSerializableSceneObject

* Update dashboard data source to use scoped vars scene object valueOf

* 11.1.x Backportable version of 90808

* lint
2024-07-23 14:05:24 +02:00
Ida Štambuk
5b17cd93c5
Cloudwatch: Remove awsDatasourcesNewFormStyling feature toggle (#90128)
* Remove toggle from cloudwatch plugin

* Remove feature toggle from registry

---------

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2024-07-22 14:48:17 +02:00
Tom Ratcliffe
4e364ea043
Alerting: Split out contact points components to separate files (#90605) 2024-07-22 10:54:13 +03:00