Commit Graph

8650 Commits

Author SHA1 Message Date
Matias Chomicki
5e37a27d1f
Loki Autocomplete: Add more context to comments about situations and completions (#76144)
* Loki completion: add more context to comments

* Improve grammar of comment

* Completions: expand on parser-offering part

* Update public/app/plugins/datasource/loki/components/monaco-query-field/monaco-completion-provider/completions.ts

* Formatting
2023-10-09 13:15:12 +02:00
NikolayTsvetkov
ce462e8cd7
Elasticsearch: Added support for calendar_interval in ES date histogram queries (#75459)
* Introduce support for calendar intervals in ES date histogram queries

* Add missing undef type check for ES calendar interval query support
2023-10-09 12:37:38 +02:00
Josh Hunt
07266aa983
Rewrite old useStyles2 pattern to use new pattern (#76136)
* Rewrite old useStyles2 pattern to use new pattern

* fix lint from used imports
2023-10-09 10:49:08 +01:00
Torkel Ödegaard
fc0933d5f4
Schema: Clean up dashboard variables schema (#76121)
* Cleanup variable schema model

* minor fix

* remove type ignores that are no longer type errors
2023-10-09 09:10:52 +02:00
Matias Chomicki
16d77dda67
Loki Query Autocomplete: better suggestions and insertions for Logfmt (#75561)
* Logfmt autocompletion: better handling of trailing commas

* Situation: refactor getSituation and  getErrorNode

Looking for simplicity, removing redundancy, and looking for a more accurate node resolution

* Autocompletion: refactor logfmt and top level

* Update tests

* Autocompletion: better handling of trailing characters

* Completions: Update data to type changes

* Update log query in test situation

* Format code

* Autocomplete: support offering partial labels

* Completion: expand test cases
2023-10-06 12:23:48 -05:00
Fabrizio
b2ba28ab40
Dashboards: Add template variables to selectable options (#75870) 2023-10-06 16:32:30 +02:00
Ashley Harrison
171e2c1adb
Chore: Improve typings and ignore Graph (#75742)
* fix some types, ignore graph plugin as it'll be gone soon

* update comments

* more more more

* undo renderer change

* use Partial in the editor
2023-10-06 11:48:15 +01:00
Nathan Marrs
bd5d67ed28
Canvas: Add ability to customize what standard element editors show up for all element types (#75935)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-10-05 12:58:35 -07:00
Nathan Marrs
b94d06bfa7
Bar Gauge: Add field name placement option (#75932)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-10-05 09:31:03 -07:00
Drew Slobodnjak
03baf210b3
Geomap: Add Symbol Alignment Options (#74293)
* Geomap: Add Symbol Anchor Options

* Update displacement for svg case

* For square and x, account for 45 degree offset

* Simplify displacement function

* Remove unused todo

* Update test defaults to include anchor

* Add missing anchor default to tests

* Move displacement function into utils and add test

* Simplify anchor position options UX

* Change verbage to alignment and swap direction

* Include missing alignment rename

* Update tests

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-10-05 09:01:56 -07:00
Gábor Farkas
eea95c2ddf
postgres/mysql: removed from-grafana-core import (#75826) 2023-10-05 07:46:24 +02:00
Gábor Farkas
cbfd1d53ee
mysql: config: fixed import and removed unused code (#75883)
* mysql: removed obsolete import

* removed unnecessary check
2023-10-05 07:46:05 +02:00
ismail simsek
a12788a4e7
InfluxDB: Interpolate variables based on their type (#75653)
* Rename the mock function

* Move tests

* Refactor existing tests

* add influxql_metadata_query tests

* move to root

* remove unnecessary file

* adhoc test

* Remove unused parameter

* tests for future

* fix mocks

* betterer

* interpolate variables based on their types

* prettier
2023-10-04 17:02:46 +02:00
ismail simsek
2d603bed22
InfluxDB SQL: Add time filter automatically (#75953)
* Use double quotes instead of backticks

* render time field as datetime

* add @react-awesome-query-builder/core

* Add time range filtering

* Update test

* Update macro test
2023-10-04 17:00:24 +02:00
Oscar Kilhed
40cdb30336
Transformations: Add support for dashboard variable in limit, sort by, filter by value, heatmap and histogram (#75372)
* variables for filterforvalue

* use datalinkinput for basic matcher

* fix user select issue

* heatmap transformation variable interpolation

* clean code

* interpolate sort by

* add options interpolation in histogram transformation

* interpolation for limit

* Add suggestions UI to Filter by data value Transformation

Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>

* add validation for number/variable fields

* Add variables to add field from calculation

* Add validator to limit transformation

* Refactor validator

* Refactor suggestionInput styles

* Add variable support in heatmap calculate options to be in sync with tranform

* Refactor SuggestionsInput

* Fix histogram, limit and filter by value matchers

* clean up weird state ref

* Only interpolate when the feature toggle is set

* Add feature toggle to ui

* Fix number of variable test

* Fix issue with characters typed after opening suggestions still remains after selecting a suggestion

* Clean up from review

* Add more tests for numberOrVariableValidator

---------

Co-authored-by: Victor Marin <victor.marin@grafana.com>
2023-10-04 17:28:46 +03:00
Andrew Hackmann
3ea6d1f7cc
AzureMonitor: Remove dependencies on Grafana frontend (#75595)
* remove local graf templateSrv and use @grafana/runtime

* tests broken still 0.0

* wip

* moving around tests and fixing

* template var test using mocking and stuff

* AM ds tests fixed

* fix filter tests

* all tests work

* remove comment

* Update azure_log_analytics_datasource.ts

* remove deferred util - not used

* mock instead of spying

* not calling getTemplateSrv each time

* pass range down to filter instead of doing werid stuff

* use default time range if no time range

* prettierer

* remove note
2023-10-04 09:25:05 -05:00
ismail simsek
c64e73540d
InfluxDB SQL: Use double quotes instead of backticks (#75443)
Use double quotes instead of backticks
2023-10-04 15:47:54 +02:00
Andreas Christou
d00ea685e6
CloudMonitoring: Use Field instead of InlineField (#75829)
* Use Field instead of InlineField

* Prettify
2023-10-04 15:45:26 +02:00
Andreas Christou
3ef3dee751
AzureMonitor: Use Field instead of InlineField (#75837)
Use Field instead of InlineField

- Update labels
2023-10-04 15:44:59 +02:00
harshabaddam
65fa94b16b
Loki: Support X-ray as internal link in derived fields (#75756)
Update Loki datasource to support X-ray as internal link in derived fields
2023-10-04 07:59:46 -05:00
Torkel Ödegaard
963049e2b7
Loki: Fixes chained template variable queries for scene apps (#75880)
* Loki: Fixes chained template variable queries for scene apps

* Remove bit
2023-10-04 12:47:25 +02:00
Nathan Marrs
35b48066ca
Stat: Disable wide layout (#75556)
update stat panel to disable the wide layout
2023-10-03 11:10:51 -07:00
Galen Kistler
5b63cdb5b0
Loki: Cache extracted labels (#75842)
* add simple cache to extracted label values in completion provider
2023-10-03 10:37:32 -05:00
Kristina
4b3d63dcdc
Correlations: Add an editor in Explore (#73315)
* Start adding correlations editor mode

* Add selector for merge conflict resolution

* Enable saving

* Build out new corelation helper component

* flesh out save with label/description, change color

* Have breadcrumb exit correlation editor mode

* Add extension property to show/hide, use it for correlations

* Bring in feature toggle

* Remove unnecessary param

* Cleanup

* Parse logs json

* Work on correlation edit mode bar

* Tinker with a top element for the editor mode

* Handle various explore state changes with correlations editor mode

* WIP - add unsaved changes modal

* Have correlation bar always rendered, sometimes hidden

* Add various prompt modals

* Clear correlations data on mode bar unmount, only use not left pane changes to count as dirty

* Move special logic to explore

* Remove all shouldShow logic from plugin extensions

* remove grafana data changes

* WIP - clean up correlations state

* Interpolate data before sending to onclick

* Override outline button coloring to account for dark background

* More cleanup, more color tweaking

* Prettier formatting, change state to refer to editor

* Fix tests

* More state change tweaks

* ensure correlation save ability, change correlation editor state vars

* fix import

* Remove independent selector for editorMode, work close pane into editor exit flow

* Add change datasource post action

* Clean up based on PR feedback, handle closing left panel with helper better

* Remove breadcrumb additions, add section and better ID to cmd palette action

* Interpolate query results if it is ran with a helper with vars

* Pass the datasource query along with the correlate link to ensure the datasource unique ID requirement passes

* Use different onmount function to capture state of panes at time of close instead of time of mount

* Fix node graph’s datalink not working

* Actually commit the fix to saving

* Fix saving correlations with mixed datasource to use the first query correlation UID

* Add tracking

* Use query datasources in mixed scenario, move exit tracking to click handler

* Add correlations to a place where both can be used in the correlations editor

* Be more selective on when we await the datasource get

* Fix CSS to use objects

* Update betterer

* Add test around new decorator functionality

* Add tests for decorate with correlations

* Some reorganization and a few tweaks based on feedback

* Move dirty state change to state function and out of component

* Change the verbiage around a little

* Various suggestions from Gio

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* More small Gio-related tweaks

* Tie helper data to datasource - clear it out when the datasource changes

* Missed another Gio tweak

* Fix linter error

* Only clear helper data on left pane changes

* Add height offset for correlation editor bar so it doesn’t scroll off page

---------

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-10-03 09:28:29 -05:00
Fabrizio
e8a708c16e
Tempo: Highlight errors in TraceQL query (#74697)
* Highlight errors

* Chores

* Refactor

* Address PR comments

* Refactoring

* Fix

* Handle another case

* Handle more use cases
2023-10-03 15:07:42 +01:00
Gábor Farkas
523d1b46d4
sql: numeric inputs: use it's own simple implementation (#74904)
* sql: numeric inputs: use it's own simple implementation

* simpler approach

* Update connection limit styles (#75226)

* lint fixes

* replace ConfigSection with ConfigSubSection

---------

Co-authored-by: Gareth Dawson <email@garethdawson.xyz>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>
2023-10-03 13:54:51 +02:00
Nathan Marrs
a7cedee7eb
Chore: lint files in azuremonitor datasource plugin (#75853) 2023-10-02 17:04:27 -07:00
jcolladokuri
1f266a051d
Azure Monitor: change variable definitions in OOB dashboards to avoid dependency on sub level permission (#75765)
change variable definitions to avoid dependency on sub level permission
2023-10-02 12:22:18 +01:00
Gareth Dawson
8331523679
Postgres: Make securejson password optional (#75801)
make securejson password optional
2023-10-02 11:36:51 +01:00
ismail simsek
11a9faabb1
InfluxDB SQL: Remove default limitation in the query (#75749)
* Remove limitation in the query

* Revert "Remove limitation in the query"

This reverts commit 8a347bc487.

* simpler approach
2023-10-02 11:22:53 +02:00
Andre Pereira
1ce603b9e9
Tempo: TraceQL results as a spans list (#75660)
* Format tempo search results as spans

* Thank you test
2023-09-29 20:34:39 +03:00
Ryan McKinley
1aaaa133fb
Schema: link table panel to the schema definitions (#75671) 2023-09-29 08:21:20 -07:00
Ryan McKinley
010b2461b9
Plugins: Move alias support to plugin json (but still hardcoded) (#75129) 2023-09-29 08:20:37 -07:00
Gábor Farkas
8dafc28988
sql: remove grafana-core import (#75558)
* sql: remove initialCustomVariableModelState

* added fix for mysql too

* linter fixes
2023-09-29 13:43:28 +02:00
Andreas Christou
5796836662
Azure: Add support for Workload Identity authentication (#75681)
* Update Azure Monitor

* Update Prometheus

* Update README

* Update docs/sources/datasources/azure-monitor/_index.md

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

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* README updates

* Fix prettier

* memoize options

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>
2023-09-29 12:35:11 +03:00
ismail simsek
9d44fefe82
Chore: InfluxDB unit test overhaul (#75436)
* Rename the mock function

* Move tests

* Refactor existing tests

* add influxql_metadata_query tests

* move to root

* remove unnecessary file

* adhoc test

* Remove unused parameter

* tests for future

* fix mocks

* betterer

* changes after review
2023-09-29 11:28:52 +02:00
Galen Kistler
8336b8d4c1
Prometheus: Query builder - show warning when converting ambiguous order of operations (#75256)
* throw error when converting into visual query when parser detects that an aggregation expression node contains a function that contains a binary expression to detect queries that are ambiguously parsed
2023-09-28 10:46:56 -05:00
Torkel Ödegaard
2fe4ecde19
DataSourceAPI: Add adhoc filters to DataQueryRequest and make it not depend on global templateSrv (#75552)
* DataSourceAPI: Add adhoc filters to DataQueryRequest and some methods to make it not depend on global templateSrv

* Minor tweaks/fixes

* Renamed to filters

* Fix test

* Log deprecation warning

* I give up
2023-09-28 16:28:58 +02:00
Fabrizio
5fae64ccbe
Properly manage trigger chars with open editor box (#75461) 2023-09-28 15:48:18 +02:00
Fabrizio
b1bc379a5c
Tempo: Use timezone of selected range for timestamps (#75438)
* Use timezone of selected range for timestamps

* Fix tests
2023-09-28 14:05:47 +01:00
Sergey Kostrukov
3ee40d3a5a
Azure: Settings for Azure AD Workload Identity (#75283)
* Settings for Azure AD Workload Identity

* Update dependency on Grafana Azure SDK

* Documentation

* Fix JS code

* Cleanup Prometheus backend code

* Making prettier happy
2023-09-28 12:05:16 +01:00
Leon Sorokin
6fc4e93f73
Dashboard: Reduce scope of contain: strict to TextPanel (#75499) 2023-09-27 13:14:35 -05:00
Matias Chomicki
a3d0dfcbcc
Loki: Improve getLogQueryFromMetricsQuery (#75492)
* Query utils: fix bug in getLogQueryFromMetricsQuery function

* Query utils: implement getLogQueryFromMetricsQueryAtPosition

* Loki autocomplete situation: use getLogQueryFromMetricsQueryAtPosition

* Fix typo

* getLogQueryFromMetricsQueryAtPosition: use find instead of filter
2023-09-27 11:39:50 +03:00
Joey
d57aef2eda
Tempo: Normalize static filter queries (#72794)
* Only show static filter if tag is defined

* Update previosuly left out test

* Add test

* Add warning if tag is missing
2023-09-27 09:03:37 +01:00
Leon Sorokin
32ed3e8009
TimeSeries: Implement ad hoc y-zoom via Shift-drag (#75408) 2023-09-26 18:12:45 -05:00
Dominik Prokop
918f11d81e
Revert "Dashboard: Reduce scope of contain: strict to TextPanel (#75466)
Revert "Dashboard: Reduce scope of `contain: strict` to TextPanel (#75329)"

This reverts commit ade0de5ae9.
2023-09-26 08:51:26 -07:00
Matias Chomicki
edbe45efc2
Elasticsearch: HTTP settings migration (#72840)
* Elasticsearch: migrate data source http settings

* Elasticsearch: migrate data source http settings

* Remove test code

* Update unit test

* Connection settings: add url placeholder

* Elasticsearch config editor: improve on-change handling of custom auth

* Config editor: add missing oauthPassThru option
2023-09-26 17:17:17 +02:00
Leon Sorokin
ade0de5ae9
Dashboard: Reduce scope of contain: strict to TextPanel (#75329) 2023-09-25 23:47:38 +03:00
Galen Kistler
a996f3b4a7
Loki Query Builder: Throw warning in query builder when order of operations is ambiguous (#75198)
* flag vector aggregations containing metric expressions (i.e.`(...)`) containing binary operation expressions with ambiguous error in the UI when switching between code and visual query builders.
2023-09-25 21:28:51 +03:00
Sarah Zinger
ef441f02d0
Cloudwatch: Fix Unexpected error (#74420)
Fix unexpected error when creating a new cloudwatch datasource.

Involves a fair amount of refactoring, so if this causes unexpected issues related to region fetching we can turn this off with the cloudwatchNewRegionsHandler feature toggle, although we do not predict it will so we are enabling it to default to true and hope to remove it shortly.
2023-09-25 14:19:12 -04:00