Commit Graph

43432 Commits

Author SHA1 Message Date
Joey
06a4b6da62
Tempo: Use pipe in TraceQL by default for multi-value variables (#70051)
* Use pipe in traceQL by default for multi value variables

* Use constant
2023-06-19 13:28:56 +01:00
Sonia Aguilar
9a252c763a
Alerting: Add notification policies preview in alert creation (#68839)
* Add notification policies preview in alert rule form
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Refactor using new useGetPotentialInstances hook and apply some style changes

* Add notification policy detail modal

* Use backtesting api for simulating  potential alert instances

* Fix logic to travserse all the children from the root route

* Split notification preview by alert manager

* Add instance count to matching policy header and fix some styles

* Move some logic to a new hook useGetAlertManagersSourceNames to make the code more clean

* Fix some tests

* Add initial test for NotificationPreview

* Use button to preview potential instances

* Add link to contact point details

* Add route matching result details

* Show AlertManager image in the routing preview list

* Add tests setup, add single AM preview test

* Handle no matchers and no labels use case

* Update some style in collapse component and fix policy path in modal

* Update modal styles

* Update styles

* Update collapse header styling

* Normalize tree nodes should happen before findMatchingRoutes call

* Fix findMatchingRoutes and findMatchingAlertGroups methods after reabasing

* Move instances matching to the web worker code

* Fix config fetching for vanilla prometheus AMs

* Add tests

* Add tests mocks

* Fix tests after adding web worker

* Display matching labels for each matching alert instance

* Add minor css improvements

* Revert changes added in Collapse component as we don't use it anymore

* Move the route details modal to a separate file

* Move NotificationRoute and preview hook into separate files

* Fix Alertmanager preview tests

* Fix tests

* Move matcher code to a separate file, improve matcher mock

* Add permissions control for contact point edit view link

* Fix from and to for the temporal use of backtesting api

* Fix tests, add lazy loading of the preview component

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>

* Fix preview test

* Add onclick on the header div so it collapse and expands when clicking on it, and update styles to be consistent with the rest of tables

* Adapt the code to the new rule testing endpoint definition

* Fix tests

* small changes after reviewing the final code

* compute entire inherited tree before computing the routes map

* Throw error in case of not having receiver in routesByIdMap and add test for the use case of inheriting receiver from parent to check UI throws no errors

* Add list of labels in the policy route path that produces the policy matchers to match potential instances

* Use color determined by the key, in label tags when hovering matchers in the policy tree

* Remove labels in modal and handle empty string as receiver to inherit from parent as we do with undefined

* Revert "Add list of labels in the policy route path that produces the policy matchers to match potential instances"

This reverts commit ee73ae9cf9.

* fix inheritance for computeInheritedTree

* Fix message shown when preview has not been executed yet

* First round for adressing PR review comments

* Adress the rest of PR review commments

* Update texts and rename id prop in NotificaitonStep to alertUid

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-06-19 13:32:17 +02:00
Sven Grossmann
1a985c488c
Logs: Fix scrolling with exploreScrollableLogsContainer feature flag (#70164)
correct scrolling with `exploreScrollableLogsContainer`
2023-06-19 13:15:22 +02:00
Gábor Farkas
271cdb4baa
loki: rename experimental feature flag (#70306) 2023-06-19 10:03:51 +00:00
Giordano Ricci
6a3c6eb174
Explore: Ensure datasource is present in the URL for every query (#70307) 2023-06-19 10:46:59 +01:00
SatVeer Singh
1bfa3a0f1e
Chore: Replace go-multierror with errors package (#66432)
* code refactor and type assertions added to tests

* no-lint rule added for specific line
2023-06-19 12:29:45 +03:00
Matias Chomicki
a75752b085
Elasticsearch: remove usages of any (#69575)
* Elasticsearch: remove usages of any

* Elasticsearch: check for filter type when accessing field aggs

* Elasticsearch: use type guards instead of checking types

* Use unknown for isPrimitive function

* Add deprecation notice

* Remove unused type

* Fix bug in "isPrimitive" function

* Remove unused import

* Revert "Fix bug in "isPrimitive" function"

This reverts commit 27f9874cce.
2023-06-19 11:01:08 +02:00
Nicolas DUPEUX
cb7e18938b
[opentsdb] Allow custom tag key in OpenTSDB Query editor (#62762) 2023-06-17 10:01:14 -04:00
ismail simsek
e3ea5422ea
InfluxDB: Return default retention policy from backend as first element (#69818)
* Reformatting and restructuring

* Update unit test

* Always send the default retention policy as first element

* Fix typo

* Update test

* Update test once more
2023-06-17 14:20:54 +02:00
Ivan Ortega Alba
565ed09f6b
Explore: Use new DS picker (#70054) 2023-06-17 10:12:29 +02:00
Nathan Marrs
d7a8892f3a
Canvas: Migrate to schema (#70205) 2023-06-17 05:56:23 +03:00
Ryan McKinley
da66aefa87
EnityAPI: update summary builder to support library panels (#70280) 2023-06-16 14:44:16 -07:00
Kim Nylander
ece3629804
[DOC] Add traces panel procedures (#70204)
* Add traces panel procedures

* Apply suggestions from code review

Co-authored-by: Heds Simons <hedss@users.noreply.github.com>

* Prettier and image fixes

* Apply suggestions from code review

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* Fix images

* Apply suggestions from code review

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Heds Simons <hedss@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-06-16 16:34:07 -04:00
Brendan O'Handley
3425012ee4
Prometheus: Variable query editor improvements (#69884)
* refactor metric select and label filters, add variables to label names dropdown

* use MetricsLabelsSection in variable editor

* use variable editor UI with MetricsLabelsSection

* filter label names by optional metric and allow metric to be cleared

* fix tests

* testing types for onChangeLabels

* testing types for onChangeLabels

* testing types for onChangeLabels

* Ismails review, remove comment and indent

* wrap label filters

* improved behavior for selects and inputs, add tests and document behavior
2023-06-16 15:03:34 -04:00
Virginia Cepeda
160ff360c4
Alerting: Make QueryEditor not collapsable (#70112)
* Add option to make QueryEditor not collapsable

* Make QueryEditor not collapsable in Alerting

* Change query editor border to weak

The medium border is really only for inputs, everything else should use weak border

* Add tests
2023-06-16 15:14:00 -03:00
Jean-Philippe Quéméner
934ba1aaa1
Alerting: Rewrite range to instant queries if possible (#69976) 2023-06-16 19:55:49 +02:00
Jack Baldry
a4a16b62c7
Update make-docs procedure (#70265)
## 4.1.0 (2023-06-16)

### Added

- Mounts of `layouts` and `config` directories for the `website` project.
  Ensures that local changes to mounts or shortcodes are reflected in the development server.

### Fixed

- Version inference for versioned docs pages.
  Pages in versioned projects now have the `versioned: true` front matter set to ensure that "version" in $.Page.Scratch is set on builds.

## 4.0.0 (2023-06-06)

### Removed

- `doc-validator/%` target.
  The behavior of the target was not as described.
  Instead, to limit `doc-validator` to only specific files, refer to https://grafana.com/docs/writers-toolkit/writing-guide/tooling-and-workflows/validate-technical-documentation/#run-on-specific-files.

## 3.0.0 (2023-05-18)

### Fixed

- Compatibility with the updated Make targets in the `website` repository.
  `docs` now runs this script itself, `server-docs` builds the site with the `docs` Hugo environment.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-06-16 18:45:44 +01:00
Yuri Tseretyan
842f33580e
SSE: Add functions that determine NodeType by UID and construct a data source struct from NodeType (#70106)
* add NodeTypeFromDatasourceUID and DataSourceModelFromNodeType()
* deprecate expr.DataSourceModel
* replace usages of IsDataSource to NodeTypeFromDatasourceUID 
* replace usages of DataSourceModel to DataSourceModelFromNodeType()
2023-06-16 13:05:06 -04:00
Jack Baldry
3d15d54a71
Use docs/reference for flexible linking for content reused in Grafana Cloud (#70253)
* Use docs/reference for flexible linking for content reused in Grafana Cloud

Documented in https://github.com/grafana/website/pull/13878

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use docs-base image that has docs/reference shortcode

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-06-16 17:24:21 +01:00
Leon Sorokin
66b0e6b77f
XYChart/Trend: Fix min/max and units/decimals x-field overrides (#70214) 2023-06-16 11:10:53 -05:00
Ivana Huckova
82c125d450
Loki: Implement step editor (#69648)
* Loki: Implement step editor

* Update to keep value

* Remove console.log

* Remove white space

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx

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

* Import trim

* Update using of step in split queries

* Add tests

* Add tests

* Remove step interpolation

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-06-16 19:08:29 +03:00
Michael Mandrus
66d2214c3b
Config: Add configuration option to define custom user-facing general error message for certain error types (#70023)
---------

Co-authored-by: Summer Wollin <summer.wollin@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2023-06-16 10:46:47 -05:00
Ivan Ortega Alba
6be0ca396f
DS Picker: first item is always active when filtering (#70071)
* Select always the first item by default when filtering

* Avoid re-render when updating the selected item state
2023-06-16 18:30:49 +03:00
Josh Hunt
323d3c94d3
Chore: Update features/panel codeowners (#70246) 2023-06-16 18:15:47 +03:00
Giordano Ricci
520cd55d54
Explore: Improve logs volume panel empty state (#70240) 2023-06-16 15:58:36 +01:00
Gilles De Mey
69b1153205
Alerting: Contact Points v2 feature flag (#70165) 2023-06-16 16:19:44 +02:00
George Robinson
35d455e931
Show the alertname for each alert in plain text email (#70183) 2023-06-16 10:06:43 -04:00
Ivan Ortega Alba
9b1f1df9e8
Mixed DS: Use new DS picker (#70052) 2023-06-16 15:12:52 +02:00
Simon Podlipsky
6f880b713a
Variables: allow {} type in VariableWithOptions.current (#64358) 2023-06-16 14:31:12 +02:00
Sven Grossmann
68637059c4
Logs: Add permalink to log lines (#69464)
* create explore panel state for logs

* add props to LogRows and unify

* pass properties from explore to logs

* add css

* implement button and scrolling

* export and use `getUrlStateFromPaneState`

* make `scrollIntoView` optional

* change state handling for permalinks

* change link icon

* removed unused state

* add tests for `LogRowMessage`

* remove unused prop

* fix name

* reorg component

* add `LogRow` tests

* add test for `Logs`

* Update public/app/features/logs/components/LogRow.test.tsx

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

* Update public/app/features/explore/Logs/Logs.test.tsx

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

* improve types in test

* fix props export in Logs.tsx

* fix props export in LogRowMessage.tsx

* fix props export in LogRow.tsx

* fixed import

* fix theme import

* remove hidden style

* add better test names

* change to `log line` rather logline

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

* fix tooltips

* remove unused css

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-06-16 14:07:51 +02:00
Galen Kistler
c1fe8e8927
Prometheus: Expr undefined at runtime (#70010)
* null/undefined expression default to empty string
2023-06-16 07:01:40 -05:00
Dimitris Sotirakis
7ec91990ff
package.json: Fix what's new URL in package.json (#70233)
Fix what's new url
2023-06-16 14:55:14 +03:00
Ida Štambuk
2d4db2fd64
Cloudwatch: Wrap filters and tag inputs in Variable Editor (#69862)
Add shrink to ec2 filters + resource tags
2023-06-16 13:44:22 +02:00
Gilles De Mey
7952907e48
Alerting: Allow executing "hidden" queries (#70064) 2023-06-16 13:14:46 +02:00
Matias Chomicki
6e2c811fd8
Elasticsearch: Update error message shown when testing the datasource (#70189)
* Elasticsearch: update error message shown when testing the datasource

* Elasticsearch: update successful test message

* Update e2e test
2023-06-16 12:56:34 +02:00
brendamuir
5fc6bf5c69
Docs: recreates setup for oss alerting (#70156)
* recreates setup for oss alerting

* fixes relrefs

* fix relrefs

* fix relref

* adds other setup topics

* adds other setup topics 2

* adds other setup topics 3

* adds cloud setup

* adds cloud setup from legacy

* fixes links

* removing link

* gilles feedback
2023-06-16 12:15:55 +02:00
Ross
5f4d1d4872
CloudWatch: Add missing EventBridge Pipe metrics (#69994) 2023-06-16 12:04:47 +02:00
Andres Martinez Gotor
7c1c196031
Plugins: Periodically update public signing key (#70080) 2023-06-16 11:20:30 +02:00
Kousik Mitra
62ee1fa05a
Plugins: Wrap original check health error (#69944)
Fixes #69765
2023-06-16 11:18:53 +02:00
Tania
0316350d16
Codegen: Generate any instead of interface{} (#70201)
* Chore: Update thema to latest

* Regenerate
2023-06-16 10:54:56 +02:00
Gábor Farkas
9d72ed0875
grafana-data: Add frame type for logs dataframes (#69990)
grafana-data: added logs-frame-type
2023-06-16 10:12:46 +02:00
George Robinson
a773b722b1
Alerting: Fix newlines in text/plain template (#70207)
Alerting: Fix newlines in text/plain template at last
2023-06-16 09:02:58 +01:00
Horst Gutmann
9ed09257fe
Changelog: Updated changelog for 9.3.14 (#70188) 2023-06-16 09:55:12 +03:00
Horst Gutmann
23b7f702c5
Changelog: Updated changelog for 9.5.2 (#70219) 2023-06-16 09:53:12 +03:00
Dimitris Sotirakis
98b6791101
Chore: Prettify some unit tests for pkg/build (#70186)
* Prettify

* Fix test
2023-06-16 09:32:06 +03:00
Horst Gutmann
21fd7c5c13
CI: Remove no-changelog flag from backports (#70216)
This finalizes https://github.com/grafana/grafana-github-actions/pull/148
2023-06-16 07:32:56 +02:00
Leon Sorokin
7d4f7e5ffc
XYChart: Fix variable interpolation in datalinks/toggletip (#70195) 2023-06-15 19:04:41 -06:00
Yuri Tseretyan
f1d47d18a8
Alerting: Sort RefIDs in error message returned by api.validateCondition (#70198)
sort RefIDs in error message
2023-06-15 18:37:30 -03:00
Yuri Tseretyan
b963defa44
Alerting: update rules POST API to validate query and condition only for rules that changed. (#68667)
* replace condition validation with just structural validation
* validate conditions of only new and updated rules
* add integration tests for rule update\delete API

Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-06-15 13:33:42 -04:00
Leon Sorokin
94881597d8
XYChart: Fix formatting of axis ticks (units, decimals) (#70190) 2023-06-15 11:32:20 -05:00