Commit Graph

34360 Commits

Author SHA1 Message Date
Isabella Siu
05b1edb4a7
CloudWatch: re-add filter to handleMetricQueries (#47341) 2022-04-06 09:02:34 +02:00
Serge Zaitsev
3a7fc80948
Chore: Remove last bus parts from login package (#47313)
* Chore: Remove last bus parts from login package

* fix middleware tests
2022-04-06 08:45:01 +02:00
Piotr Jamróz
8490fd77e3
Users: clean up OrgId when all user orgs are removed (#46003)
* Clean up orgId when user organization is removed

* Add a test for removing user org

* Fix linting errors

* Update comment

* Fix linting errors

* Make removing user org more explicit
2022-04-06 08:35:58 +02:00
Michael Mandrus
f9d86557cf
Dashboard: Mix initials and custom gravatars in recent viewers list (#47212)
* Use Wiring to initialize Avatar Cache Server

Create AvatarCacheServer Provider function and pass it in as an
argument to HTTPServer. Also convert CacheServer to a singleton
so that we keep all cached Avatar info in one place for easier access

* Refactor avatar cache server and add 'isCustom' check

Avatar cache server needs to perform two similar fetches
back-to-back; break up functions to allow for easy reuse.
Then add handling to see if a user has a custom avatar.

* Add additional accessors so that /recents api can easily use the cache

* Minor mods to avatar server to facilitiate unit testing

* add unit tests for avatar fetching

* add error handling in case we somehow fetch gravatars while they are disabled

* linting: read error return value in unit test

* Use http package status codes

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

* Use http package status codes

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

* Use http package status codes

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

* Incorporate suggestions from PR
-avoid mutating arguments
-change error handler function to private and make name more descriptive

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>
2022-04-05 22:56:17 -04:00
Leon Sorokin
a9bc8b2016
TimeSeries: fix too-thin bar widths of joined series with null values (#47367) 2022-04-05 20:24:05 -05:00
Alexander Weaver
dde0b93cf1
Alerting: Provisioning API - Notification Policies (#46755)
* Base-line API for provisioning notification policies

* Wire API up, some simple tests

* Return provenance status through API

* Fix missing call

* Transactions

* Clarity in package dependencies

* Unify receivers in definitions

* Fix issue introduced by receiver change

* Drop unused internal test implementation

* FGAC hooks for provisioning routes

* Polish, swap names

* Asserting on number of exposed routes

* Don't bubble up updated object

* Integrate with new concurrency token feature in store

* Back out duplicated changes

* Remove redundant tests

* Regenerate and create unit tests for API layer

* Integration tests for auth

* Address linter errors

* Put route behind toggle

* Use alternative store API and fix feature toggle in tests

* Fixes, polish

* Fix whitespace

* Re-kick drone

* Rename services to provisioning
2022-04-05 16:48:51 -05:00
gotjosh
cb6124c921
Alerting: Accurately set value for prom-compatible APIs (#47216)
* Alerting: Accurately set value for prom-compatible APIs

Sets the value fields for the prometheus compatible API based on a combination of condition `refID` and the values extracted from the different frames.

* Fix an extra test

* Ensure a consitent ordering

* Address review comments

* address review comments
2022-04-05 19:36:42 +01:00
ying-jeanne
c525db9cd8
fallback to the v8 logging behavior (#47353) 2022-04-05 20:15:41 +02:00
achatterjee-grafana
4f7dae3e6b
update alertmanager topic (#47348) 2022-04-05 13:19:34 -04:00
Ivana Huckova
82aa31df36
Loki: Add missing functions to query builder (#47333) 2022-04-05 19:15:22 +02:00
Timur Olzhabayev
901e8a74f9
Adding drone file generation pre-commit hook (#47344) 2022-04-05 19:06:31 +02:00
achatterjee-grafana
668df49801
renamed file names, by replacing cortex with mimir (#47340) 2022-04-05 12:07:58 -04:00
Josh Hunt
1b27e55e5a
Analytics: Identify users to Rudderstack by externalUserId where available (#47325)
* wip

* tests

* move util, fix test

* fixes

* Update public/app/core/services/echo/utils.ts

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-04-05 17:41:22 +02:00
Braden Snell
3fff301367
Plugins: Pass OAuth Token to CallResource Function (#47028)
* adds oauth support to call resource requests

* adds oauth docs for call resource

* fixes case where dsUID is empty

* improve datasource error handling
2022-04-05 17:40:34 +02:00
Ashley Harrison
9b61f1cd9f
close when clicking just the icon (#47331) 2022-04-05 16:16:05 +01:00
Adam Gabryś
a5b2ef3116
Doc: display the use active voice table correctly (#47302)
The table had in two rows an additional column. It was breaking the markdown formatting. The unused column has been removed and the table is displayed correctly now.
2022-04-05 11:11:10 -04:00
Ivana Huckova
6938d5b975
Loki: Show error when parsing nodes not supported in visual query builder (#47321)
* Show error when parsing nodes not supported in visual query builder

* Refactor, simplify

* Spell fix

* Spell fix
2022-04-05 17:07:13 +02:00
Ashley Harrison
b6a184996b
Implement hover states + remove some old code to do with pinning (#47328) 2022-04-05 15:53:23 +01:00
Joao Silva
d311a3bef5
Navigation: Keeps nav item hover when hovering over the item menu (#47281) 2022-04-05 15:38:58 +01:00
achatterjee-grafana
c1c78bbc32
replaced references to Cortex with Mimir (#47293)
* replaced references to Cortex with Mimir

* Updated some links to Cortex documentation.

* Update docs/sources/alerting/_index.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/_index.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/rule-list.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/datasources/prometheus.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/unified-alerting/_index.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/_index.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/difference-old-new.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/datasources/alertmanager.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/fundamentals/alertmanager.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/rule-list.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/difference-old-new.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

* Update docs/sources/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-04-05 10:22:43 -04:00
Shirley
91bfd7fbf0
Chore: Add code coverage workflow for cloud data sources (#47048) 2022-04-05 16:13:18 +02:00
Josh Hunt
71db5115f4
User: Expose GCOM user ID as externalUserId in grafanaBootData (#47307)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* fix sql indtent

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-05 14:44:33 +01:00
Torkel Ödegaard
05098ec38e
StatPanel: Fixes font size issue when there is only 1 sparkline data point (#47075)
* StatPanel: Fixes font size issue when there is only 1 sparkline data point

* Fixed wide layout case
2022-04-05 15:34:17 +02:00
Ashley Harrison
8ede6161d4
Navigation: implement underlay (#47311)
* Navigation: implement underlay

* abstract out animation duration and add box-shadow

* rename underlay to backdrop, better syntax for composing css
2022-04-05 14:21:22 +01:00
Josh Hunt
2fe6eca7a0
NewsPanel: Remove Use Proxy option and update documentation with recommendations (#47189)
* NewsPanel: Remove CORS proxy and update documentation with recommendations

* Updated generated model

* Update news-panel.md

* Update docs/sources/visualizations/news-panel.md

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

* Update docs/sources/visualizations/news-panel.md

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

* Update news-panel.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-05 15:16:28 +02:00
Ivana Huckova
c5ac19d499
Loki: Add all supported parsers to query builder (#47304)
* Loki: Add all supported parsers to query builderr

* Update test

* Add tests for new parsers
2022-04-05 14:52:06 +02:00
Kelsey Duffy
fea4d1f57a
Toolkit: Update simple-git to 3.5.0 (#47139) 2022-04-05 14:43:14 +02:00
Jguer
90a94eab74
Dashboard/Folder permission fix session (#47174)
* Fix inherited scopes for dashboard to use folder uid

* Add inherited evaluators

* Slight modification of the commments

* Add test for inheritance

* Nit.

* extract shared function from tests

* Nit. Extra line

* Remove unused comment

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-04-05 14:28:23 +02:00
Oscar Kilhed
910ed77e16
Limit tooltip size to window size (#47303) 2022-04-05 13:35:02 +02:00
Ezequiel Victorero
6a059dcb4d
Access Control: hiding add annotation button without permissions (#47223)
* Access Control: hiding add annotation button without permissions
2022-04-05 08:20:10 -03:00
Serge Zaitsev
bf9e0e8bc8
Chore: Remove some bus from login package (login attempts) (#47310) 2022-04-05 13:07:27 +02:00
Gabriel Bernal
f722986b83
Build: update vulnerable node-fetch dependency (#46724)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-04-05 12:43:28 +02:00
renovate[bot]
e1d4666e17
Update dependency moveable to v0.28.0 (#46509)
* Update dependency moveable to v0.28.0

* Update yarnrc file as well

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-04-05 12:34:17 +02:00
renovate[bot]
ab59eae06a
Update dependency @microsoft/api-extractor-model to v7.16.0 (#47091)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-05 12:32:59 +02:00
Gábor Farkas
96987ac182
loki: add test to handle __name__ (#47298) 2022-04-05 11:56:54 +02:00
kay delaney
25c91d7bb9
Nav: Capitalize "Dashboards" in "Search Dashboards" (#47289) 2022-04-05 09:17:23 +01:00
kay delaney
2018d83e1c
Navigation: Add persistence to collapsible nav items (#47292) 2022-04-05 09:17:02 +01:00
Gabriel MABILLE
e430f5021d
AccessControl: Alerting role grants folder read on all folders to viewers (#47278) 2022-04-05 07:04:02 +00:00
Ryan McKinley
110d4661d7
Converter: use streaming JSON parser to construct frames from loki/prometheus responses (#44520) 2022-04-04 17:22:14 -07:00
Cat Perry
b5f2f3e710
Tempo: Traces to Logs - From viewing Tempo traces to displaying Splunk logs (#46855)
* Add functionality to see splunk logs via tempo trace view
2022-04-04 13:24:33 -07:00
Serge Zaitsev
33006436cc
Chore: Remove bus.Dispatch from some login packages (#47248)
* Chore: Remove bus.Dispatch from some login packages

* remove debug log

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

* remove login.Init()

* remove unused reset function

* remove AuthenticateUserFunc global

* swap conditional branches

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

* fix formatting

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-04 20:36:15 +02:00
Konrad Lalik
6992d17924
Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771)
* Add basic UI for custom ruler URL

* Add build info fetching for alerting data sources

* Add keeping data sources build info in the store

* Use data source build info to construct data source urls

* Remove unused code

* Add custom ruler support in prometheus api calls

* Migrate actions

* Use thunk condition to prevent multiple data source buildinfo fetches

* Unify prom and ruler rules loading

* Upgrade RuleEditor tests

* Upgrade RuleList tests

* Upgrade PanelAlertTab tests

* Upgrade actions tests

* Build info refactoring

* Get rid of lotex ruler support action

* Add prom ruler availability checking when the buildinfo is not available

* Add rulerUrlBuilder tests

* Improve prometheus data source validation, small build info refactoring

* Change prefix based on Prometheus subtype

* Use the correct path

* Revert config routing

* Add deprecation notice for /api/prom prefix

* Add tests to the datasource subtype

* Remove custom ruler support

* Remove deprecation notice

* Prevent fetching ruler rules when ruler api is not available

* Add build info tests

* Unify naming of ruler methods

* Fix test

* Change buildinfo data source validation

* Use strings for subtype params and unveil mimir

* organise imports

* frontend changes and wordsmithing

* fix test suite

* add a nicer verbose message for prometheus datasources

* detect Mimir datasource

* fix test

* fix buildinfo test for Mimir

* shrink vectors

* add some code documentation

* DRY prepareRulesFilterQueryParams

* clarify that Prometheus does not support managing rules

* Improve buildinfo error handling

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-04 18:30:17 +01:00
Ivana Huckova
4c6d2ce618
Loki: Parse query with unwrap (#47282)
* Loki: Parse simple unwrap

* Update public/app/plugins/datasource/loki/querybuilder/parsing.ts

* Simplify
2022-04-04 18:44:23 +02:00
Ivana Huckova
f8b9bf543b
Loki: Replace auto with (#47283) 2022-04-04 18:43:37 +02:00
Ivana Huckova
24cf70dd29
Loki: Add parsing for vector aggregations with grouping (#47257)
* Parse aggregations with grouping

* Move getByType to shared parsing utils
2022-04-04 18:11:15 +02:00
Eric Leijonmarck
78bdcede70
Service accounts: polish UI and refactoring (#47269)
* no other tab has title

* made Add service button not visable and upper right

* renaming and added space between token number

* aligned button (:css:)

* refactor: out component listitem

* unused import
2022-04-04 17:09:51 +01:00
Isabella Siu
b1c68b5a12
CloudWatch: filter alert queries (#47222) 2022-04-04 12:06:31 -04:00
Ashley Harrison
1c34cc8b91
Navigation: Put expand toggle at beginning of tab order (#47268)
* Put toggle at beginning of tab order

* create NavBarToggle

* move margin into the common component

* lint fixes
2022-04-04 16:51:24 +01:00
Gilles De Mey
322a14fe6e
Alerting: fix flakey default time range assertion (#47262) 2022-04-04 17:35:53 +02:00
Derik Evangelista
8428446466
table panel: assume string dates to be on UTC (#47246)
* add tests for display processor relating to datetimes as strings

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-04-04 16:05:06 +01:00