Commit Graph

40572 Commits

Author SHA1 Message Date
Eric Leijonmarck
a232e7ceca
Auth: Add skip_org_role_sync for Okta (#62106)
* WIP

* Update pkg/services/login/authinfo.go

* fix: merge

* change order to internal last

* adds: docs

* add: configuration for defaults and sample

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-30 10:54:14 +00:00
Sven Grossmann
d7026900bd
LokiContext: Add feature tracking (#62344)
* add feature tracking to LokiContextUi

* only depend on `row.uid`

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-01-30 11:30:39 +01:00
Kyle Cunningham
38d7168921
Time Series Panel: Fix legend text selection in Firefox (#60809)
Add user-select property to legend items.
2023-01-30 11:18:07 +01:00
Sofia Papagiannaki
a502a2d1f8
Nested folders: Enable folder migration (#61936) 2023-01-30 10:17:40 +00:00
Sven Grossmann
7eb01b1813
MultiSelect: Fix actionMeta not available in onChange callback (#62339)
add `ActionMeta` to `onChange` callback
2023-01-30 11:17:02 +01:00
Sonia Aguilar
d44f250aea
Alerting: Add export button for exporting all alert rules in alert list view (#62416)
* Add export button for exporting all alert rules in alert list view

* Add RBAC for export button

* Use provisioningPermissions.read in getRulesAccess method instead of directly using AccessControlAction.AlertingProvisioningRead
2023-01-30 11:13:08 +01:00
Ida Štambuk
a9d44aa795
Datasources: Add support for getDetDefaultQuery in variable editor (#62026)
+Cloudwatch implementation
2023-01-30 10:58:43 +01:00
Sven Grossmann
ae8c61c0b2
Logs: Fix stats not being updated when log results change (#62317)
update stats in logdetails
2023-01-30 10:54:20 +01:00
Josh Hunt
d51e7ec7ef
Preferences: Add theme preference to match system theme (#61986)
* user essentials mob! 🔱

lastFile:pkg/api/preferences.go

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:packages/grafana-data/src/types/config.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/utils.test.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/views/index-template.html

* user essentials mob! 🔱

* Restore currentUser.lightTheme for backwards compat

* fix types

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* cleanup

* cleanup

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-30 10:51:51 +01:00
Andres Martinez Gotor
be7b90bbd1
Azure Monitor: Add info about multiple resource selection (#62327) 2023-01-30 10:49:57 +01:00
Andres Martinez Gotor
bed1bb1a73
Azure Monitor: Allow to specify a region when listing resources (#62306)
* Azure Monitor: Allow to specify a region when listing resources

* Add region template variable to e2e tests
2023-01-30 10:49:20 +01:00
Torkel Ödegaard
dae9808602
AppPlugins: Remove unused rootNav parameter (#62440) 2023-01-30 10:30:01 +01:00
Jack Baldry
8379a5338c
CI: Lint starlark files with buildifier (#59157)
* Add verify-starlark build action that returns an error for starlark files with lint

Relies on `buildifier` tool.

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

* Add verify_starlark_step to PR pipeline

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

* Manually fetch buildifier in curl_image until a new build_image is created

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

* Format with buildifier

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

* Remove all unused variables retaining one unused function

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

* Use snake_case for variable

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

* Replace deprecated dictionary concatenation with .update() method

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

* Start adding docstrings for all modules and functions

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

* Prefer os.WriteFile as ioutil.WriteFile has been deprecated since go 1.16

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

* Attempt to document the behavior of the init_enterprise_step

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

* Document test_backend pipeline

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

* Document enterprise_downstream_step

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

* Document the pipeline utility function

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

* Document publish_images_step

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

* Document publish_images_steps

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

* Document enterprise2_pipelines function

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

* Add tags table for Starlark files.

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

* Document test_frontend

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

* Document windows function

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

* Add docstrings to verifystarlark functions

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

* Refactor error handling to be more clear and document complex behavior

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

* Split errors into execution errors and verification errors

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

* Document all other library functions

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

* Add local variables to TAGS

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

* Add blank line between all Args and Returns sections

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

* Fix new linting errors

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

* Lint new Starlark files

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

* Correct buildifier binary mv

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

* Document the need to set nofile ulimit to at least 2048

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

* Update build-container to include buildifier

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

* Ensure buildifier binary is executable

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

* Fix valid content test

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

* Simply return execution error

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

* Only check files rather than fixing them

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

* Use updated build-container with executable buildifier

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

* Test that context cancellation stops execution

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

* Simplify error handling

Return execution errors that short circuit WalkDir rather than
separately tracking that error.

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

* Remove fetching of buildifier binary now that it is in the build-container

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

* Use build image in verify-starlark step

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

* Use semver tag

The image is the same but uses a semver tag to make it clearer that
this is a forward upgrade from the old version.

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

* Use node 18 image with buildifier

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-30 09:27:11 +00:00
Serge Zaitsev
907e2a840e
Chore: Fix goimports grouping (#62429)
* fix goimports ordering

* fix goimports order
2023-01-30 09:57:50 +01:00
Serge Zaitsev
d6d4097567
Chore: Fix goimports grouping in alerting (#62424)
* fix goimports

* fix goimports order
2023-01-30 09:55:35 +01:00
Serge Zaitsev
0bf4093005
Chore: Fix goimports grouping (#62428)
* fix goimports order

* fix goimports order
2023-01-30 08:50:27 +00:00
Serge Zaitsev
f8ec35e643
Chore: Fix goimports grouping (#62427)
* fix goimports order

* fix goimports order
2023-01-30 09:38:51 +01:00
Serge Zaitsev
7dbd2cd139
Chore: Fix goimports grouping (#62426)
fix goimports ordering
2023-01-30 09:34:18 +01:00
Serge Zaitsev
f531074d89
Chore: Fix goimports grouping in pkg/infra (#62421)
* fix goimports

* fix goimports order
2023-01-30 08:32:25 +00:00
Serge Zaitsev
aebcecf538
Chore: Fix goimports grouping in other backend platform packages (#62422)
* fix goimports

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order
2023-01-30 08:26:42 +00:00
Sven Grossmann
da7065d3dc
LokiContext: Fix wrong queries being run when reopened (#62353)
* fix wrong query being run when reopened

* fix typo

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

* and test for `onClose`

* rename functions

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-01-30 09:26:27 +01:00
Jan Garaj
2ff715cb7a
CloudWatch: Add missing AWS/DX metric (#62405) 2023-01-30 09:26:14 +01:00
Serge Zaitsev
e2d49ea17f
Chore: Fix goimports grouping (#62423)
* fix goimports

* fix goimports order
2023-01-30 08:25:58 +00:00
Serge Zaitsev
bc2813ef06
Chore: Fix goimports grouping in pkg/services (#62420)
* fix goimports

* fix goimports order
2023-01-30 08:21:27 +00:00
Serge Zaitsev
324310abbc
Chore: Fix goimports grouping in pkg/api (#62419)
* fix goimports

* fix goimports order
2023-01-30 08:18:26 +00:00
Levente Balogh
9b2abe7613
Datasources: Extend properties for the datasource-test tracking event (#62292)
chore: extend properties for the test datasource tracking event
2023-01-30 08:29:13 +01:00
Ryan McKinley
0d2a786816
Schema: Add schema for library panels (#62169) 2023-01-30 04:14:12 +00:00
Gilles De Mey
13159d03ba
Alerting: Use optional chaining for accessing frames (#61814) 2023-01-28 18:39:23 +01:00
Sarah Zinger
82e8ad8a0f
Cloudwatch: Set CloudwatchCrossAccountQuery feature to stable (#62348)
* Cloudwatch: Set CloudwatchCrossAccountQuery feature to stable

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-27 16:46:08 -05:00
Yuri Tseretyan
0c4671e31f
Alerting: Update historian to ignore transitions from Normal Paused and Updated (#62267) 2023-01-27 16:26:22 -05:00
Josh Hunt
6c990b461e
SupportBundles: Feature flag + access control navtree item (#62337)
* SupportBundles: Feature flag + access control navtree item

* remove translation
2023-01-27 20:04:04 +00:00
Drew Slobodnjak
07dc994765
Canvas: Anchor highlight persistance (#62364)
* Canvas: Anchor highlight persistance

* Update public/app/plugins/panel/canvas/ConnectionAnchors.tsx

Co-authored-by: Nathan Marrs  <nathanielmarrs@gmail.com>

* Fix CONNECTION_ANCHOR_ALT dependencies

* Simplify anchor type assertion logic

* Ensure that anchor highlight is reset when anchors are hidden

* Add helpful comment on return bool of function

---------

Co-authored-by: Nathan Marrs  <nathanielmarrs@gmail.com>
2023-01-27 11:35:57 -08:00
Isabel
290f23a50b
docs: clarify note re export dashboard as PDF (#62398)
clarify note re export dashboard as PDF

Update note under Export dashboard as PDF to indicate that it's only available on Enterprise and Cloud, as well as which version of Enterprise it's available on.
2023-01-27 13:31:55 -06:00
gotjosh
3c616da83f
Alerting: Refactor metrics/ngalert.go into seperate files (#62362)
* Alerting: Refactor metrics/ngalert.go into seperate files
2023-01-27 18:49:49 +00:00
Kristin Laemmert
9256a520a4
chore: move user_auth models to (mostly) login service (#62269)
* chore: move user_auth models to (mostly) login service
2023-01-27 13:36:54 -05:00
Jack Baldry
4563111180
Move Grafana tutorials from grafana/tutorials repository (#62309)
* Add Grafana tutorials originally from tutorials repository

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

* Replace tutorials/step shortcode with ordinary headings

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

* Fix typos reported by codespell

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

* Fix doc-validator linting and run prettier

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

* Specify version in tutorials lookup as non-rendered pages do not have a relative permalink used to infer the version

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

* Use latest version

Ensures CI passes and only breaks one website build as the backport to
v9.3.x will solve the missing "latest" pages on publishing.

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-27 17:53:50 +00:00
Gareth Dawson
b2c8126e6e
Loki: Show query size approximation (#62109)
* feat: make api request to /loki/api/v1/index/stats

* fix: add /index/stats to callResource valid urls

* feat: make call to getQueryStats when the query changes

* feat: render user tooltip displaying the estimated value for processed data

* fix: add new props to component tests

* test: add tests for query size estimation

* fix: disable error message on request failure

* refactor: add suggestions from code review

* refactor: only pass required query string
2023-01-27 17:32:53 +00:00
Galen Kistler
5ad7cca9d4
Prometheus: Fix "-Instant" string showing up in prometheus instant query UI (#62265)
Add string constant and make sure to remove from name before outputting to frontend
2023-01-27 10:40:12 -06:00
Matthew Jacobson
c006df375a
Alerting: Create endpoints for exporting in provisioning file format (#58623)
This adds provisioning endpoints for downloading alert rules and alert rule groups in a 
format that is compatible with file provisioning. Each endpoint supports both json and 
yaml response types via Accept header as well as a query parameter 
download=true/false that will set Content-Disposition to recommend initiating a download 
or inline display.

This also makes some package changes to keep structs with potential to drift closer 
together. Eventually, other alerting file structs should also move into this new file 
package, but the rest require some refactoring that is out of scope for this PR.
2023-01-27 11:39:16 -05:00
Ivana Huckova
d5294eb8fa
Explore: Implement feature toggle for logs sample (#62291)
* Explore: Implement feature toggle for logs sample

* Run pkg/services/featuremgmt/toggles_gen_test.go

* Remove boolean

* Update copy
2023-01-27 17:30:25 +01:00
Ashley Harrison
1ef7cfda3f
Navigation: more command palette tweaks (#62286)
* update placeholder text, only create search keybindings if topNavCommandPalette is disabled

* make search input wider
2023-01-27 16:21:48 +00:00
Josh Hunt
305209f4be
CommandPalette: Render dashboard + nav actions as links (#62315)
* CommandPalette: Render links as links!

* Update public/app/features/commandPalette/KBarResults.tsx

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Apply suggestions from code review

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* fix ellipsis showing

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-27 16:10:05 +00:00
renovate[bot]
7f5ed9f59d
Update dependency rc-tooltip to v5.3.1 (#62341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-27 15:48:06 +00:00
Dominik Prokop
d4015602ca
Dashboard schema: Update default value for timezone (#62340) 2023-01-27 15:43:13 +00:00
Ieva
1865205d68
Benchmarks for searchv2 (#60730)
* bench-test

* cleanup

* more simplification

* fix tests

* correct wrong argument ordering & use constant

* fix issues with tests setup

* add benchmark results

* reuse Gabriel's concurrent setup code

* correct error logs for ac benchmarks
2023-01-27 15:42:08 +00:00
Ivana Huckova
d0e95f8c95
Loki: Add X-Query-Tags header for logs sample and data sample (#62333) 2023-01-27 16:41:40 +01:00
Levente Balogh
9453bec819
FileDropzone: Revert introducing a new prop (#62324) 2023-01-27 16:40:54 +01:00
Andres Martinez Gotor
317ef1de86
Azure Monitor: Add variable function to list regions (#62297) 2023-01-27 16:29:05 +01:00
Gábor Farkas
88119ad6c3
Elasticsearch: Support nested aggregation (#62301)
* Add nested query support

* Add nested support for alerts

* update nested aggregation

* cleanup types

* Add nested integration test

* Move aggdef to nested

* fixed merge conflict

* fixed lint warning

* mark nested-mode experimental

---------

Co-authored-by: Ethan Gallant <ethan@ziax.com>
Co-authored-by: Ethan J. Gallant <ethan.gallant@acquia.com>
2023-01-27 16:18:36 +01:00
Ezequiel Victorero
d5433a488a
Chore: Update code owners of public dashboards (#62332) 2023-01-27 12:17:18 -03:00