Commit Graph

9647 Commits

Author SHA1 Message Date
Nathan Marrs
12a45fdeca
Canvas: Refactor scene.tsx for better maintainability (#88517)
Co-authored-by: drew08t <drew08@gmail.com>
2024-06-13 03:33:42 +03:00
Ashley Harrison
13d00e09ab
Chore: Migrate some more SCSS to emotion (#89038)
* migrate section-heading

* move fonts to global styles

* migrate code styles to emotion globals

* migrate spacings styles and leave some in angular

* padding should be 2 here not 1
2024-06-12 14:46:20 +01:00
Isabella Siu
9877aa7039
Cloudwatch: Metrics Query Builder should clear old query (#88950) 2024-06-12 09:31:05 -04:00
Edvard Falkskär
6998bf40d7
BarChart: Fix type error when there are no series (#89087)
BarChart: Fix reference error when there are no series
2024-06-12 02:59:03 -07:00
Joao Silva
dc03798c34
Chore: Remove gf-forms from alertmanager and graphite datasources (#88933) 2024-06-12 10:13:13 +01:00
Haris Rozajac
2d370f3983
Explore: Logs pinning in content outline (#88316)
* wip: working version

* add delete buttons, put pinned logs on top,

* Use already available onPinLine prop

* cleanup

* Fix alignment of pinned log

* Limit to 3 pinned log lines

* Format tooltip message

* Lower to font size and adjust padding so pinned log title is fully visible

* Add internationalization support in Explore Logs

* Update json for i18n

* Test remove button

* Open content outline after pinning a log

* Remove console.log statements

* Minor changes

* Conflict stuff
2024-06-11 11:15:36 -06:00
Matias Chomicki
ff0c9bd66a
Log: Added panel support for filtering callbacks (#88980)
* chore: update stale comment

* Logs Panel: add props for interactive callbacks

* LogsPanel: type guard unknown props

* chore: add comments

* chore: rename popover filtering callbacks prop names

* chore: format panelcfg

* Formatting

* LogsPanel: add default label filter handlers using panel context

* Formatting

* chore: add tests for new props
2024-06-11 16:54:41 +03:00
Leon Sorokin
f32afbcb0a
BarChart: Fix bar widths changing when toggling series (#89010) 2024-06-11 16:43:39 +03:00
Ivana Huckova
09e74acc94
Loki: Respect pre-selected filters in adhoc filter queries (#89022)
* Loki: In adhoc filters, respect pre-selected filters

* improve test,fix quotes

* Refactor
2024-06-11 13:09:29 +03:00
kay delaney
207672365a
@grafana/data: Introduce new getTagKeys/getTagValues response interface (#88369)
* @grafana/data: Introduce new getTagKeys/getTagValues response interface
2024-06-10 13:48:40 +01:00
David Harris
60bec80672
Cloudwatch: add keywords (#88855)
---------

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2024-06-10 08:11:47 -04:00
Adela Almasan
52fe19249e
VizTooltip: Fix heatmap histogram display (#88945) 2024-06-08 02:33:49 +03:00
Kyle Cunningham
8aa1bbe27c
Table Panel: Enable text wrapping (#86895)
* Calculate row height

* Move things around

* Update getItemSize to use text bounding box

* Update types

* Cleanups and reminders

* Calculate line height

* Update line height calculation

* Remove debugging

* Add cell option editing

* Prettier

* Use field configured for text wrapping

* Add TODO

* Make sure column configuration is correct

* Update height heuristic and hover behavior

* Disable overflow on hover with text wrapping

* Update heuristic

* Clean things up

* Color background cell options

* Fix tests

* Prettier

* React deps

* Remove old hook dep

* Fix type errors

* Update label and description for editor

* Fix non-wrapped case

* Make sure color background works

* Prettier

* Address review comments

* fix prettier

* Add heuristic for field sizing

* Fix up logic

* Prettier

* Fix test

* Oh prettier 🙈

* Don't wrap text on non-string fields

* Add wrapping to color text cell

* Prettier

* Fix option not showing for auto cell type

* Move longest field guessing into function

* Clean things up

* Add tests

* Make sure text won't flake

* Prettier

* Remove spurious import

* Ignore any in this case

* Add alpha label

* Prettier

* Fix typecheck

* Fix crash when sampling when there are undefined records

* Update heuristic to take into account long strings

* Prettier

* Update scale factors

* Update field index selection

* Prettier

---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-06-07 23:15:33 +07:00
Jack Westbrook
0e73c4d387
Storybook: Bump to 8.1.6 (#88899)
* chore(storybook): bump to latest 8.1.6

* chore(yarn): dedupe yarn.lock post storybook update

* chore(typescript): align react types across repo
2024-06-07 14:31:31 +02:00
Adela Almasan
79f9d529d3
VizTooltip: Format header value (#88726) 2024-06-06 13:08:05 -05:00
Andreas Christou
c9778c3332
AzureMonitor: Prometheus exemplars support (#87742)
* Update types

* Mark datasource as supporting traces

* Add logic to transform exemplar query to traces query

* Render appropriate editor

* Run trace query for exemplars

* Refactor out common functions

- Add function to retrieve first/default subscription

* Add route for trace exemplars

* Update logic to appropriately query exemplars

* Update traces query builder

* Update instance test

* Remove unneeded import

* Set traces pseudo data source

* Replace deprecated function calls

* Add helper for setting default traces query

* Don't show resource field for exemplars query

* When resetting operation ID for exemplars set query to default

- Update tests

* Update query header to appropriately set the service value

* Fix response frame creation and update tests

* Correctly select resource

* Convert subscriptionsApiVersion to const

* Add feature toggle
2024-06-06 17:53:17 +01:00
Ashley Harrison
5f33943397
Select: Revert "preserving custom value" changes (#88856)
* revert Select changes as we can handle it outside of the base select component

* update scenes

* update scenes properly

* revert changes to azure-monitor e2e tests
2024-06-06 17:33:31 +01:00
Adela Almasan
3ad03d869d
VizTooltip: Allow setting the maxWidth option (#88652) 2024-06-06 11:20:58 -05:00
David Harris
f8f44f28d3
chore: update mssql readme (#88859)
Adds better docs link
2024-06-06 17:18:43 +01:00
renovate[bot]
504f64e248
Update opentelemetry-js monorepo (#88850)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-06 15:31:16 +01:00
Matias Chomicki
a21a9b9c6c
Loki: Kick start your query now applies templates to the current query (#87658)
* Kick start your query: keep pipe operations in the original query

* QueryPatternsModal: define keep operations from the operations list

* QueryPatternsModal: resolve deprecation

* QueryPatternsModal: use the correct import

* QueryPatternsModal: use category instead of order rank

* QueryPatternsModal: add unit test case

* Chore: change button cta
2024-06-06 12:47:17 +03:00
Andre Pereira
277067ac9d
AnnotationsPlugin2: Implement support for rectangular annotations in Heatmap (#88107)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-06-05 16:48:37 -05:00
Tom Ratcliffe
170d476bdc
Alerting: Add RBAC logic for silences creation (#87322)
* Remove role requirement for editing silence (instead handled by silence editor displaying error)

* Send query params for metadata/access control silence logic

* Add new access control types to enum

* Add folder-specific checks for silences

* Remove filtering in alert manager picker

* fix flakey rule viewer test and update permissions helper

* Use `returnTo` in rule viewer page

* Fix incorrect display of duration

* Clean up some mock server behaviour in rule details tests

* Tweak styles for silences alerts table

* Remove alertmanager picker from silences drawer

* Add error if user cannot edit a silence

* Show alert rule name in silences table and consume RBAC logic

* Update mocks to include RBAC access control logic

* Update silences tests

* Update silences type to include access control info

* Update comment for missing alertmanager

* Update mock handlers and query param logic

* Tweak query params again

* Update access control mock

* Revert AM picker fix as user may not have access to Grafana AM

* Swap ternary order

* Change text for no alert rule targeted

* Don't show error alert from RTKQ query and remove alert instance preview in case of error

* Add missing translations

* Fix test adding missing mock for getting alert rule

* Add missing translations in SilencesTable

* Add translations autogenerated files

* fix allowing edit silence in external alert manager

---------

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-06-05 15:09:26 -04:00
Ivana Huckova
023857625a
Elasticsearch: Remove enableElasticsearchBackendQuerying feature toggle (#88668)
* wip

* Fix newly introduced any

* Remove toggle

* Remove unused code in LegacyQueryRunner
2024-06-05 17:03:29 +02:00
renovate[bot]
cd5f485df7 Update dependency tslib to v2.6.3 2024-06-05 10:08:51 +00:00
renovate[bot]
4443438fab Update dependency @types/node to v20.14.2 2024-06-05 09:48:36 +00:00
Matias Chomicki
ec9aecd82b
Loki: remove query formatting (#88636)
* Loki: remove query formatting

* Loki formatting: remove feature flag

* chore: remove test

* Formatting
2024-06-05 12:46:28 +03:00
renovate[bot]
b101b37e2c
Update dependency @grafana/lezer-logql to v0.2.4 (#88745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-05 09:53:23 +01:00
renovate[bot]
45336105b2
Update dependency glob to v10.4.1 (#88717)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-05 09:32:39 +01:00
renovate[bot]
b8cd5bb57c
Update dependency @types/node to v20.14.1 (#88689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 13:58:08 +01:00
Sarah Zinger
4d002d85f9
Cloudwatch Logs: Fix bug where we did not return errors to user (#87190) 2024-06-04 08:43:36 -04:00
Joey
a52f99246f
Tempo: Send current filters when retrieving tags for AdHocFilters (#88270)
* Send current filters when retrieving tags

* Tests

* Syntax update

* Update if
2024-06-04 13:20:06 +01:00
Sven Grossmann
2fb63cd2e6
Loki: Fix editor history in wrong order (#88666) 2024-06-04 11:40:04 +02:00
Oscar Kilhed
0f89f4b2d2
Grafana UI: stop input element of the react select component from overflowing and causing layout issues. (#88372)
* Grafana UI: stop input element of the react select component from overflowing the input container

* update snapshot since the css changed

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-06-04 10:13:43 +02:00
ismail simsek
f458e57523
InfluxDB: Fix custom variable support (#88642)
* fix variable support

* prettier
2024-06-03 23:47:27 +03:00
Leon Sorokin
87cafbf9af
XYChart2: Implement color-by-field (#88467) 2024-06-03 11:53:59 -05:00
EduardZaydler
dbec8465e5
Graphite: Fix splitting expressions in tag_value with template variables (#86958)
fix spilitting expressions in tag_value with template variables
2024-06-03 09:27:14 -05:00
ismail simsek
c73bbf19a1
InfluxDB: Introduce maxDataPoints setting for flux variable query editor (#87935)
* Introduce custom variable support

* Remove comment lines

* introduce maxDataPoints

* fix tests

* update

* fix unit tests

* remove new line
2024-06-03 12:09:33 +03:00
Nathan Marrs
9e82c85849
Canvas: Chore fix *remaining* betterer issues (#88491) 2024-05-31 13:33:31 -07:00
Jon Cole
ba4c1fcf76
AzureMonitor: Retrieve Azure clouds from SDK (#87944)
* AzureMonitor: get the list of azure clouds from the SDK instead of from a hard coded list

* add azure-sdk to yarn.lock

* merge legacy with custom options

* Normalize legacy cloud names

* Workaround: send new credential format to backend while we wait to migrate to the new format

* Lint fix

* resolveLegacyCloudName should not return undefined

* re-add undefined handling in resolveLegacyCloudName so that we fallback to getDefaultAzureCloud when not defined

---------

Co-authored-by: Jeremy Angel <jeremyangel@microsoft.com>
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-05-30 23:40:05 +01:00
Drew Slobodnjak
1c339db7ad
Geomap: Improve Pan and Zoom Performance (#88202)
* Geomap: Improve pan and zoom performance

* Remove unused code
2024-05-30 14:41:59 -07:00
Nick Richmond
fddf77ee35
CodeEditor: Fix broken styles (#88495)
* fix: remove erroneous container

* fix: update selector

* fix: pass data attrs via `wrapperProps`

* fix: ensure `toBeInTheDocument` checks have unique markup
2024-05-30 20:34:00 +03:00
renovate[bot]
fabed77d1f Update dependency css-loader to v7.1.2 2024-05-30 12:44:55 +00:00
renovate[bot]
0c572e8db7 Update dependency @types/node to v20.12.13 2024-05-30 10:45:34 +00:00
renovate[bot]
c5c38b57c4 Update dependency @types/lodash to v4.17.4 2024-05-30 09:52:46 +00:00
Nick Richmond
7334f71e09
CodeEditor: Improved styles when the code editor is loading (#88102)
* fix: monaco loading state

* chore: betterer

* test: leverage e2e selectors

* refactor: prefer HOC to wrap with testid

* refactor: add clarity

* docs: add clarity

* refactor: loading messaging

* test: rename vars to improve clarity

* test: rename vars to improve clarity
2024-05-29 15:55:18 -04:00
Andreas Christou
3eea71cc6b
Azure: Basic Logs support (#88025)
* Azure monitor: Basic Logs frontend (#85905)

* adds datasource level config for enabling basic logs

* add basiclogsquery type to query json

* add toggle between basic and analytics

* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected

* add check to remove UI if alerting

* tests for logsmanagement component

* tests for logs query editor

* tests for time mangement control

* remove unused imports

* clears query whenever toggle changes from basic <-> analytics

* add test to account for clearning query

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx

wording

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* update dependency list

* clear basic logs if resources change

* fix tests

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Azure Monitor: Basic Logs modal acknowledgement (#86244)

* adds datasource level config for enabling basic logs

* add basiclogsquery type to query json

* add toggle between basic and analytics

* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected

* add check to remove UI if alerting

* tests for logsmanagement component

* tests for logs query editor

* tests for time mangement control

* remove unused imports

* add confirm modal

* clears query whenever toggle changes from basic <-> analytics

* add test to account for clearning query

* adds modal acknowledgement for basic logs query

* tests for handling modal logic

* basic logs ack type

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx

wording

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx

spelling

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* update dependency list

* clear basic logs if resources change

* remove modal from config page

* remove basic logs query ack type

* add modal acknowledgement to toggle between basic and analytics

* clear query if resources change

* fix tests

* fix tests

* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsManagement.tsx

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* fix tests

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Azure Monitor: Basic Logs Backend (#87653)

* fix logic for showingBasicLogsToggle

* move to utils function and add basiclogsquery in apply template variable

* add backend safeguards for basiclogsqueries

* adds support for calling search or query apis based on whether it is basic logs or not

* add tests for utils

* initial test for basic logs query in the backend

* tests for basic logs

* remve comment

* simplify checks for basic logs

* adds fromAlert prop for azure monitor backend services

* adds fromAlert check fo basic logs

* fix working and empty tags

* add telemetry for basic logs

* remove import from grafana core package

* change fromAlert true in tests

* change the way tests catch errors

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update pkg/tsdb/azuremonitor/loganalytics/utils.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* restructure code to only run basic logs checks if basiclogsflag is true

* data retention warning

* tests for calculate time range

* Simplify determining if request is from alerting

* Fix lint and bool check

* Fix tests

* clarify data retention

---------

Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>

* Azure Monitor: Basic Logs data volume notification (#88009)

* frontend changes for data ingested warning

* initial logic for getResource

* payload processing

* create basicLogs usage function

* add utils for converting time and getting the data volume query for basic logs

* frontend updates for showing the data ingested for the given query

* frontend tests

* add check for when no dataIngested is returned

* remove backend.logger prints

* comment on what function does

* fix merge

* make resource URI regex case insensitive

* add support for workspace variables in basic logs flow

* add undefined check

* structure and add tests for variable support

* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* add tracing for basic logs usage request

* clean up data volume query struct

* use async/await instead of callback

* fix parameters for getApiURL

* restrict time on usage query to 8 days max

* add time to dependency array to refetch basic logs usage

* move time check implementation to backend

* fix utils tests

---------

Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>

---------

Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
2024-05-28 18:06:27 +01:00
Stephen J. Smith
0b2fab9967
Azure Monitor: Fix typo that may cause an API request to fail (#88320)
Fix typo
2024-05-28 17:58:06 +01:00
Andrej Ocenas
5f326e98c1
NodeGraph: Add msagl and the layered layout code (#88375) 2024-05-28 17:04:03 +02:00
Ashley Harrison
b4e49e3114
Select: Ensure screenreader correctly narrates options (#88118)
* replace select aria-label with data-testid

* update in copy pasted places as well

* update plugin-e2e to 1.2.2
2024-05-28 14:51:47 +01:00
timo
6205236f25
NodeGraph: Use values from fixedX/fixedY column for layout (#86643)
* NodeGraph: Use values from fixedX/fixedY column for layout

* Cleanup some code, typings and naming

* Add test

---------

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-05-28 15:34:35 +02:00
Drew Slobodnjak
14957953db
Stat: Add percent change color modes (#88205)
* Stat: Add percent change color modes

* Apply color mode to percent change component

* Remove todo

* Create percent change color function and add tests

* drew08t/stat-percent-change-color-modes/ maybe fix import error?

---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
2024-05-24 14:45:02 -07:00
Jon Cole
61db22f4b4
Prometheus: get Azure clouds from SDK (#87676)
* Prometheus: get the list of azure clouds from the SDK instead of from a hard coded list

* Update yarn.lock

* Fix lint

---------

Co-authored-by: Jeremy Angel (from Dev Box) <jeremyangel@microsoft.com>
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-05-24 17:56:53 +01:00
Ihor Yeromin
b4c368e72c
Canvas: Fix emotion style property error (#88162)
fix(canvas): emotion style property error
2024-05-22 16:20:40 +02:00
Joey
38fdfe43f5
Tempo: Update lezer autocomplete (histogram, quantile) and add missing functions (#88131)
* Update version

* Update autocomplete, add new functions

* Update highlighting

* Update yarn.lock
2024-05-22 13:03:51 +01:00
ismail simsek
9bdfb6ee13
InfluxDB: Introduce custom variable support (#87903)
* Introduce custom variable support

* Remove comment lines

* betterer
2024-05-21 13:46:41 +02:00
Andrej Ocenas
a2aea70100
Tempo: Don't modify the passed time range when using timeShiftEnabled (#87980)
Don't modify the passed range
2024-05-21 13:12:27 +02:00
Joey
a398188e69
Revert: Tempo: Always use time range even if timeShiftEnabled is false (#88095)
Revert "Tempo: Always use time range even if timeShiftEnabled is false (#85477)"

This reverts commit e91136338a.
2024-05-21 10:03:31 +01:00
Nathan Marrs
3d980f1d8d
Canvas: Chore clean up more betterer warnings (#88010) 2024-05-20 21:27:27 -06:00
Andrej Ocenas
20294b0fb6
NodeGraph: Remove msagl lib and layered layout option (#87905)
* Remove msagl lib

* Change drone.yml

* update signature
2024-05-20 13:50:08 +02:00
Ashley Harrison
429bcbe67f
Select: Preserve value when allowCustomValue is set (#87843)
* initial working poc with some better types

* move logic inside SelectBase

* add unit tests

* cleaner logic

* simpler

* update comments

* more comments

* use onMenuClose

* undo changes to cleanValue

* fix unit tests

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-05-20 11:01:38 +01:00
Olivier Giniaux
e91136338a
Tempo: Always use time range even if timeShiftEnabled is false (#85477)
* Tempo: Always use time range even if timeShiftEnabled is false

* Fix unused import and failing test
2024-05-20 09:28:07 +01:00
Andreas Christou
58d382e5dd
CloudMonitoring: Fix query type selection issue (#87990)
* Use deepEqual to ensure migratedQuery is only returned when query is unchanged

* Add selectors for query editors

* Add more tests for query editor component

* Clarifying comments

* Fix how state is set

* Simplify query editor loading and migration
2024-05-17 14:06:05 -04:00
Adela Almasan
1957cfe6af
XY Chart: Fix series editor index (#87942) 2024-05-16 11:18:13 -05:00
Matias Chomicki
82796fad98
Elasticsearch: queries no longer executed on-change (#87652)
* Elasticsearch: queries no longer executed on-change

* Elasticsearch: run query if it was previously undefined
2024-05-16 19:09:50 +03:00
Nathan Marrs
431fdd4bab
Canvas: Adhere editing state to dashboard editable state (#87883) 2024-05-15 17:17:50 -07:00
Jack Westbrook
65b2834420
Grafana UI: Bump to Storybook 8 (#87722)
* chore(storybook): run yarn dlx storybook@latest upgrade

* chore(storybook): remove storybook/blocks patch

* chore(yarn): clean up storybook dependencies

* feat(storybook): migrate to v8 config via migration codemods

* refactor(storybook): update stories to use v8 types via codemod

* refactor(storybook): update stories to use preview-api instead of client-api

* refactor(storybook): replace mdx usage of ArgsTable with PureArgsTable

* refactor(storybook): migrate remaining mdx files to v8 storybook/blocks api

* refactor(storybook): clean up mdx imports and blocks component names

* chore(storybook): clean up typescript configuration

* fix(frontend): align types/react versions across monorepo so grafana ui can be built

* fix(storybook): pub back react-docgen-typescript and use ArgTypes so props tables work

* chore(storybook): patch blocks package to expose Preview component

* revert(storybook): revert changes related to using Canvas component in mdx files

* Storybook upgrade: Fix icon typing (#87793)

fix iconOptions typing

* refactor(storybook): prefer as const over asserting types

* revert(storybook): put back correct case in box.mdx

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-05-15 15:49:00 +02:00
ismail simsek
4fef6ff30d
Chore: Use TemplateSrv from @grafana/runtime in influxdb datasource (#87813)
use templatesrv from @grafana/runtime
2024-05-15 12:42:09 +02:00
Joey
225755b2da
Tempo: Check for histogram in isTraceQlMetricsQuery (#87840)
Check for histogram in isTraceQlMetricsQuery
2024-05-14 16:55:57 +01:00
ttshivers
b07b927a94
Tempo: Escape backslash in span name for promsql query (#83024)
* Tempo: Escape backslash in span name for promsql query

In promsql, backslashes in regexes must be doubly escaped for them to be
interpreted as a literal backslash character.

Fixes #79791

* Fix regex replace

---------

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-05-14 16:57:35 +02:00
Adela Almasan
fa66816be4
BarChart: Add check for empty series (#87761)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-05-14 07:38:29 -05:00
Andres Martinez Gotor
d8904f3ca4
Add apiVersion to plugin models (#87510) 2024-05-14 13:58:27 +02:00
renovate[bot]
2f11cf84e8 Update dependency @grafana/experimental to v1.7.11 2024-05-14 11:51:13 +00:00
Torkel Ödegaard
6f1fce7540
TestData: Fixes query interpolation (#87803) 2024-05-14 13:40:54 +02:00
Fabrizio
bd4e9d102b Update version to 11.0.0 2024-05-14 12:54:11 +02:00
Nick Richmond
18f8f2324a
Graphite: Fix alignment of elements in the query editor (#87662)
style: ensure elements in query builder rows are aligned
2024-05-13 12:51:32 -04:00
renovate[bot]
54d026f576
Update dependency immer to v10.1.1 (#87709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-13 12:55:12 +01:00
renovate[bot]
b536b6d7de Update dependency glob to v10.3.15 2024-05-13 10:24:30 +00:00
Torkel Ödegaard
a6076d8d05
TestData: Do not mutate query in applyTemplateVariables (#87680) 2024-05-13 08:24:54 +02:00
Adela Almasan
f706c78ea1
Chore: Refactor tooltip scrollable prop (#87671) 2024-05-11 03:19:42 +03:00
Adela Almasan
ddde7f1056
XYChart: Use global range for mapped size field (#87661)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-05-10 18:59:03 -05:00
Leon Sorokin
f43ed7e6d7
BarChart: Refactor and VizTooltip fixes (#87160)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2024-05-10 12:58:53 -05:00
renovate[bot]
8bfd7e5106
Update dependency @types/react-test-renderer to v18.3.0 (#87649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-10 19:29:46 +03:00
Ashley Harrison
396e75dadf
Chore: Type improvements (#87634)
* improve typings in opentsdb datasource

* couple of influx improvements

* couple more

* more

* more more more

* 3 more

* changes to variables/inspect/utils

* some graphite improvements
2024-05-10 17:28:44 +01:00
Andreas Christou
95667f6a53
CloudMonitoring: Improve legacy query migrations (#86069)
* Match backend and correctly migrate metricType

Update tests

* Ensure project is migrated or set if not defined

* Improve migrations logic
2024-05-10 16:57:18 +01:00
Torkel Ödegaard
fcda8c235f
MixedDataSource: Support multi value data source variable that issues a query to each data source (#87586)
* Revert "Revert "MixedDataSource: Support multi value data source variable tha…"

This reverts commit 979d87f46f.

* fix issue
2024-05-10 16:03:25 +02:00
renovate[bot]
be1bb04e9b Update dependency semver to v7.6.2 2024-05-10 13:32:47 +00:00
renovate[bot]
329f4b1243 Update dependency glob to v10.3.14 2024-05-10 16:11:50 +03:00
renovate[bot]
0793a9033a
Update dependency @types/lodash to v4.17.1 (#87419)
* Update dependency @types/lodash to v4.17.1

* fix grafana-data

* simpler grafana-data fix

* simpler code

* commit a betterer crime (it was already doing this implicitly before...)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-05-10 13:56:27 +01:00
Sven Grossmann
1c8a77a43d
Loki: Fix log context when no label types are present (#87587) 2024-05-10 11:52:41 +02:00
Andrew Hackmann
5e19aa7bd1
Azure data sources: Set selected config type before save (#87481)
* set selected config type before save

* use effect once and move in mssql

* add to prom

* Update ConfigurationEditor.tsx

* Update ConfigurationEditor.tsx

* Delete public/app/plugins/datasource/mssql/configuration/ConfigurationEditor.tsx

* omadsfdsa

* remove unneeded assign
2024-05-10 03:54:24 +03:00
Nathan Marrs
eae2ce38e8
Canvas: Fix infinite panning editor description (#87582) 2024-05-10 01:13:42 +03:00
Drew Slobodnjak
dfdf119f7f
Canvas: Improve connection vertex logic (#87580)
Canvas: Prevent machine error causing logic swap
2024-05-09 14:38:43 -07:00
Kristina
979d87f46f
Revert "MixedDataSource: Support multi value data source variable that issues a query to each data source" (#87579)
Revert "MixedDataSource: Support multi value data source variable that issues…"

This reverts commit 700d378c98.
2024-05-09 16:16:28 -05:00
Chris Marchbanks
49cd917b08
Prometheus: Use correct datasources:write permission (#87454)
The datasources:edit permission does not exist and should have been write to begin with.
2024-05-09 14:20:34 -05:00
Drew Slobodnjak
06a27911a4
Canvas: Fix bug for connection first vertex (#87534) 2024-05-09 09:17:23 -07:00
Torkel Ödegaard
700d378c98
MixedDataSource: Support multi value data source variable that issues a query to each data source (#83356)
* MixedDataSource: Support multi value data source variable

* go work sync

* fix typo

* if it is not interpolated use the actual uid

* Update tests

* prettier

* go work sync

* add more unit test case

* Update tests to use scene variables

* merge main

* Update

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-05-09 13:27:09 +02:00
renovate[bot]
df12007f80
Update dependency @opentelemetry/semantic-conventions to v1.24.1 (#87544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-09 13:55:15 +03:00
renovate[bot]
25dfc865d5 Update Yarn to v4.2.2 2024-05-09 11:04:02 +01:00
renovate[bot]
01d28e01d2 Update dependency semver to v7.6.1 2024-05-08 17:21:38 +00:00
renovate[bot]
04ce2d2f5a Update dependency @types/prismjs to v1.26.4 2024-05-08 14:53:35 +00:00
renovate[bot]
98435a67f5 Update dependency @types/node to v20.12.11 2024-05-08 16:08:44 +02:00
Torkel Ödegaard
e7c39f18be
DashboardDataSource: Fixes issue where sometimes untransformed data could be returned (#87433)
* DashboardDataSource: always return a result key

* Update

* Update
2024-05-08 08:25:19 +02:00
Yuri Kotov
33170c4d07
Loki: Use label/<name>/values API instead of series API for label values discovery (#83044)
* Loki: Add label values API selector to setting and use label_values API when selected

* remove CHANGELOG change

* add docs

* Support Loki 2.7+ only, so unconditionally use /labels API

* Correct doc for fetchLabels and fetchLabelValues functions

* Fixes after merge

* Do not encode query parameter twice

* return getLabelKeys in Completion Provider

* docs

* Add test for LabelParamEditor

* Update public/app/plugins/datasource/loki/LogContextProvider.test.ts

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

* toHaveBeenCalledWith

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2024-05-06 13:47:49 +02:00
Adela Almasan
7bcda34b55
XY Chart: Prevent crash when deleting a series (#87356) 2024-05-03 17:21:46 -05:00
Adela Almasan
8a96fcedb2
XyChart: Fix legend (#87155) 2024-05-04 01:06:05 +03:00
Nathan Marrs
68fa2110d6
Canvas: Fix phantom connections persisting after element deletion (#87285) 2024-05-03 14:17:05 -07:00
Laura Benz
ecd7357049
Dashboards: Add toggle for folder names in dashboard list panel (#87288)
* refactor: add switch

* refactor: add functionality

* refactor: fix test
2024-05-03 17:52:10 +02:00
Gilles De Mey
5e25afe6e9
Alerting: New settings page (#84501) 2024-05-03 17:42:42 +02:00
renovate[bot]
6a696a976b
Update Yarn to v4.2.1 (#87325)
* Update Yarn to v4.2.1

* add new yarn version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-05-03 18:10:51 +03:00
Chris Marchbanks
d6c93c12bf
Prometheus: Add reqAction to Prometheus routes (#87208)
Add reqAction to Prometheus routes

This should allow provisioned service accounts that do not have a role to use the /proxy endpoints for Prometheus. This
is desired for some integrations that need to query for labels or other data not part of /ds/query.
2024-05-03 16:09:06 +02:00
renovate[bot]
346dbab768 Update dependency lru-cache to v10.2.2 2024-05-03 12:58:12 +00:00
renovate[bot]
b25f193be0 Update dependency @types/node to v20.12.8 2024-05-03 11:25:38 +00:00
Domas
4b496a907d
Tempo: Option to not show variable options in "search" editor (#87126)
* allow disabling variable options in Tempo "search" editor

* also for GroupByField

* set addVariablesToOptions true by default
2024-05-03 14:22:03 +03:00
Drew Slobodnjak
6c7485129b
Canvas: Fix datalinks using field variable (#87265) 2024-05-02 11:29:43 -07:00
Sergej-Vlasov
37ca484aad
DashboardQueryEditor: Adjust options filtering in scenes (#87174)
adjust options filtering for dashboard datasource in scenes
2024-05-02 15:10:06 +03:00
Gábor Farkas
d7ff3213f3
postgres: decouple the frontend-part (#87131) 2024-05-02 12:25:25 +02:00
Tobias Skarhed
a59e7e14b1
AnnotationList: Fix link for annotation with no panel or dashboard (#87048)
* Handle case for no associated panel or dashboard

* Convert to CSS object

* Add tests and extend type to cover null use case
2024-05-02 11:30:19 +03:00
Adela Almasan
ee4422d1e2
XYChart: Fix default point size (#87192) 2024-05-01 21:19:54 +03:00
Adela Almasan
0fbfb67b15
XY Chart: Show mapped size/color fields in tooltip (#87153) 2024-05-01 09:55:11 -05:00
Krishna Dhakal
deb6d27406
Core: Replace deprecated jest matcher toBeCalledWith (#86635)
* Replace depredated matcher from jest

* perform rechecks

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-05-01 15:33:26 +01:00
Adela Almasan
4312f2accd
XYChart2: Fix tooltip mode (#87147) 2024-04-30 13:19:37 -05:00
Kevin Yu
a54df47976
CloudWatch: Add labels for Metric Query type queries (#85766)
* CloudWatch: Fix metric query with group by not being labelled in alerts

* just use one key for the labels

* not needed

* unused function

* add tests

* pr comments

* fetch dimensions to build labels for MetricQuery type queries

* pr comments

* group cache related tests and use fresh cache for non-cache related tests

* don't cache empty values
2024-04-30 09:06:16 -07:00
ismail simsek
4cc6b53a6d
Chore: InfluxDB unit testing overhaul (#86586)
* move mocks into the __mocks__ folder

* refactor datasource.test.ts

* refactor datasource_backend_mode.test.ts

* add dbName tests

* prettier

* betterer
2024-04-30 09:59:42 -04:00
Konrad Lalik
9369f07e32
Alerting: Immutable plugin rules and alerting plugins extensions (#86042)
* Add pluginsApi

* Add rule origin badge

* Make plugin provided rules read-only

* Add plugin settings caching, add plugin icon on the rule detail page

* Add basic extension point for custom plugin actions

* Add support for alerting and recording rule extensions

* Move plugin hooks to their own files

* Add plugin custom actions to the alert list more actions menu

* Add custom actions renderign test

* Add more tests

* Cleanup

* Use test-utils in RuleViewer tests

* Remove __grafana_origin label from the label autocomplete

* Remove pluginsApi

* Add plugin badge tooltip

* Update tests

* Add grafana origin constant key, remove unused code

* Hide the grafana origin label

* Fix typo, rename alerting extension points

* Unify private labels handling

* Add reactive plugins registry handling

* Update tests

* Fix tests

* Fix tests

* Fix panel tests

* Add getRuleOrigin tests

* Tests refactor, smalle improvements

* Rename rule origin to better reflect the intent

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2024-04-30 10:34:52 +02:00
Adela Almasan
e3719471d5
Heatmap: Fix histogram highlighted series (#86955) 2024-04-29 16:02:38 -05:00
Andrej Ocenas
16395f9f23
Pyroscope: Add adhoc filters support (#85601)
* Add adhoc filters support

* Add tests

* refactor tests

* Add comment

* Removed empty param docs
2024-04-29 20:41:40 +02:00
Drew Slobodnjak
49fbe970fb
Canvas: Fix connection hyperbolic bug (#87002)
* Canvas: Connection original persistence check

* Canvas: Fix connection hyperbolic bug
2024-04-29 09:16:01 -07:00
Drew Slobodnjak
7590f4afe1
Canvas: Connection original persistence check (#86476)
* Canvas: Connection original persistence check

* modify current connection state directly instead of copying and needing to call "onChange"

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-04-29 08:23:26 -07:00
kay delaney
6f875188b7
Chore: Clean up package.json files (#86951)
* Chore: Clean up package.json files

Removes any unused packages, adds missing peer dependencies
2024-04-29 14:03:01 +01:00
Matias Chomicki
f1e8d2645f
Loki: update HorizontalGroup deprecation (#86995)
* Loki: update HorizontalGroup deprecation

* Update betterer
2024-04-29 13:14:06 +01:00
Ashley Harrison
c151a97110
Chore: Enable no-unreduced-motion and fix errors (#86572)
* enable `no-unreduced-motion` in betterer

* move all animation calls inside handleReducedMotion

* fix violations + enable rule

* update rule README

* remove unnecessary transition from <Collapse>

* remove handleReducedMotion utility and add handleMotion to theme

* update to use new theme value

* handle Dropdown and IconButton

* handle AppChromeMenu and update lint message

* keep rotation at a reduced speed

* handle DashboardLoading
2024-04-29 13:12:36 +01:00
Gábor Farkas
500558bb72
mysql decouple frontend part (#86308)
* mysql decouple frontend part

* eslint "fix"

* package version update
2024-04-29 09:55:09 +02:00
Leon Sorokin
d1b67847a2
Migrations: Graph (old) percent stacked (#84335) 2024-04-25 12:51:07 -05:00
Sven Grossmann
a8424f4831
LogContext: Fix structured metadata labels being added as stream selectors (#86825)
* LogContext: Fix structured metadata labels being added as stream selectors

* use row index
2024-04-24 10:00:39 +02:00
Marcus Andersson
804c726413
PluginExtensions: Make the extensions registry reactive (#83085)
* feat: add a reactive extension registry

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: add hooks to work with the reactive registry

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: start using the reactive registry

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "command palette" extension point to use the hook

* feat: update the "alerting" extension point to use the hooks

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "explore" extension point to use the hooks

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "datasources config" extension point to use the hooks

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "panel menu" extension point to use the hooks

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "pyroscope datasource" extension point to use the hooks

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* feat: update the "user profile page" extension point to use the hooks

* chore: update betterer

* fix: update the hooks to not re-render unnecessarily

* chore: remove the old `createPluginExtensionRegistry` impementation

* chore: add "TODO" for `PanelMenuBehaviour` extension point

* feat: update the return value of the hooks to contain a `{ isLoading }` param

* tests: add more tests for the usePluginExtensions() hook

* fix: exclude the cloud-home-app from being non-awaited

* refactor: use uuidv4() for random ID generation (for the registry object)

* fix: linting issue

* feat: use the hooks for the new alerting extension point

* feat: use `useMemo()` for `AlertInstanceAction` extension point context

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-04-24 09:33:16 +02:00
Nathan Marrs
5dea949433
Canvas: Match connection anchor points to elements (#85421)
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
2024-04-23 14:26:53 -07:00
Drew Slobodnjak
173ba73a8a
Canvas: Ensure tangency for first segment (#86543) 2024-04-23 07:54:42 -07:00
Tom Ratcliffe
08200bc533
Nav: Fix alerting links/special cases not selecting the right MegaMenu item (#85336)
* Render current MegaMenu link as `aria-current=page`

* Add overrides capability for mega menu links

* Pass pageNav into getActiveItem so we can use override capability

* Test MegaMenu special cases for starred & dashboards

* Test that overrides for megamenu util works correctly

* Alpha-sort megamenu overrides

* Refactor util for getting active item for megamenu

Update parameters to getActiveItem

Update tests for getActiveItem

* Fix test for starred dashboard and remove query param test

Query param case happens differently in real app and is fiddly to test here

* handle edge cases

* restore handling home page test

* fix dashboard settings

* handle starring properly

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-04-23 11:04:53 +01:00
renovate[bot]
6c777519d8
Update dependency style-loader to v4 (#86749)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 09:08:46 +01:00
renovate[bot]
41617b174e
Update dependency css-loader to v7 (#86711)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 07:28:32 +01:00
Leon Sorokin
7754d0d4dc
XYChart2: Remove common series name from tooltip items (#86739) 2024-04-23 05:24:39 +02:00
Tobias Skarhed
b399facf2c
GeoMap: Pan and zoom keyboard support (#86573)
* Make GeoMap keyboards navigable

* Remove redundant interaction boolean

* Fix tabIndex error and set role to application

* Update docs
2024-04-22 10:53:32 +02:00
Andreas Christou
ec8dfc4dda
CloudMonitoring: Correctly interpolate multi-valued template variables in PromQL queries (#86391)
* Interpolate promql queries appropriately

- Use pipes for multi-valued variables in PromQL queries
- Update tests

* Don't break betterer

* Another any

* Update public/app/plugins/datasource/cloud-monitoring/datasource.ts

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
2024-04-19 22:07:15 +02:00
Andreas Christou
74ee675732
CloudMonitoring: Allow a custom group by value (#86288)
Allow a custom group by value
2024-04-19 20:56:12 +01:00
Andreas Christou
d8a8db3750
CloudMonitoring: Ensure variables can be used in all variable queries (#86377)
* Allow specifying project when querying services

* Ensure metricType is interpolated
2024-04-19 20:52:39 +01:00
Matias Chomicki
aa73140564
Loki: Add label filters after label_format if present (#86124)
* Loki ad-hoc filters: add filters after label_format

* Chore: add comment explaining rationale

* Formatting

* Formatting
2024-04-19 17:31:38 +02:00
renovate[bot]
c2f3bf677d Update dependency @types/react to v18.2.79 2024-04-19 11:39:32 +00:00
ismail simsek
842c8dd206
InfluxDB: Fix interpolating field keys in influxql (#86401)
* interpolate field keys

* use scopedVars
2024-04-18 19:14:29 -04:00
timo
f3fcfad2c8
NodeGraph: Fix invisible arrow tips in Editor (#86517)
NodeGraphPanel: Namespace marker IDs to fix invisible arrow tips in editor

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-04-18 18:39:16 +02:00