Commit Graph

46992 Commits

Author SHA1 Message Date
Ryan McKinley
7b78061235
K8s: Add grafana metadata accessor (#79050) 2023-12-04 18:20:17 -08:00
Rodrigo Villablanca
ab83bc7346
Alerting: Fix export of notification policy to JSON (#78021)
* Export Notification Policy correctly (#78020)

The JSON version of an exported Notification Policy now
inline correctly the policy in the same way the Yaml version
does.

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2023-12-04 16:57:37 -05:00
Gabriel MABILLE
99580d60f5
Chore: Fix flaky test by removing the extsvcauth background service (#79044) 2023-12-04 22:26:55 +01:00
Todd Treece
38bc41651a
K8s: Refactor metrics to share k8s registry (#77957)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-04 10:54:59 -08:00
Julien Duchesne
cd584e9261
Swagger: Fix getLibraryElementByName response (#78221)
It returns an array of library elements, not a single one. This has been tested by generating the OpenAPI client and using it in Terraform
2023-12-04 11:20:13 -05:00
Julien Duchesne
3c51190392
ngalert make: Support GNU install on Darwin (#78482)
* ngalert `make`: Support GNU install on Darwin
Currently, the Makefile assumes that Darwin is using the Mac version of `sed`
I have the GNU version, so it failed. With this PR, it checks which version is installed
I also called `make` and there are some changes that came out of it

* swagger-gen
2023-12-04 10:11:39 -05:00
Darren Janeczek
ac1b9e44a2
data-trails: ability to (de)serialize parents and current index (#78782)
fix: ability to (de)serialize parents and current index

- refactored so only history stores parent relations and current index

- rounded indirect parent links
2023-12-04 10:04:58 -05:00
Dan Cech
318f51eaee
Chore: Remove unused CacheService dependency from sqlstore (#78507)
remove unused CacheService dependency from sqlstore
2023-12-04 10:00:45 -05:00
Julien Duchesne
637cfa89be
Swagger: Rename Spec to Preferences (#78226)
The definition for preferences is globally named `Spec` because that's the type that cue outputs
This adds a swagger annotation to rename the definition in the swagger schema to `Preferences`
This will be easier to use in generated clients
2023-12-04 09:51:09 -05:00
Julien Duchesne
2fb207ba13
Generate latest OpenAPI spec (#79017)
Following https://github.com/grafana/grafana-enterprise/pull/6003
Also, some other pending changes aren't reflected in the spec it seems
2023-12-04 09:16:33 -05:00
Gabriel MABILLE
5b70130e6c
Plugins: Rename externalServiceAuthentication to iam (#78686)
Plugins: Rename externalServiceAuthentication to iam
2023-12-04 13:14:21 +01:00
Marcus Efraimsson
0825b63b79
Plugins: Only preload plugins if user is authenticated (#78805)
Fixes #75941
2023-12-04 11:53:05 +01:00
ssama88
fbaa611f17
Storybook: Fix Selected Card layout issues (#77830) 2023-12-04 10:52:42 +00:00
dependabot[bot]
5d2593db13
Bump google-github-actions/auth from 1 to 2 (#78867)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 1 to 2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1...v2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  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>
2023-12-04 10:42:18 +00:00
Marcus Efraimsson
00fa6c7caa
Chore: Upgrade sdk to v0.194.0 (#78961)
* Upgrade sdk to v0.194.0

* update replace for k8s.io/apiserver
2023-12-04 11:42:09 +01:00
Sofia Papagiannaki
6d4625ad52
Alerting: Fix deleting rules in a folder with matching UID in another organization (#78258)
* Remove usage of obsolete function for deleting alert rules under folder

* Apply suggestion from code review

* Update tests
2023-12-04 11:34:38 +02:00
Torkel Ödegaard
4e2201ffeb
DataTrails: Fixes filters taking metric into account (#78786)
* DataTrails: Fixes filters taking metric into account

* fix merge
2023-12-04 09:42:34 +01:00
Ryan McKinley
f761ae1f02
FeatureFlags: Add created time property (#78996) 2023-12-03 20:45:51 -08:00
Andrej Ocenas
b40913c5e5
Flamegraph: Refactor css styling (#78698) 2023-12-03 12:00:42 +01:00
Ashley Harrison
4a6ff8cf69
Navigation: add application-observability icon (#78935)
add application-observability icon
2023-12-02 09:51:46 +00:00
Yuri Tseretyan
64feeddc23
Alerting: Update rule access control to return errutil errors (#78284)
* update rule access control to return errutil errors
* use alerting in msgID
2023-12-02 01:42:11 +02:00
Matthew Jacobson
6644e5e676
Alerting: Fix migration that is brittle to version downgrades (#78976) 2023-12-01 15:18:41 -05:00
Kyle Cunningham
b42d652106
Transformations: Move transformation addition into drawer (#78299)
* Start splitting out code

* Use flag

* A bit of rocket surgery

* Prettify

* Cleanup behavior

* Work through behaviors

* Move empty message from other PR

* Import fixes and prettier

* Clean things up

* Add selector for tests

* Cleanups

* Working with transformation redesign

* Some more tweaks to make sure of correct behavior

* Update betterer/eslint exceptions

* Localization

* Remove unecessary fragments

* Spacing and prettier

* Update tests for new UI

* Update e2e tests

* One more e2e test fix

* Update selectors

* Fix one test and break another
2023-12-01 14:08:54 -06:00
Isabella Siu
d894f4cc79
CloudWatch: Correctly quote metric names with special characters (#78958) 2023-12-01 14:37:09 -05:00
Sven Grossmann
af05fdc806
Transformations: Fill array with undefined to prevent mismatching length (#78911)
* fill array with `undefined` to prevent matching length

* update unit test to include sortBy transformation

---------

Co-authored-by: Galen <galen.kistler@grafana.com>
2023-12-01 13:33:05 -06:00
Piotr Jamróz
b64802ed3b
Correlations: Add error logging (#78272)
* Add error logging when parsing correlations

* Make orgId optional

* Add module property and move source and target to context for better readability
2023-12-01 20:26:05 +01:00
Gilles De Mey
58d0c51cf4
Alerting: Add note to the docs that GMA rules are evaluated concurrently (#78902) 2023-12-01 18:32:48 +01:00
ismail simsek
2b0e7afb4e
InfluxDB: Fix an edge case while parsing table response (#78802)
* Prepare the test files

* use json files everywhere

* update golden json files

* disable update

* update test file

* fix naming

* lint

* InfluxDB: Add metadata information to first frame only (#78664)

* executedString in first frame only

* lint

* fix tests

* update tests

* don't update

* linting

* update

* update again

* handle nil values

* append in the right array

* add comments

* remove redundant if condition
2023-12-01 18:31:49 +01:00
Alexander Weaver
ab0ef5276f
Alerting: Decouple quota configuration logic from API interfaces and add tests (#78930)
* Separate usage reporter from API

* Extract quota registration

* Decouple from API store interface

* Move to ngalert package and add tests

* linter
2023-12-01 10:47:19 -06:00
Joey Orlando
ea7a179f2a
Plugins: Add grafana/user/profile/tab plugin extension point (#77863)
* add grafana/user/profile/settings
plugin extension point

* changes to support plugins having their
own settings tabs

* WIP

* add comment

* add unit tests

* allow setting open tab based on tab query param

* update name of extension point

* add some more unit tests

* address PR comments

* PR comments
2023-12-01 15:18:27 +00:00
Laura Fernández
517746dc83
Internationalization: Add information about the process to send feedback to Crowdin (#78755) 2023-12-01 16:10:23 +01:00
Ivan Ortega Alba
e56a252158
GeneralSettings: Edit general dashboards settings to scenes (#78492) 2023-12-01 17:04:56 +02:00
Ieva
c354c7bfff
RBAC: Update fixed annotation roles (#78756)
* update fixed annotation roles if FlagAnnotationPermissionUpdate is enabled

* add dashboard type scope back in the fixed roles to make the migration easier
2023-12-01 14:50:55 +00:00
Misi
d3a269ab3b
Auth: Load ini/env vars settings in the fallback strategy (#78495)
* Return data in camelCase from the OAuth fb strategy

* changes

* wip

* Add defaults for oauth fb strategy

* revert other changes

* Add tests

* Add Defaults to cfg and use it in OAuthStrategy

* Return *OAuthInfo from OAuthStrategy

* lint

* Remove unnecessary Defaults

* Introduce const for fields, fix import order

* Align failing tests

* clean up

* Changes requested by @gamab

* Update pkg/services/ssosettings/strategies/oauth_strategy_test.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Load data on startup

* Rename + simplify

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-12-01 15:35:44 +01:00
ismail simsek
46044efdf8
Fix: Use dashboard time range in prometheus variable editor (#78950)
Use dashboard time range in variable editor
2023-12-01 15:30:47 +01:00
Fabrizio
ae3f1506df
Tempo: Fix read-only access error (#78801) 2023-12-01 13:55:48 +01:00
Steve Simpson
520c927931
Alerting: Only warm alert state cache if execute_alerts=true. (#78895)
* Alerting: Only warm alert state cache if execute_alerts=true.

If the Grafana instance is not executing alerts, then Warm()-ing the state
manager is wasteful and could lead to misleading rule status queries, as the
status returned will be always based on the state loaded from the database at
startup, and not the most recent evaluation state.

* Move Warm() down to shared conditional.
2023-12-01 10:17:32 +01:00
Ivan Ortega Alba
8d7314bb9a
DeleteDashboard: Redirect to home after deleting a dashboard (#78918) 2023-12-01 10:15:41 +01:00
Dominik Prokop
303c3ddc24
DashboardScene: Pass hashed panelId to query runner if a panel is a clone (#78820)
* DashboardScene: Pass hashed panelId  to query runner if a panel is a clone

* Test

* Nit
2023-12-01 01:07:55 -08:00
Gilles De Mey
69e1046ed3
Alerting: Hide error messages for failing HTTP calls to Grafana OnCall (#78919) 2023-11-30 22:30:24 +01:00
Galen Kistler
243c7583c9
Logs Panel: Table UI - Logs.tsx clean up mutation in react lifecycle (#78925)
* remove prop mutation in componentWillUnmount
2023-11-30 20:04:42 +00:00
Giordano Ricci
5af7b451d0
docs: Reword shortened link expiration explainer (#78922)
docs: reword shortened link expiration explainer
2023-11-30 18:54:56 +00:00
Virginia Cepeda
148e1c1588
Alerting: Change create/update permissions for silences (#78920)
* Change create/update permissions for silences

* Add comment
2023-11-30 20:28:37 +02:00
Domas
b40e61d935
Timeseries to table transformation: Fix misaligned table field values if some frames are missing a label (#78909)
* fix bug with time series table transform when a frame is missing a label

* prettier format
2023-11-30 19:09:52 +02:00
Adela Almasan
e361839261
Tooltip: Improved Heatmap tooltip (#75712)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-11-30 11:04:56 -06:00
Matthew Jacobson
5a80962de9
Alerting: Add clean_upgrade config and deprecate force_migration (#78324)
* Alerting: Add clean_upgrade config and deprecate force_migration

Upgrading to UA and rolling back will no longer delete any data by default. 
Instead, each set of tables will remain unchanged when switching between 
legacy and UA. As such, the force_migration config has been deprecated 
and no extra configuration is required to roll back to legacy anymore.

If clean_upgrade is set to true when upgrading from legacy alerting to Unified
Alerting, grafana will first delete all existing Unified Alerting resources,
thus re-upgrading all organizations from scratch. If false or unset,
organizations that have previously upgraded will not lose their existing Unified
 Alerting data when switching between legacy and Unified Alerting.

 Similar to force_migration, it should be kept false when not needed as it may
 cause unintended data-loss if left enabled.

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-11-30 11:01:11 -05:00
Karl Persson
0f0249abea
RBAC: Fix filter so that check for access on service account is correct (#78907)
Fix filter so that check for access on service account is in correct place
2023-11-30 17:32:04 +02:00
Matthew Jacobson
cdad712547
Alerting: Keep track of individual org migration status (#78369)
* Alerting: Keep track of individual org migration status

Save migration status per migrated org.

Change the meaning (and key/value) of the org_id=0 entry 
to store the current (previous) config value used by alerting. 
This is so we can know when to upgrade/downgrade by 
comparing with the new config value in 
UnifiedAlerting.IsEnabled.
2023-11-30 10:25:59 -05:00
Ashley Harrison
329d0e79ec
Navigation: Rearrange IA based on tree test (#78804)
* rearrange IA

* add landing page routes and subtitles

* Translate menu items

* add frontend-observability icon

* proper frontend-observability icon

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2023-11-30 15:18:05 +00:00
Gilles De Mey
7ccdea6f67
Alerting: Fixes combination of multiple predicates for rule search (#78910) 2023-11-30 16:13:05 +01:00