Commit Graph

14 Commits

Author SHA1 Message Date
Will Browne
b25ea75bac
Plugins: Add secure JSON fields to plugin setting DTO (#55313)
* add secure JSON fields to plugin setting DTO

* add nil pointer fix

* adding secureJsonFields to the plugin meta.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-09-21 12:20:11 +02:00
Karl Persson
d1b9849946
RBAC: Fix background users to include permissions (#55147)
* RBAC: add function to construct background users

* PluginDashboards: Set rbac permissions for user

* Dashboards: use background user constructor
2022-09-14 11:26:05 +02:00
Will Browne
4a707e2a88
Plugins: Split plugin manager into smaller components (#54384)
* split out plugin manager

* remove whitespace

* fix tests

* split up tests

* updating naming conventions

* simplify manager

* tidy

* add more fakes

* testing time

* add query verif to int test

* renaming

* add process tests

* tidy up manager tests

* add extra case to int test

* add more coverage to store and process tests

* remove comment

* fix capatilization

* init on provide

* remove addfromsource from API
2022-08-30 17:30:43 +02:00
idafurjes
a14621fff6
Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343)
* Chore: Add user service method SetUsingOrg

* Chore: Add user service method GetSignedInUserWithCacheCtx

* Use method GetSignedInUserWithCacheCtx from user service

* Fix lint after rebase

* Fix lint

* Fix lint error

* roll back some changes

* Roll back changes in api and middleware

* Add xorm tags to SignedInUser ID fields
2022-08-11 13:28:55 +02:00
idafurjes
6afad51761
Move SignedInUser to user service and RoleType and Roles to org (#53445)
* Move SignedInUser to user service and RoleType and Roles to org

* Use go naming convention for roles

* Fix some imports and leftovers

* Fix ldap debug test

* Fix lint

* Fix lint 2

* Fix lint 3

* Fix type and not needed conversion

* Clean up messages in api tests

* Clean up api tests 2
2022-08-10 11:56:48 +02:00
Serge Zaitsev
ae9491c3a7
Chore: Make test tracer noop and return no errors (#50797) 2022-06-15 12:40:41 +02:00
Serge Zaitsev
0b55c41d05
Chore: Remove global bus variable (#50765)
* Chore: Remove global bus variable

* fix bus in tests
2022-06-14 16:07:41 +02:00
owensmallwood
1bb2d2599c
Public Dashboards: Pubdash panels get data from pubdash api (#50556)
* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Gets the panel data from the pubdash query api

* Adds tests to make sure we get the correct api url from retrieving panel data

* Public dashboard query API

* Create new API on service for building metric request

* Flesh out testing, implement BuildPublicDashboardMetricRequest

* Test for errors and missing panels

* WIP: Test for multiple datasources

* Refactor tests, add supporting code for multiple datasources

* Handle queries from multiple datasources

* Replace dashboard time range with pubdash time range settings

* Fix comments from review, build failure

* removes changes to DataSourceWithBackend.ts regarding getting the pubdash panel query url. Going to do this in a new class, PublicDashboardDataSource.ts

* Include pubdash Uid in dashboard meta

* Creates new PublicDashboardDataSource.ts and adds test

* Passes pubdash uid down to PanelQueryRunner.ts to a PublicDashboardDatasource can be chosen when were looking at a public dashboard

* removes comment

* checks for error when unmarshalling json

* Only replace dashboard time settings with pubdash time settings when pubdash time settings exist

* formatting and added comment

Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-13 18:03:43 -06:00
Serge Zaitsev
18e93c7077
Chore: Remove bus (#47511)
* Chore: Remove bus

* remove unused const
2022-04-08 16:15:06 +02:00
Will Browne
bda3f860a8
Plugins: Add plugin settings DTO (#46283)
* add clearer service layer

* re-order frontend settings for clarity

* fix fetch fail

* fix API response

* fix mockstore

* in -> where
2022-03-18 20:49:13 +01:00
Marcus Efraimsson
6c7d326499
Plugins: Refactor GetPluginDashboards/LoadPluginDashboard (#46316)
Refactors GetPluginDashboards/LoadPluginDashboard by moving database 
interaction from plugin management to the plugindashboards service.

Fixes #44553

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-03-10 18:38:04 +01:00
Will Browne
b54b438a24
Plugins: Refactor plugin settings service (#45967)
* tests passing

* rename and rejig

* move interface to package and rename to Store

* new package

* add import alias
2022-03-03 11:39:15 +01:00
idafurjes
2334b98802
Use PluginSettingsService instead of SQLStore methods in plugins (#45480)
* Use PluginSettingsService instead of SQLStore in plugins

* Fix pluginproxy use of pluginsettings methods

* Fix additional pluginsettings methods

* Remove dispatch from plugindashboards

* Fix lint and adjust mock

* Remove unused pluginsettings

* Rename pluginsetting Service and ServiceImpl and add binding to wire

* Move pluginsettings binding in wire file
2022-02-25 11:29:18 +01:00
Marcus Efraimsson
94edd7a762
Plugins: Refactor plugin dashboards (#44315)
Moves/refactor Grafana specific functionality related to plugin dashboards 
out to specific services for importing dashboards and keep app plugin dashboards
up-to-date.

Fixes #44257
2022-01-28 10:28:33 +01:00