Commit Graph

8169 Commits

Author SHA1 Message Date
Tania
dcb3b4d97a
Codegen: Fix composable kinds docs generation (#68087)
* Fix plugins docs and regenerate

* fixup! Fix plugins docs and regenerate
2023-05-10 11:27:13 +02:00
Sladyn
26d33d8fd4
CloudWatch: Update metric stat editor to match aws statistics (#66532) 2023-05-10 10:20:41 +02:00
Ivana Huckova
d88da205f6
Elasticsearch: Migrate annotation calls to be run trough resources (#68075)
* Update

* Remove comment

* Add annotation to test dashboard

* Update devenv dashboard to correctly use textField
2023-05-10 09:30:57 +02:00
Gábor Farkas
903cf3e30d
elastic: refactor: simplify query-type handling (#67921)
* elastic: refactor: simplify query-type handling

* improved comment

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

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-05-10 08:50:59 +02:00
Leon Sorokin
1400a0a3f7
Heatmap: Fix color rendering for value ranges < 1 (#68156) 2023-05-09 23:16:35 -05:00
Adela Almasan
13603c7d71
Annotations: Fix rendering (#68038) 2023-05-09 23:12:02 +03:00
Ashley Harrison
8e752439c6
Graph: Fix legend overlapping graph area (#67912)
use render callback instead of requestIdleTimeout
2023-05-09 15:26:17 +01:00
Gilles De Mey
ee05e3675a
Alerting: Fixes Alert list panel "ungrouped" regression (#68018) 2023-05-09 15:18:38 +02:00
Gábor Farkas
8779526f15
elasticsearch: improved deprecation warning (#67909)
* elasticsearch: improved deprecation warning

* adjusted warning-level
2023-05-09 04:42:37 -04:00
Galen Kistler
a1bc1bd368
Prometheus: bug in creating autocomplete queries with labels (#68003)
Fix bug formatting multiple prometheus labels when doing metric query
2023-05-08 11:33:30 -05:00
Victor Marin
5416ec4768
Datagrid: Refactor header column delete/clear (#67842)
* refactor header column delete/clear

* fix tests, add clear option on header dropdown

* fix e2e tests
2023-05-08 19:02:20 +03:00
Torkel Ödegaard
32fafffed7
PanelQueryRunner: Return previous processed (transform+field config) series for loading state (#67768)
* Return same series for loading state

* Fix shared query issue

* include structureRev

* heatmap should depend on the series, not the wrapper

* fix more panels

* keep config for comparison

* fieldConfig.fieldConfig!

* cleanup

* cmon

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-05-07 15:21:40 +02:00
ismail simsek
69a38def63
Prometheus: Fix Query Inspector expression range value (#67919)
* Use metadata from respective query

* Unit test to cover having proper metadata for each query we run
2023-05-06 22:48:25 +02:00
Ivana Huckova
3145660f5a
Elasticsearch: Run getTerms trough resource call if enableElasticsearchBackendQuerying enabled (#67848)
* Elasticsearch: Run getTerms torugh backend if toggle enabled

* Add template variables to devenv dashboard for easier testing

* Add TODO

* Run feature toggle gen to fix build
2023-05-06 10:00:43 +02:00
Adam Simpson
b2e1b3ad91
Google Cloud Monitor: Fix mem usage for dropdown (#67683)
* Google Cloud Monitor: Fix mem usage for dropdown

Previously the Metric name dropdown would attempt to load _all_ the
available metric names into the Select which would eventually crash the
browser if the dataset was large enough.

We can fix this by using AsyncSelect and making another query once a
Service is selected _and_ the user types a few characters.

* fix: update tests for AsyncSelect

* fix lint

* fix: add subset of metrics on initial load
2023-05-05 20:48:41 +00:00
Ryan McKinley
854d497f94
Schema: Fix dimension schemas (#67935) 2023-05-05 12:16:31 -07:00
Andreas Christou
765ae6cd90
AzureMonitor: Clear queries if header value changes (#67916)
Clear queries if header value changes
2023-05-05 16:46:58 +01:00
Gábor Farkas
af9176b3a5
Elasticsearch: Improve query type selection (#63402)
* elastic: display query types explicitly

* fixed test

* fixed test

* updated test names

* fix react-key-issue
2023-05-05 15:00:39 +02:00
Victor Marin
eb2eb65de8
TablePanel: Do not allow auto-reset (#67477)
disallow react table to autoreset
2023-05-05 13:57:57 +03:00
Ivana Huckova
f5ac099907
Elasticsearch: Run requestAllIndices trough resource call if enableElasticsearchBackendQuerying enabled (#67825)
* Elasticsearch: Run requestAllIndices trough resource call if enabled

* Unlock resource call path

* Fix lint
2023-05-05 11:35:30 +02:00
ismail simsek
764f87b485
InfluxDB: Fix adding FROM statement when the measurement is an empty string (#67827)
* If the measurement empty don't add FROM statement

* Add comment line
2023-05-04 15:21:08 +02:00
Sarah Zinger
43c7a5b603
Cloudwatch: Fix description of plugin (#67744)
Fix description of Cloudwatch
2023-05-03 12:33:15 -04:00
Ivana Huckova
4d7c0904ef
Elasticsearch: Run version check thorugh backend if enableElasticsearchBackendQuerying enabled (#67679)
* Elasticsearch: Run getDBversion trough resource calls

* Update

* Update

* Fix lint

* Close response body

* Fix lint

* Refactor
2023-05-03 18:09:18 +02:00
Victor Marin
cd8b6be41d
Maintain column widths when deleting columns (#67707) 2023-05-03 17:48:30 +03:00
Victor Marin
3a6f162cc6
Datagrid: Remove multi-paste (#67387)
remove multi-paste functionality and unneccessary async from func
2023-05-03 16:29:48 +03:00
ismail simsek
373e4cab9a
InfluxDB: Fix querying retention policies on flux mode (#67722)
Query retention policies only on InfluxQL mode
2023-05-03 15:01:26 +02:00
Zoltán Bedi
6570ec7afe
Gauge: Set min and max for percent unit (#67517)
* Gauge: Set min and max for percent unit

* Remove exclamation mark

* Add parentheses around ternary
2023-05-03 13:37:45 +02:00
Shirley
2316178565
CloudWatch: Remove dynamic labels feature toggle (#67371) 2023-05-02 10:48:17 +02:00
Ivana Huckova
3bfb50f989
Elastic: Create legacy runner for proxy queries (#67397)
* Elastic: Rename request to legacy request and call directly

* Apply content header directly in request

* Move legacy running queries to legacyqueryrunner
2023-05-02 09:52:02 +02:00
Ryan McKinley
86302bc1ec
DataFrame: Deprecate MutableDataFrame (#67569) 2023-05-01 19:41:40 -07:00
Brendan O'Handley
d31d1576fb
Prometheus: Metric encyclopedia improvements (#67084)
* move to me directory and sort by relevance

* refactor letter search, uFuzzy and styles out of ency

* begin state refactor

* refactor getMetaData useEffect call with useReducer

* refactor pagination with useReducer

* refactor fuzzy state for useReducer

* refactor all filters for useReducer

* remove haystacks arrays in favor of haystack dictionaries w object keys

* refactor out functions into state helpers

* switch label filter text color to work with light theme

* make each row clickable to select metric

* add pagination component

* fix max results

* make a better table with keystrokes, navigate to metric with up&down, select on enter, hide settings, make a nice button

* save space, give more real esate to the table

* add highlighting for fuzzy search matches

* add custom button in metric select option to open metric encyclopedia

* open the modal with enter keystroke

* remove unnecessary actions and variables from m.e.

* fix tests, clean code

* remove setting of selected idx on results row when hovering

* tests

* rename to metrics modal and have select option same as header

* reduce width for wider screens

* pass in initial metrics list and remove call to labels and series in metrics modal

* use createSlice from reduc toolkit to deduce actions

* save the metrics modal additional settings

* galen alphabet refactor suggestion

* remove extra row in results table

* fix storing settings, wrap in feature toggle

* remove metadata check & load because metric select already handles this

* Update public/app/plugins/datasource/prometheus/querybuilder/components/metrics-modal/LetterSearch.tsx

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

* fix styles, show cursor as pointer for select option and clickable row

* taller modal for larger screens

* turn off metadata settings if usebackend is selected

* additional settings button space

* add pipe to ufuzzy metadata search

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-05-01 17:29:35 -04:00
Ryan McKinley
55df8afe8f
Timeseries: don't show conversion error for empty response (#67590) 2023-05-01 09:42:22 -07:00
Shirley
8516e63937
CloudWatch: Deprecate dynamic labels feature toggle, remove support for Alias in frontend (#67222) 2023-05-01 11:10:36 +03:00
Ryan McKinley
e493bec3a8
Geomap: Improve migration logic (#65500) 2023-04-28 12:20:10 -07:00
Oscar Kilhed
149adb0992
FileImport: add interaction reporting for dropping files (#67512)
add interaction reporting for dragndrop
2023-04-28 18:41:00 +02:00
Ivana Huckova
d8da6c75e5
Loki: Distinguish hidden and not hidden queries in tracking (#67507)
* Loki: Distinguish hidden and not hidden queries in tracking

* Rename
2023-04-28 17:22:30 +02:00
Sonia Aguilar
3854be1fcb
Alerting: Implement template preview for Grafana AlertManager (#65530)
* Add Preview template and payload editor to templates form

* Add TemplatePreview test and update css

* Preview errors for each template that is wrong

* Enable preview templating only for Grafana Alert Manager

* Use harcoded default payload instead of requesting it to the backend

* Update error response in the api definition

* Add spinner when loading result for preview

* Update api request followind DD changes

* Use pre instead of TextArea to render the preview

* Fix tests

* Add alert list editor

* Add start and end time for alert generator

* Add preview for data list added in the modal

* Update copies and move submit button in alert generator to the bottom

* Copy updates

* Refactor

* Use tab instead of button to preview

* Move payload editor next to the content

* Copy update

* Refactor

* Adress PR review comments

* Fix wrong json format throwing an exception when adding more data

* Use monaco editor for payload

* Only show text 'Preview for...'  when we have more than one define

* Fix some errors

* Update CollapseSection style

* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview

* Set payload as invalid if it's not an array

* Fix test

* Update text in AlertTemplateDataTable

* Add separators to distinguish lines that belong to the preview

* Fix text

* Use subDays instead of addDays for substracting days
2023-04-28 17:05:45 +02:00
Kuba Siemiatkowski
f8faacd54a
Datasource: Overhaul plugin error handling and action buttons (#67014)
* - initial work on data source config page

* - add links to test status box
- add tracking function

* - add test for the DataSourceConfigAlert component

* - fix flicker of the alert box

* - fix the build

* - small improvements

* - fix failing build

* - fix failing unit tests

* - prettier and betterer fixes

* - fix failing e2e tests

* - fix build again

* - rewrite solution according to the PR comments

* - cleanup

* - fix failing e2e

* - use absolute path in link

* Minor fixes

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-28 15:57:17 +02:00
Brendan O'Handley
7a3f7e26ce
Influxdb: Handle legacy Influxdb influxql annotations with target in migration (#63225)
* handle legacy influxdb annotations with target in migration

* add types

* don't check tags that are empty strings and give annotation a type
2023-04-28 08:39:11 -04:00
Sonia Aguilar
b5fbce50b3
Alerting:Fix alert panel not rendering correct number for cloud rules instances (#67487)
Fix alert panel not rendering correct number for cloud rules instances
2023-04-28 12:50:29 +02:00
Torkel Ödegaard
ea536411f1
DataSourceSettings: Fix recent changes to HttpDataSourceSettings (#67436) 2023-04-28 07:17:18 +02:00
Ryan McKinley
f5d97c677b
TimeSeries: Explicitly add transformer when timeseries-long exists (#64092) 2023-04-28 06:10:02 +03:00
Nathan Marrs
dac709b347
Canvas: Promote to GA (#67426) 2023-04-27 12:48:40 -07:00
Ryan McKinley
8352e716dd
ArrayDataFrame: Convert to a simple utility function rather than dynamically loaded values (#67427) 2023-04-27 12:38:19 -07:00
Andreas Christou
63383ef545
AzureMonitor: Application Insights Traces (#64859)
* Build out barebones Traces editor

- Add Traces query type and operation ID prop to query type
- Add necessary header types
- Update resource picker to appropriately work with traces query type
- Build out TracesQueryEditor component
- Include logic to retrieve operationId's for AI Workspaces
- Add backend route mapping
- Update macro to use timestamp as default time field for traces

* AzureMonitor: Traces - Response parsing (#65442)

* Update FormatAsField component

- Add trace ResultFormat type
- Generalise FormatAsField component
- Add component to TracesQueryEditor
- Remove duplicate code in setQueryValue

* Add custom filter function to improve performance

* Add basic conversion for logs to trace

- Add serviceTags converter
- Pass through required parameters (queryType and resultFormat)
- Appropriately set visualisation

* Update parsing to also fill trace tags

- Add constant values for each table schema (include legacy mapping for now if needed)
- Add constant for list of table tags
- Set the foundation for dynamic query building
- Update query to build tags value
- Appropriately set operationName
- Update tagsConverter to filter empty values

* Fix lint and test issues

* AzureMonitor: Traces - Data links (#65566)

* Add portal link for traces

- Pull out necessary values (itemId and itemType)
- Appropriately construct
- Fix ordering

* Set default format as value

- Also set default visualisation

* Fix event schema

* Set default formatAsField value

* Include logs link on traces results

- Adapt config links to allow custom title to be set

* Correctly set operationId for query

* Update backend types

- Include OperationID in query
- Pass forward datasource name and UID

* Ensure setTime doesn't consistently get called if operationID is defined

* Add explore link

- Update util functions to allow setting custom datalinks

* Fix tests

* AzureMonitor: Traces - Query and Editor updates (#66076)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* AzureMonitor: Traces - Add correlation API support (#65855)

Add correlation API support

- Add necessary types
- Add correlation API request when conditions are met
- Update query

* Fix property from merge

* AzureMonitor: Traces - Filtering (#66303)

* Add initial query

- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building

* Add entirely separate traces query property

- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query

* Update FormatAsField to be entirely generic

* Update query building to be done in backend

- Add required mappings in backend
- Update frontend querying

* Fix query and explore data link

* Add trace type selection

* Better method for setting explore link

* Fix operationId updating

* Run go mod tidy

* Unnecessary changes

* Fix tests

* Start building out Filters component

- Configure component to query for Filter property values when a filter property is set
- Add setFilters function
- Add typing to tablesSchema
- Use component in TracesQueryEditor

* Update Filters

- Asynchronously pull property options
- Setup list of Filter components

* Update filters component

- Remove unused imports
- Have local filters state and query filters
- Correctly set filters values
- Don't update query every time a filter property changes (not performant)

* Update properties query

- Use current timeRange
- Get count to provide informative labels

* Reset map when time changes

* Add operation selection

* Reset filters when property changes

* Appropriate label name for empty values

* Add filtering to query

* Update filter components

- Fix rendering issue
- Correctly compare and update timeRange
- Split out files for simplicity

* Add checkbox option to multiselect

- Add custom option component
- Correctly call onChange
- Add variableOptionGroup for template variable selection

* Fix adding template vars

* Improve labels and refresh labels on query prop changes

* AzureMonitor: Traces - Testing (#66474)

* Select ds for template variable interpolation

* Update az logs ds tests

- Add templateVariables test
- Add filter test
- Update mock
- Remove anys

* Update QueryEditor test

- Update mocks with timeSrv for log analytics datasource
- Fix query mock
- Use appropriate and consistent selectors

* Add TracesQueryEditor test

- Update resourcePickerRows mock to include app insights resources
- Remove comments and extra new line

* Add FormatAsField test

- Remove unneeded condition

* Update resourcePicker utils test

* Don't hide selected options in filters

* Fix multi-selection on filters

* Add TraceTypeField test

- Add test file
- Update selectors (remove copy/paste mistake)
- Update placeholder text for select and add label

* Add basic filters test

* Begin filters test

* Update filters test

* Add final tests and simplify/generalise addFilter helper

* Minor update to datasource test

* Update macros test

* Update selectors in tests

* Add response-table-frame tests

* Add datasource tests

- Use sorting where JSON models are inconsistent
- Update filters clause
- Dedupe tags
- Correct operationId conditions

* Don't set a default value for blurInputOnSelect

* Simplify datasource test

* Update to use CheckGoldenJSON utils

- Update with generated frame files
- Remove redundant expected frame code
- Update all usages

* Fix lint

* AzureMonitor: Traces feedback (#67292)

* Filter traces if the visualisation is set to trace

- Update build query logic
- Added additional test cases
- Return an error if the traces type is set by itself with the trace visualisation
- Add descriptions to event types
- Update tests

* Fix bug for error displaying traces

* Update mappings and add error field

- Update tests
- Remove unnecessary comments

* Switch location of Operation ID field

* Re-order fields

* Update link title

* Update label for event type selection

* Update correct link title

* Update logs datalink to link to Azure Logs in explore

* Fix lint
2023-04-27 20:24:11 +01:00
Gilles De Mey
b94fceddad
Alerting: Make Loki & Prometheus instant vector by default (#66797)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-04-27 17:38:22 +03:00
Brendan O'Handley
0a9240aeba
Prometheus: Configuration page overhaul (#66198)
* organize layout, make design uniform, add doc link

* fix e2e test

* move overhauled config parts into prometheus code

* update tooltips with doc links

* clean component styles for section padding, top and bottom 32px

* make additional settings subsection headers h6

* use secondary gray for section descriptions

* fix merge issues

* change inlineswitch to switch only in prom settings because the other components are shared

* remove legacy formfield and input, replace with inlinefield and input from grafana-ui

* find more formfield and UI design fixes like changing inlineformlabel to inlinefield

* remove unused inline form label

* replace legacy duration validations with <FieldValidationMessage>

* fix styles secondary gray from theme

* change language, headings and datasource -> data source

* update alert setting styles with new component

* update prom url heading and tooltip

* update default editor tooltip and set builder as default editor

* update interval tooltip

* update prom type tooltip

* update custom query params tooltip

* update exemplar internal link tooltip

* fix inline form styling inconsistency

* allow for using the DataSourceHTTPSettings component without the connection string

* remove overhaul component, re-use dshtttps comp, and use connection input in config editor

* make tooltips interactive to click links

* consistent label width across the elements we can control for now, fix exemplar switch

* make connection url a component

* refactor onBlur validation

* remove unused component

* add tests for config validations

* add more meaningful health check

* fix e2e test

* fix e2e test

* fix e2e test

* add error handling for more url errors

* remove unnecessary conversion

* health check tests

* Clean up the health check

* health check unit tests

* health check unit tests improved

* make pretty for drone

* lint check go

* lint check go

* add required attr to connection component

* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix read only issue for provisioned datasources

* validate multiple durations for incremental query setting

* use sentence case for headers

* use className consistently for styles

* add tests for url regex

* remove console logs

* only use query as healthcheck as the healthy api is not supported by Mimir

* fix exemplar e2e test

* remove overhaul prop from custom headers setting component

* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip

* add spaces back

* spaces

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-27 09:43:54 -04:00
Galen Kistler
69f1116f59
Prometheus: Fix flakey query cache test (#67388)
hardcode date to prevent test flake
2023-04-27 07:51:33 -05:00
Victor Marin
d01ea9902c
fix add column btn styling (#67369) 2023-04-27 15:07:27 +03:00
dsotirakis
6e950ca62a Geomap: Sanitize the attribution string (#745)
* SAML: Update grafana/saml library (#691)

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* SVG: Add dompurify preprocessor step (#698)

* add sanitized SVG component

* add sanitize

* Fix frontend build

* Remove unnecessary yarn.lock changes

* Fix formatting

* Re-add yarn.lock message as I guess it is needed

---------

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-04-27 14:40:44 +03:00