Commit Graph

6616 Commits

Author SHA1 Message Date
Diego Augusto Molina
ff08c0a790
Chore: improve test readability in ngalert/schedule (#82453)
Chore: improve test readability
2024-02-14 14:53:32 -03:00
Dominik Prokop
f016f95298
GroupBy variable core integration (#82185)
* Bump scenes

* Make GroupByVariableModel a VariableWithOptions

* Serialise/deserialise group by variable

* WIP: Group by variable editor

* WIP tests

* Group by variable tests

* add feature toggle and gate variable creation behind it

* Fix types

* Do not resolve DS variable

* Do not show the message if no DS is selected

* Now groupby has options and current

* Update public/app/features/dashboard-scene/settings/variables/components/GroupByVariableForm.test.tsx

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* don't allow creating groupby if toggle is off + update tests

* add unit tests

* remove groupByKeys

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-02-14 09:18:04 -08:00
Sven Grossmann
e422309bc4
Loki: Enable lokiStructuredMetadata feature flag by default (#82325) 2024-02-14 17:24:56 +01:00
Nathan Marrs
ce750e0618
Deprecation: Create explicit feature toggles for remaining panels (#82217) 2024-02-14 18:06:25 +02:00
Diego Augusto Molina
9c29e1a783
Alerting: Fix data races and improve testing (#81994)
* Alerting: fix race condition in (*ngalert/sender.ExternalAlertmanager).Run

* Chore: Fix data races when accessing members of *ngalert/state.FakeInstanceStore

* Chore: Fix data races in tests in ngalert/schedule and enable some parallel tests

* Chore: fix linters

* Chore: add TODO comment to remove loopvar once we move to Go 1.22
2024-02-14 12:45:39 -03:00
Misi
12b1170631
Auth: Validation fixes for SSO Settings (#82252)
* Validation fixes

* Add URL validations + tests

* Add ApiUrl validation

* Refactor validators

* lint

* Clean up

* Improvements
2024-02-14 16:06:52 +01:00
Yulia Shanyrova
9dcb7800de
Plugins: Add fuzzy search to plugins catalogue (#81001)
* WIP add fuzzysearch to plugins catalog

* Add keywords to the plugins listing output

* add fuzzy search to plugin catalog, add keywords to plugins at frontend side

* refactor fuzzysearch function after review

* review changes

* change the version of uFuzzy library

* change reduce result object in getPluginDetailsForFuzzySearch

* fix yarn lock error

* fix helpers tests

* fix frontend searching test

* fix frontend linting issues

* fix tests

---------

Co-authored-by: Esteban Beltran <esteban@academo.me>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
2024-02-14 14:30:24 +01:00
Ieva
7c44dd713a
IP range AC: Add X-Real-IP header (#82390)
add X-Real-IP header
2024-02-14 11:45:55 +00:00
Sofia Papagiannaki
28de94f6a2
Folders: Modify folder service Get() to optionally return fullpath (#81972)
* Folders: Modify Get() to optionally return fullpath

* Set FullPath to folder title if feature flag is off

* Apply suggestion from code review
2024-02-14 04:47:46 +11:00
Alexander Weaver
ccb4533a86
Alerting: Remove unused AlertRuleVersionWithPauseStatus (#82383)
Remove unused AlertRuleVersionWithPauseStatus
2024-02-13 10:56:24 -06:00
Alexander Weaver
99fa064576
Alerting: Emit warning when creating or updating unusually large groups (#82279)
* Add config for limit of rules per rule group

* Warn when editing big groups through normal API

* Warn on prov api writes for groups

* Wire up comp root, tests

* Also add warning to state manager warm

* Drop unnecessary conversion
2024-02-13 08:29:03 -06:00
Ryan McKinley
0c6e409350
Chore: Update arrow and prometheus dependencies (#82215)
* update arrow and prometheus

* keep codeowner

* use compare

* use grafana-plugin-sdk-go v0.210.0

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-13 01:50:25 +01:00
Ryan McKinley
d1e5e4e747
FeatureToggles: keep older history (#82336) 2024-02-12 15:13:51 -08:00
Todd Treece
d6e6298103
K8s: Add Aggregation to Backend Service (#81591)
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2024-02-12 22:59:35 +02:00
Todd Treece
6d5211e172
K8s: Fix windows filepath issue in file storage (#81919)
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-02-12 13:21:57 -05:00
Galen Kistler
29be9b127a
Logs: Table UI - Enable feature flag by default (GA) (#81185)
default logsExploreTableVisualisation to true
2024-02-12 10:12:05 -06:00
Karl Persson
1315c67c8b
Team/User: UID migrations (#82298)
* Add user uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Add team uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Run team uid migration
2024-02-12 14:48:29 +01:00
Will Browne
788b9afda3
Plugins: Make it possible to support multiple plugin versions (#82116)
* first pass

* use version in more places

* add comment

* update installer

* fix wire

* fix tests

* tidy

* simplify changes

* fix in mem

* remove unused step

* fix step dupe logic for child plugins + add tests
2024-02-12 12:47:49 +01:00
Torkel Ödegaard
fe6d1460b0
DashboardScene: Adds solo page that uses dasboarde scene to render single panel (#77940)
* DashboardScene: Adds solo page that uses dasboarde scene to render single panel

* Update

* Panel and row repeats working

* Update

* added e2e tests

* Refactor

* Fixes

* Fix e2e

* fix

* fix

* fix
2024-02-11 09:08:47 +01:00
Kyle Cunningham
f0bbfc8422
Chore: Move BI feature flags to Dataviz (#82224) 2024-02-10 02:24:08 +02:00
Ryan McKinley
ce910a7eb2
FeatureFlags: manage creation/modification times automatically (#82131) 2024-02-09 15:34:12 -08:00
Alexander Weaver
5bbe9c6e61
Alerting: Enable group-level rule evaluation jittering by default, remove feature toggle (#82212)
* remove jitter feature flag

* Add an out so users can manually disable jitter

* Pass in cfg

* Add TODO to remove knob in future
2024-02-09 15:53:58 -06:00
Stephanie Hingtgen
87c3d0fb6a
K8s: Update stack id validation (#82275) 2024-02-09 21:51:00 +02:00
João Calisto
42d6e176bc
Feature Toggle Management: allow editing PublicPreview toggles (#81562)
* Feature Toggle Management: allow editing PublicPreview toggles

* lint

* fix a bunch of tests

* tests are passing

* add permissions unit tests back

* fix display

* close dialog after submit

* use reload method after submit

* make local development easier

* always show editing alert in the UI

* fix readme

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-02-09 18:48:56 +02:00
Stephanie Hingtgen
54a77fa55e
K8s: StackIDs can be single digits (#82267) 2024-02-09 18:39:58 +02:00
Jo
6f62d970e3
JWT Authentication: Add support for specifying groups in auth.jwt for teamsync (#82175)
* merge JSON search logic

* document public methods

* improve test coverage

* use separate JWT setting struct

* correct use of cfg.JWTAuth

* add group tests

* fix DynMap typing

* add settings to default ini

* add groups option to devenv path

* fix test

* lint

* revert jwt-proxy change

* remove redundant check

* fix parallel test
2024-02-09 16:35:58 +01:00
Dan Cech
790e1feb93
Chore: Update test database initialization (#81673)
* streamline initialization of test databases, support on-disk sqlite test db

* clean up test databases

* introduce testsuite helper

* use testsuite everywhere we use a test db

* update documentation

* improve error handling

* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Misi
b1dc505a2b
Auth: Validate admin assignment in SSO Settings (#82233)
* Add validation for allowAssignGrafanaAdmin

* Update default values

* Do not render hidden fields

* Change error message

* Improve tests

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2024-02-09 13:10:23 +01:00
ismail simsek
b0dfeb1911
Chore: Clean up intervalv2 functions (#82074)
* clean up intervalv2 functions

* use roundInterval from grafana-plugin-sdk-go

* use from grafana-plugin-sdk-go

* have intervalv2 in publicdashboards and remove tsdb/intervalv2

* legacydata cleanup

* remove unused variables

* Update pkg/tsdb/legacydata/interval/interval.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

---------

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2024-02-09 11:39:21 +01:00
Nathan Marrs
829672759c
Deprecation: Create explicit feature toggle to auto-migrate from graph panel (#79369) 2024-02-08 14:00:48 -08:00
Matthew Jacobson
ce57166c9a
Alerting: GA alertingPreviewUpgrade and enable by default (#82038)
* Alerting: GA alertingPreviewUpgrade and enable by default
2024-02-08 18:59:25 +01:00
Jo
fb86ed79fc
Stats: Remove ACL references (#82112)
remove acl references
2024-02-08 17:19:24 +01:00
Ashley Harrison
0e15b4ac76
Navigation: Add config for grafana-slo-app and grafana-aws-app (#82174)
add config for grafana-slo-app and grafana-aws-app
2024-02-08 15:56:43 +00:00
Jean-Philippe Quéméner
4dc1ebbb66
fix(alerting): add a proper compare func for location in mute timings (#82153) 2024-02-08 13:36:09 +01:00
Agnès Toulet
28e66b4ad8
Rendering: Adds PDF support behind feature toggle (#81811)
* start pdf refactor

* Update AppChrome.tsx

* Update AppChrome.tsx

* add encoding param to rendering grpc service

* fix plugin mode

* clean up

* fix backend tests

* fix lint errors

* Support pdf encoding in render http api

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-02-08 13:09:34 +01:00
George Robinson
90a26e18db
Alerting: Update Alertmanager to e82436c (#82145)
This commit updates Alertmanager to commit e82436c, which is based
on commit f69a508 from Prometheus Alertmanager.
2024-02-08 11:25:27 +00:00
Will Browne
99feb928cf
Plugins: Don't auto prepend app sub url to plugin asset paths (#81658)
* don't prepend app sub url to paths

* simplify logo path

* fix(plugins): dynamically prepend appSubUrl for System module resolving to work

* fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js

* fix tests

* update test name

* fix tests

* update fe + add some tests

* refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage

* chore: fix a typo

* test(plugins): add missing name to utils test

* reset test flag

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-02-08 12:19:28 +01:00
Jo
6ac0bc5ecf
Seeder: Add missing methods to Registrations (#81961)
* add slice copy method

* fix slice copy
2024-02-08 09:54:17 +01:00
Charandas
117a4b4b0a
K8s: resolve crash due to looking up aggregation config when running in a K8s environment (#82125)
K8s: apply authn options only in dev mode - resolves crash due to looking up aggregation config
2024-02-07 16:43:07 -08:00
Dan Cech
1f1461734c
Storage: Add support for sortBy selector (#80680)
* add support for sortBy field selector

* use label selectors instead of field selectors

* set entity_labels on create & update

* make entity server integration tests work

* test fixes

* be more consistent with handling of empty body, meta or status

* workaround for database is locked errors during migration

* fix double import of sqlite3

* rename functions and tidy up

* refactor update

* disable integration tests until we can fix the database locking issue
2024-02-07 15:05:10 -05:00
Dan Cech
156d7ae194
use in-process grpc client instead of wrapping server interface (#81926)
* use in-process grpc client instead of wrapping server interface

* comment out jwt token checks until we're ready to validate the token
2024-02-07 13:17:02 -05:00
Matthew Jacobson
dd0ca1263b
Alerting: Include rule uid, title, namespace in unique constraint errors (#82011)
* Alerting: Include rule_uid, title, namespace_uid in unique constraint errors
2024-02-07 12:55:48 -05:00
Alexander Weaver
843c477899
Alerting: Add exported API to scheduler to access currently loaded rules (#82031)
* Add exported API to fetch rule definitions from scheduler

* Add comment
2024-02-07 09:31:22 -06:00
Kyle Cunningham
756cd3c28b
Transformations: Add Group to Nested Tables Transformation (#79952)
* Stub group to subframe transformation

* Get proper field grouping

* Mostly working but fields not displaying 😭

* Fix display processing in nested tables

* Modularize and start merging groupBy and groupToSubrame

* Get this working

* Prettier

* Typing things

* More types

* Add option for showing subframe table headers

* Prettier

* Get tests going

* Update tests

* Fix naming and add icons

* Betterer fix

* Prettier

* Fix CSS object syntax

* Prettier

* Stub alert for calcs with grouping, start renaming

* Add logic to show warning message for calculations

* Add calc warning

* Renaming and feature flag

* Rename images

* Prettier

* Fix tests

* Update feature toggle

* Fix error showing extra blank row

* minor code cleanup

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-02-07 21:28:26 +07:00
Andres Martinez Gotor
26bc87b60e
Chore: Replace core plugins as external warning (#81877) 2024-02-07 16:17:13 +02:00
ismail simsek
2679599968
Prometheus: Remove grafana/pkg/setting imports (#81813)
* upgrade grafana-azure-sdk-go v1.12.0

* add AzureAuthEnabled to config

* remove grafana/pkg/setting imports

* remove grafana/pkg/setting imports

* remove comment

* add better error message

* Fix the unit test

* fix lint
2024-02-07 11:01:09 +01:00
Yuri Tseretyan
47546a4c72
Alerting: Update API to use folders' full paths (#81214)
* update GetUserVisibleNamespaces to use FolderSeriver
* update GetNamespaceByUID to use FolderService.GetFolders
* update GetAlertRulesForScheduling to use FolderService.GetFolders 

* Update API and GetAlertRulesForScheduling to use the folder's full path
* get full path of folder in RouteTestGrafanaRuleConfig

* fix escaping of titles for MySQL
2024-02-06 17:12:13 -05:00
Ryan McKinley
91754bcda5
K8s: Refactor standalone apiserver initialization (#81932) 2024-02-06 08:40:35 -08:00
Gabriel MABILLE
4af5aef417
id forwarding: transfer Grafana id token to app plugins (#81967)
* id forwarding: allow for app plugins as well

* Add test
2024-02-06 16:26:17 +01:00
Gokhan
cf601fab09
Alerting: Enable sending notifications to a specific topic on Telegram (#79546)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-06 17:19:22 +02:00