Commit Graph

34549 Commits

Author SHA1 Message Date
Jamie DeMichele
614fd04653
CloudWatch: Added missing MemoryDB Namespace metrics (#47290)
CloudWatch: Added missing MemoryDB metrics
2022-04-11 16:35:50 -04:00
Kristin Laemmert
8f6877e12a
chore: remove all remaining uses of golang.org/x/net/context (#47564)
* chore: remove all remaining uses of  golang.org/x/net/context

This PR finishes the work started in #47532, replacing all calls to that package with the stdlib context and using http.NewRequestWithContext to include the context where necessary.

Bonus: small formatting fixes to goimports in these files.

closes #44178

* tweak: use context.Background in favor of TODO for tests
2022-04-11 14:20:10 -04:00
ying-jeanne
03ba91e8a4
add feature toggle with new format (#47336)
* add feature toggle with new format

* fix some comments ❤️

* Update pkg/infra/log/term/terminal_logger.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-11 18:50:29 +02:00
Ashley Harrison
fb0f30e30b
Navigation: wrap long items in the menu correctly (#47431)
* start implementing wrapping behaviour

* handle more cases

* minWidth > width to preserve mobile behaviour

* Better css
2022-04-11 17:19:33 +01:00
Connor Lindsey
1ed83eb9b2
Tracing: Add README files for tracing datasource plugins 2022-04-11 18:16:38 +02:00
Yuriy Tseretyan
48519f9ebb
Alerting: reduce database calls in prometheus-comptible rules API (#47080)
* move validation at the beginning of method
* remove usage of GetOrgRuleGroups because it is not necessary. All information is already available in memory.
* remove unused method
2022-04-11 10:54:29 -04:00
Eric Leijonmarck
7be8fe027f
Add docs for service accounts 8.5 (#46801)
* initial doc for service accounts

* service account token calls complete

* service account tasks

* Update docs/sources/http_api/serviceaccount.md

* adding a token to the service account

* removed unused file

* refactor: review comments

* feat: add API key documentation

* fix: spelling

* Update docs/sources/administration/service-accounts/about-service-accounts.md

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

* Update docs/sources/administration/service-accounts/about-service-accounts.md

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

* Update docs/sources/http_api/serviceaccount.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Apply suggestions from code review

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

* Update docs/sources/administration/api-keys/about-api-keys.md

* refactor: based on review

* removed the permissions for apikeys, as they are not necessary

* Apply suggestions from code review

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

* Update docs/sources/administration/service-accounts/create-service-account.md

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

* Apply suggestions from code review

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

* update based on review

* Fix formatting of bullet points

* formatting

* refcator

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-04-11 15:45:02 +01:00
Kristin Laemmert
bda3dd24e4
chore: remove golang.org/x/net/context in favor of stdlib (#47532)
This PR removes golang.org context imports under pkg/services/* and replaces them with the stdlib context.

Closes #44178
2022-04-11 08:46:21 -04:00
Ieva
ef4c2672b3
Access control: SQL filtering for annotation listing (#47467)
* pass in user to attribute scope resolver

* add SQL filter to annotation listing

* check annotation FGAC permissions before exposing them for commenting

* remove the requirement to be able to list all annotations from annotation listing endpoint

* adding tests for annotation listing

* remove changes that got moved to a different PR

* unused var

* Update pkg/services/sqlstore/annotation.go

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>

* remove unneeded check

* remove unneeded check

* undo accidental change

* undo accidental change

* doc update

* move tests

* redo the approach for passing the user in for scope resolution

* accidental change

* cleanup

* error handling

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>
2022-04-11 13:18:38 +01:00
Marcus Efraimsson
4bc582570e
Instrumentation: Proxy status code correction and various improvements (#47473)
For a proxied request, e.g. Grafana's datasource or plugin proxy:
If the request is cancelled, e.g. from the browser, the HTTP status code is 
now 499 Client closed request instead of 502 Bad gateway.
If the request times out, e.g. takes longer time than allowed, the HTTP status 
code is now 504 Gateway timeout instead of 502 Bad gateway.
This also means that request metrics and logs will get their status codes 
adjusted according to above.

Fixes #46337
Fixes #46338
2022-04-11 13:17:08 +02:00
Aleksandr Stepanov
c0104db72d
bugfix: fix proper type of setting maxConcurrentShardRequests (#47120) 2022-04-11 10:29:49 +02:00
Sofia Papagiannaki
2478785aaf
Release engineering squad owns pkg/build (#47546) 2022-04-11 10:28:40 +02:00
Jack Westbrook
398f2b3d18
Build: Fix failing recompile of Grafana packages (#47492)
* build(packages): remove incremental as cache fails to recompile

* build(packages): remove tsBuildInfoFile property from tsconfig files
2022-04-11 09:41:03 +02:00
Michael Mandrus
4318ffdd46
SAML: Allow disabling of SAML signups (#47481)
* Add new error message for signup not allowed errors

* Add documentation on new SAML signup option

* Accept documentation feedback

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Accept documentation feedback

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* run prettier:write

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-08 18:47:07 -04:00
Nathan Marrs
99bb6ebd2b
Search: Update tag filter options dynamically (#47165) 2022-04-08 12:18:52 -07:00
Kevin Yu
ebe5f3646f
AzureMonitor: Use Resource Picker in Metrics Query Editor (#47164)
* wip: new metrics query editor

* prepend subscriptions to url path

* remove duplicated setQueryValue file

* add tests for new metrics query editor

* wip start extracting resource field into a shared component

* fix query editor test

* fix up backend tests

* move azure monitor specific getters to azure_monitor_datasource

* use existing useAsyncState hook

* extract useAsyncState into separate file

* add datahooks tests

* extract resource field component

* cleanup

* clarify variable names

* remove logs query specific resource field component

* add url_builder test

* add azure_monitor_datasources tests

* address comments

* add types

* pass resourceUri to resource field component

* add test to check we reset the query fields when changing resources
2022-04-08 08:49:46 -07:00
Josh Hunt
e3b123c3fc
GrafanaUI: Change chevron directions for open/closed state (#47386) 2022-04-08 16:37:25 +01:00
Eric Leijonmarck
883ce5ad30
Service accounts: UI polish improvements (#47461)
* ui polishes

* change icon
2022-04-08 16:23:03 +01:00
Gilles De Mey
7e844064a4
Alerting: fix collapsable toggle text regression (#47517) 2022-04-08 17:15:19 +02:00
Serge Zaitsev
18e93c7077
Chore: Remove bus (#47511)
* Chore: Remove bus

* remove unused const
2022-04-08 16:15:06 +02:00
brendamuir
1a88612e82
fixed dashboard spelling (#47515) 2022-04-08 17:09:01 +03:00
Gilles De Mey
c530100d45
fix: don't allow editing rule types for existing rules (#47512) 2022-04-08 15:26:33 +02:00
Serge Zaitsev
b31c7d3654
Chore: Remove bus from alerting rule (#47508)
* Chore: Remove bus from alerting rule

* fix alerting tests

* fix provide service
2022-04-08 14:30:25 +02:00
Serge Zaitsev
ad432108e6
Chore: Remove bus from dashboards provisioning (#47495)
* Chore: Remove bus from dashboards provisioning

* fix symlink test, make it run on darwin

* remove unused mock
2022-04-08 13:56:38 +02:00
Emil Tullstedt
3df625e9f4
UsageStats: Move stats collection to separate service (#47381)
* Remove specific stats from usage stats service

* Create statscollector service

* refactor

* Update and move tests

Mostly equivalent tests to before, but they've been divided over the two
services and removed the behavior driven legacy from GoConvey to
reduce the complexity of the tests.

* Collect featuremgmr metrics (copied over from #47407)

I removed the metrics registration from the feature manager in the merge
and re-add them in this commit. Separated to make things easier to
review.
2022-04-08 13:41:26 +02:00
Konrad Lalik
87383b1c8b
Alerting: FGAC for alert rules page (#47418)
* Apply FGAC on the alert rules list page

* Add tests for edit, delete and silence buttons

* Unify access-control helpers

* Fix import

* Add route permissions for alert groups, unify access control helpers

* Improve buttons with data source explore permission

* Fix test
2022-04-08 13:34:02 +02:00
Artur Wierzbicki
f1a1070d41
UsageStats: track enabled features (#47407)
* #47127: include enabled features in the usage stats reports

* #47127: convert feature names to snake cased metric names

* #47127: remove dead code

* #47127: lint fix

* #47127: convert GetUsageStats to return `map[string]interface{}`

* #47127: fix testssssssss

* #47127: fix testssssssss
2022-04-08 12:42:33 +02:00
Josh Hunt
416da59c43
Routing: Fix links to different port from being treated as internal links (#45192)
* Add some failing tests that trigger the bug

* start at refactor of stripBaseFromUrl
2022-04-08 10:44:17 +01:00
Gábor Farkas
beed3fd5de
loki: remove unused reverse-attribute (#47494) 2022-04-08 12:24:09 +03:00
Gábor Farkas
9574f447bb
grafana-data: removed DataQueryRequest.reverse (#47487) 2022-04-08 12:00:16 +03:00
Serge Zaitsev
2cf88cfec8
Chore: Remove bus from contexthandler (#47458)
* Chore: remove bus from contexthandler

* remove bus from orgredirect
2022-04-08 10:33:19 +02:00
dependabot[bot]
c8514756be
Bump actions/checkout from 2 to 3 (#46068)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-08 09:26:30 +01:00
Dimitris Sotirakis
ce2a9252c2
Replace with secret (#47488) 2022-04-08 10:06:45 +02:00
Gábor Farkas
e1438990ae
Loki: use the same dataframe-format for both live and normal queries (#47153)
* loki: use single dataframe-format for both live and normal queries

* better comment

* better function-name

* simplified code

* logs_model: added test
2022-04-08 09:57:06 +02:00
Ivana Huckova
7ab910af48
Query history: Search in comments (#46761) 2022-04-08 09:35:34 +02:00
Joe Blubaugh
631dd718a2
47470: Add additional delay to silences in test. (#47482)
This test of silence cleanup was flaky because of its use of real wall
time. In CI environments with slow execution, delays could cause the
test to fail. This change mitigates the problem by increasing the end time of
silences in the test.

After Prometheus merges this PR: https://github.com/prometheus/alertmanager/pull/2867
we can make the test fully deterministic by using a fake clock.

Fixes #47470

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-08 14:52:08 +08:00
Jeff Levin
4a4d87dbdc
add public dashboards feature flag (#47364) 2022-04-07 10:30:19 -08:00
Alexander Weaver
c3ad36ba72
Temporarily skip intermittent test (#47471) 2022-04-07 12:52:00 -05:00
Stephanie Closson
222325c7f1
Fix: Parse exemplars before parsing heatmap data (#47463)
* parse exemplars before parsing the heatmap. Exemplars are overlayed. Not part of the main heatmap

* added tests
2022-04-07 13:49:54 -03:00
Christopher Moyer
883f9f718f
Docs: corrects typos (#47464) 2022-04-07 18:25:58 +02:00
renovate[bot]
74a5650156
Update dependency jest-junit to v13.1.0 (#47446)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 18:23:22 +02:00
gotjosh
94f72acbb3
Alerting: Introduce an internal changelog (#47390)
* Alerting: Introduce an internal changelog

Please note that this is not intented to replace Grafana's "add to changelog" label. It is _mostly_ for internal consumption of the Alerting team that owns this part of Grafana.

* Fix markdown formatting

* Fix changelog entry
2022-04-07 15:24:26 +01:00
Agnès Toulet
59388bf546
Config: fix buildInfo initialization (#47402)
* Config: fix buildInfo initialization

* change default to be parseable

* apply default values for buildInfo
2022-04-07 16:17:37 +02:00
renovate[bot]
21d82132bb
Update dependency webpack to v5.72.0 (#47309)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 15:54:26 +02:00
Josh Hunt
b857f8339e
TestData: Interpolate variables in more fields (#47158)
* TestData: Interpolate variables in more fields

* only interpolate variables if the field is set

* Correctly type scenarioId which can be undefined
2022-04-07 14:45:14 +01:00
ying-jeanne
29b8d5d295
remove the parallele to avoid concurrency (#47447) 2022-04-07 15:45:03 +02:00
renovate[bot]
fba31c2708
Update dependency @testing-library/dom to v8.13.0 (#47423)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 14:25:16 +01:00
Tania
1c13bfdd1b
Chore: Update pre version (#47438) 2022-04-07 14:32:37 +02:00
Tania
4b8a202232
Update latest json (#47437) 2022-04-07 14:14:18 +02:00
Ashley Harrison
d95782845d
Navigation: add aria-label to NavBarToggle (#47434)
* add aria-label to NavBarToggle

* use open/close instead
2022-04-07 14:14:01 +02:00