Commit Graph

3858 Commits

Author SHA1 Message Date
Joan López de la Franca Beltran
38bcd37fba
Encryption: Move secrets migrations into secrets.Migrator (#51014) 2022-07-04 12:17:21 +02:00
George Robinson
6844ac9879
Alerting: Change __alertScreenshotToken__ to __alertImageToken__ (#50771) 2022-07-04 06:05:36 -04:00
Jean-Philippe Quéméner
580c5b6ad2
Alerting: add YAML support for relative time range (#51694) 2022-07-04 06:03:34 -04:00
Ieva
75873d05d7
Access Control: Allow dashboard admins to query org users (#51652)
* allow dashboard admins to query org users

* rename one more variable
2022-07-04 10:43:06 +01:00
Andrej Ocenas
3df34fe064
Prometheus: Remove cache, pass headers in request, simplify client creation for resource calls and custom client (#51436)
* Remove cache, pass headers in request, simplify client creation

* Add test for http options creation
2022-07-04 11:18:45 +02:00
Sven Grossmann
b7e22c37a8
UsageStats: fixed elasticsearch version number to semver (#49054)
* UsageStats: fixed elasticsearch version number

- The version numbering was changed from plain numbers to a semver-ish approach

* added missing version assertion

* adapted tests
2022-07-04 11:08:01 +02:00
Alexander Emelin
f233a74b70
Search: Downgrade Bluge, refactor code (#51560)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-07-04 11:33:07 +03:00
Artur Wierzbicki
0ca4ccfa96
Search: fix logging statements (#51633) 2022-07-01 15:38:31 -07:00
Alexander Emelin
a2478c3a32
Search: Sort by updated at and created at (#50416)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-30 16:33:30 -07:00
Alexander Emelin
0975ea4df8
Search: Filter punctuation and tokenize camel case (#51165)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-30 16:30:44 -07:00
Ezequiel Victorero
03c13742ac
Public Dashboards: disable dev mode required (#51646) 2022-06-30 20:10:30 -03:00
Ezequiel Victorero
ab6a609c32
Public Dashboards: fix time settings store when updating (#51601)
* Public Dashboards: fix time settings store when updating
2022-06-30 13:30:01 -08:00
Emil Tullstedt
a14ca8fb62
Dependencies: Clean up gofrs/uuid (#51615)
* Dependencies: switch from gofrs/uuid to google/uuid

Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-30 10:55:33 -08:00
George Robinson
d59db0b8e6
Alerting: Better metrics and renamed BrowserScreenshotService (#51564) 2022-06-30 17:47:23 +01:00
Yuriy Tseretyan
8b3b667a47
Alerting: Fix rule API to accept 0 duration of field For (#50992)
* make 'for' pointer to distinguish between missing field and 0
* set 'for' to -1 if the value is missing but not allow negative in the request + path -1 with the value from original rule
* update store validation to not allow negative 'for'
* update usages to use pointer
2022-06-30 11:46:26 -04:00
George Robinson
7fea330dc1
Alerting: Remove withStoredImage and change forEachFunc (#51384) 2022-06-30 15:27:57 +01:00
Kristin Laemmert
9de00c8eb2
chore/backend: move dashboard errors to dashboard service (#51593)
* chore/backend: move dashboard errors to dashboard service

Dashboard-related models are slowly moving out of the models package and into dashboard services. This commit moves dashboard-related errors; the rest will come in later commits.

There are no logical code changes, this is only a structural (package) move.

* lint lint lint
2022-06-30 09:31:54 -04:00
Eric Leijonmarck
c5089f1595
Service accounts: add usagestats for teams (#51585)
* remove enabled service account count

* add service account count in teams

* removed unnessecary comment
2022-06-30 11:05:49 +02:00
Sofia Papagiannaki
a5924315f8
API: Fix failure to generate swagger specification due to missing binary (#51551)
* Fix swagger generation

Add installing binary as dependency to the target

* Some more fixes
2022-06-30 09:58:07 +03:00
George Robinson
fe797dcfdc
Alerting: Improvements to image package (#51576)
This commit makes a number of improvements to the image package:

- Improved comments
- Return the correct error when a dashboard does not exist
- Set a timeout in context.Context
2022-06-29 20:30:13 +01:00
Alexander Emelin
0caecfe298
sync routing tree with latest changes in Gin (#51541) 2022-06-29 19:05:57 +03:00
kay delaney
8053f770c1
Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
Guilherme Caulada
d5185f8ab9
Secrets: Implement unified secrets short lived cache (#51275)
* Implement unified secrets short lived cache

* Improve debug logging for unified secrets cache

* Re-add decryption cache to sql secret kvstore

* Remove cache from remote secret store plugin

* Revert secret store helpers implementation

* Remove cache from secret store plugin struct

* Update secret store cache to implement interface

* Set secret store cache value on get

* Fix issues with sql secret store decryption cache

* Increase clean up interval on cached secret store
2022-06-29 12:00:24 -03:00
kay delaney
189b7f9c0b
LibraryElements: Delete invalid connections before deleting element (#50519) 2022-06-29 08:56:40 -04:00
George Robinson
ed56755dd7
Alerting: Remove duplicate error message (#51515) 2022-06-29 09:39:24 +01:00
Jguer
6d0261263c
ServiceAccounts: Add Service Account Token last used at date (#51446)
* ServiceAccounts Add api key last used at

* ServiceAccounts: LastUpdateAt tests
2022-06-28 16:42:40 +02:00
idafurjes
6c43eb0b4d
Split Create User (#50502)
* Split Create User

* Use new create user and User from package user

* Add service to wire

* Making create user work

* Replace user from user pkg

* One more

* Move Insert to orguser Service/Store

* Remove unnecessary conversion

* Cleaunp

* Fix Get User and add fakes

* Fixing get org id for user logic, adding fakes and other adjustments

* Add some tests for ourguser service and store

* Fix insert org logic

* Add comment about deprecation

* Fix after merge with main

* Move orguser service/store to org service/store

* Remove orguser from wire

* Unimplement new Create user and use User from pkg user

* Fix wire generation

* Fix lint

* Fix lint - use only User and CrateUserCommand from user pkg

* Remove User and CreateUserCommand from models

* Fix lint 2
2022-06-28 14:32:25 +02:00
Emil Tullstedt
7d815a1db5
Alerting: Use google/uuid instead of gofrs/uuid (#51242) 2022-06-28 11:57:24 +02:00
George Robinson
f04dfc589c
Alerting: Add support for images in Pushover alerts (#51372) 2022-06-28 09:40:01 +01:00
George Robinson
5053468c65
Alerting: Add support for images in Telegram (#51433) 2022-06-28 09:39:40 +01:00
Ryan McKinley
b6a9b9804d
Plugin admin: Add a page to show where panel plugins are used in dashboards (#50909) 2022-06-27 20:23:43 -04:00
Jean-Philippe Quéméner
cd0fefec5b
Alerting: change optimistic lock to use proper insert select (#51461)
* Alerting: change optimistic lock to proper insert select

* remove debug logging

* fix postgres

* fix mysql

* remove empty line for go-lint

* add some docs

* use constants
2022-06-28 00:20:21 +02:00
Yuriy Tseretyan
94e709fdcb
Alerting: Simplify eval.Evaluator interface (#51463)
* remove ExpressionService from argument list of Evaluator's methods
2022-06-27 17:40:44 -04:00
Jean-Philippe Quéméner
bf255965a2
Alerting: prevent the use of the same uid across all contact points (#51440)
* Alerting: prevent the use of the same uid across all contact points

* Update pkg/services/ngalert/provisioning/contactpoints.go

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-06-27 12:57:47 -04:00
Kristin Laemmert
945f015770
backend/datasources: move datasources models into the datasources service package (#51267)
* backend/datasources: move datasources models into the datasources service pkg
2022-06-27 12:23:15 -04:00
Yuriy Tseretyan
78c012df65
move eval_conditions to API models package (#51447) 2022-06-27 11:52:41 -04:00
Alexander Emelin
120c92b950
Search: Fix indexing - re-index after initial provisioning (#50959) 2022-06-27 18:11:08 +03:00
Ashley Harrison
ee3f4f1709
Navigation: Display Starred dashboards in the Navbar (#51038)
* remove feature toggle, add empty state and fix bug with initial starring

* Extract empty message into lingui

* remove full stop

* add empty message in the backend

* remove unused import

* translate starred + empty starred states

* betterer changes
2022-06-27 15:41:00 +01:00
Vardan Torosyan
f1661166b2
Service accounts: Grafana service accounts are enabled by default (#51402)
* Remove feature flag for service accounts

* Fix failing tests and remove remaining usage

* Fix failing tests and remove remaining usage
2022-06-27 10:22:49 +02:00
Sofia Papagiannaki
1399ab50b3
API: Universal swagger generation (#51033) 2022-06-27 10:54:31 +03:00
Jguer
0689c5839a
Auth: Add option for case insensitive login (#49262)
* add case insensitive option

* treat id as case insensitive

* Users: Add integration tests for case insensitive querying

* Prefer config struct to global variable

* change key to case_insensitive_login

* impede conflicting users from logging in

* add tests for impeding user retrieval if conflicting

* nits and picks

Co-authored-by: gamab <gabi.mabs@gmail.com>

* Add check in transaction for conflicting user

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

* add update tests

* skip on mysql

* add custom messages for user admin view

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

* nit: extra else

* linting mistake

Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-24 16:59:45 +02:00
George Robinson
dc68213114
Alerting: Remove fmt.Println from Threema (#51380) 2022-06-24 14:50:53 +01:00
Ezequiel Victorero
9e80e44b45
Public Dashboards: fix updating public dashboard configuration (#51350)
* Public Dashboards: fix updating public dashboard configuration
2022-06-23 18:44:59 -03:00
Alexander Weaver
0d9389e1f4
Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731)
* Extend template and generate

* Generate and fix up alertmanager endpoints

* Prometheus routes

* fix up Testing endpoints

* touch up ruler API

* Update provisioning and fix 500

* Drop dead code

* Remove more dead code

* Resolve merge conflicts
2022-06-23 15:13:39 -05:00
Ryan McKinley
dd5a3b7747
Heatmap: Replace the heatmap panel with new implementation (#50229) 2022-06-23 11:48:28 -07:00
Ezequiel Victorero
4c4d6fd425
PublicDashboards: collect stats for public dashboards (#50553)
* PublicDashboards: collect stats for public dashboards
2022-06-23 12:02:57 -03:00
Karl Persson
b9bb0513e3
Remove version property from fixed roles (#51298) 2022-06-23 12:09:03 +02:00
Selene
ecc15a2f71
KVStore: Extend kvstore to retrieve all items (#50848)
* Extend kvstore to retrieve all items

* Fix comment

* Fix tests

* Change test order

* Move test outside to avoid order conditions

* Update Items to GetAll function and return a map

* Add explanation of map result

* Add description comment

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-06-23 11:12:07 +02:00
owensmallwood
1802cc8aca
Add correct table definition for migrations for old dashboard_public schema (#51292)
Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
2022-06-22 15:35:33 -08:00
Jeff Levin
d076bedb5e
public dashboards: finalize db schema & v1 feature complete (#50467)
This PR completes public dashboards v1 functionality and simplifies public dashboard conventions. It exists as a large PR so that we are not making constant changes to the database schema.

models.PublicDashboardConfig model replaced with models.PublicDashboard directly
dashboard_public_config table renamed to dashboard_public
models.Dashboard.IsPublic removed from the dashboard and replaced with models.PublicDashboard.isEnabled
Routing now uses a uuid v4 as an access token for viewing a public dashboard anonymously, PublicDashboard.Uid only used as database identifier
Frontend utilizes uuid for auth'd operations and access token for anonymous access
Default to time range defined on dashboard when viewing public dashboard
Add audit fields to public dashboard

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>, Ezequiel Victorero <ezequiel.victorero@grafana.com>, Jesse Weaver <jesse.weaver@grafana.com>
2022-06-22 13:58:52 -08:00