grafana/pkg/api
Will Browne b80fbe03f0
Plugins: Refactor Plugin Management (#40477)
* add core plugin flow

* add instrumentation

* move func

* remove cruft

* support external backend plugins

* refactor + clean up

* remove comments

* refactor loader

* simplify core plugin path arg

* cleanup loggers

* move signature validator to plugins package

* fix sig packaging

* cleanup plugin model

* remove unnecessary plugin field

* add start+stop for pm

* fix failures

* add decommissioned state

* export fields just to get things flowing

* fix comments

* set static routes

* make image loading idempotent

* merge with backend plugin manager

* re-use funcs

* reorder imports + remove unnecessary interface

* add some TODOs + remove unused func

* remove unused instrumentation func

* simplify client usage

* remove import alias

* re-use backendplugin.Plugin interface

* re order funcs

* improve var name

* fix log statements

* refactor data model

* add logic for dupe check during loading

* cleanup state setting

* refactor loader

* cleanup manager interface

* add rendering flow

* refactor loading + init

* add renderer support

* fix renderer plugin

* reformat imports

* track errors

* fix plugin signature inheritance

* name param in interface

* update func comment

* fix func arg name

* introduce class concept

* remove func

* fix external plugin check

* apply changes from pm-experiment

* fix core plugins

* fix imports

* rename interface

* comment API interface

* add support for testdata plugin

* enable alerting + use correct core plugin contracts

* slim manager API

* fix param name

* fix filter

* support static routes

* fix rendering

* tidy rendering

* get tests compiling

* fix install+uninstall

* start finder test

* add finder test coverage

* start loader tests

* add test for core plugins

* load core + bundled test

* add test for nested plugin loading

* add test files

* clean interface + fix registering some core plugins

* refactoring

* reformat and create sub packages

* simplify core plugin init

* fix ctx cancel scenario

* migrate initializer

* remove Init() funcs

* add test starter

* new logger

* flesh out initializer tests

* refactoring

* remove unused svc

* refactor rendering flow

* fixup loader tests

* add enabled helper func

* fix logger name

* fix data fetchers

* fix case where plugin dir doesn't exist

* improve coverage + move dupe checking to loader

* remove noisy debug logs

* register core plugins automagically

* add support for renderer in catalog

* make private func + fix req validation

* use interface

* re-add check for renderer in catalog

* tidy up from moving to auto reg core plugins

* core plugin registrar

* guards

* copy over core plugins for test infra

* all tests green

* renames

* propagate new interfaces

* kill old manager

* get compiling

* tidy up

* update naming

* refactor manager test + cleanup

* add more cases to finder test

* migrate validator to field

* more coverage

* refactor dupe checking

* add test for plugin class

* add coverage for initializer

* split out rendering

* move

* fixup tests

* fix uss test

* fix frontend settings

* fix grafanads test

* add check when checking sig errors

* fix enabled map

* fixup

* allow manual setup of CM

* rename to cloud-monitoring

* remove TODO

* add installer interface for testing

* loader interface returns

* tests passing

* refactor + add more coverage

* support 'stackdriver'

* fix frontend settings loading

* improve naming based on package name

* small tidy

* refactor test

* fix renderer start

* make cloud-monitoring plugin ID clearer

* add plugin update test

* add integration tests

* don't break all if sig can't be calculated

* add root URL check test

* add more signature verification tests

* update DTO name

* update enabled plugins comment

* update comments

* fix linter

* revert fe naming change

* fix errors endpoint

* reset error code field name

* re-order test to help verify

* assert -> require

* pm check

* add missing entry + re-order

* re-check

* dump icon log

* verify manager contents first

* reformat

* apply PR feedback

* apply style changes

* fix one vs all loading err

* improve log output

* only start when no signature error

* move log

* rework plugin update check

* fix test

* fix multi loading from cfg.PluginSettings

* improve log output #2

* add error abstraction to capture errors without registering a plugin

* add debug log

* add unsigned warning

* e2e test attempt

* fix logger

* set home path

* prevent panic

* alternate

* ugh.. fix home path

* return renderer even if not started

* make renderer plugin managed

* add fallback renderer icon, update renderer badge + prevent changes when renderer is installed

* fix icon loading

* rollback renderer changes

* use correct field

* remove unneccessary block

* remove newline

* remove unused func

* fix bundled plugins base + module fields

* remove unused field since refactor

* add authorizer abstraction

* loader only returns plugins expected to run

* fix multi log output
2021-11-01 10:53:33 +01:00
..
apierrors Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
avatar remove crit and trace (#40320) 2021-10-26 17:36:24 +02:00
datasource Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
dtos Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
frontendlogging Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
navlinks AccessControl: frontend changes for adding FGAC to licensing (#39484) 2021-10-05 14:54:26 +01:00
pluginproxy Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
response [Alerting] Forking LoTex ruler (#32138) 2021-03-19 10:32:13 -04:00
routing Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
static Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
acl.go Chore: Propagate context for dashboard guardian (#39201) 2021-09-23 17:43:32 +02:00
admin_provisioning_test.go Revert "Revert "AccessControl: Implement a way to register fixed roles (#35641)" (#37397)" (#37535) 2021-08-04 14:44:37 +02:00
admin_provisioning.go Chore: Propagate context for data source provisioning (#40235) 2021-10-18 17:06:19 +02:00
admin_test.go Access Control: Add fine-grained access control to GET stats and settings handlers (#35622) 2021-06-14 17:36:48 +02:00
admin_users_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
admin_users.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
admin.go Chore: Add context to star and stats (#39591) 2021-09-28 17:54:45 +02:00
alerting_test.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
alerting.go Chore: Propagate context for search (#41010) 2021-10-28 11:29:07 +02:00
annotations_test.go Annotations: Adds tags endpoint (#36199) 2021-06-30 13:42:54 +02:00
annotations.go Chore: Propagate context for dashboard guardian (#39201) 2021-09-23 17:43:32 +02:00
api.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
apikey.go Access Control: Add service accounts (#38994) 2021-10-20 14:36:11 +02:00
app_routes.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
basic_auth_test.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
basic_auth.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
common_test.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
dashboard_permission_test.go Forbid creation of dashboard permissions with both a user and a team (#40104) 2021-10-13 12:16:58 -06:00
dashboard_permission.go Forbid creation of dashboard permissions with both a user and a team (#40104) 2021-10-13 12:16:58 -06:00
dashboard_snapshot_test.go Chore: Refactor securedata to remove global encryption calls from dashboard snapshots (#38714) 2021-09-01 13:05:15 +02:00
dashboard_snapshot.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
dashboard_test.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
dashboard.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
dataproxy.go Data Source Proxy: Migrate proxy to its own service and make more extensible (#31927) 2021-03-17 13:10:40 -04:00
datasources_test.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
datasources.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
fakes.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
folder_permission_test.go Chore: Propagate context for dashboard guardian (#39201) 2021-09-23 17:43:32 +02:00
folder_permission.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
folder_test.go Chore: GetDashboardQuery should be dispatched using DispatchCtx (#36877) 2021-09-14 16:08:04 +02:00
folder.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
frontend_logging_test.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
frontend_logging.go Logging: sourcemap support for frontend stacktraces (#30590) 2021-02-04 08:37:28 +02:00
frontend_metrics.go FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus (#32593) 2021-04-01 20:04:02 +02:00
frontendsettings_test.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
frontendsettings.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
grafana_com_proxy.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
health_test.go Context: Add context to /api/health calls (#40031) 2021-10-11 14:35:03 +02:00
health.go Context: Add context to /api/health calls (#40031) 2021-10-11 14:35:03 +02:00
http_server_test.go Tests: Batch of GoConvey to Testify conversions (#27008) 2020-08-14 14:43:25 +02:00
http_server.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
index.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
ldap_debug_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
ldap_debug.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
login_oauth_test.go OAuth: Support PKCE (#39948) 2021-10-13 16:45:15 +02:00
login_oauth.go remove crit and trace (#40320) 2021-10-26 17:36:24 +02:00
login_test.go Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions (#38865) 2021-10-07 17:33:50 +03:00
login.go remove crit and trace (#40320) 2021-10-26 17:36:24 +02:00
metrics.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
org_invite.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
org_test.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
org_users_test.go Create search filters by interface (#39843) 2021-10-07 16:06:16 +02:00
org_users.go Chore: Add context to org users (#39526) 2021-09-27 16:43:16 +02:00
org.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
password.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
playlist_play.go Chore: Propagate context for search (#41010) 2021-10-28 11:29:07 +02:00
playlist.go Chore: Propagate context for search (#41010) 2021-10-28 11:29:07 +02:00
plugins_test.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
plugins.go Plugins: Refactor Plugin Management (#40477) 2021-11-01 10:53:33 +01:00
preferences_test.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
preferences.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
quota_test.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
quota.go AccessControl: Add FGAC to orgs endpoints (#39579) 2021-10-27 13:13:59 +02:00
render.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
roles.go AccessControl: Create FGAC roles for orgs (#40526) 2021-10-27 11:01:21 +02:00
search.go Chore: Propagate context for search (#41010) 2021-10-28 11:29:07 +02:00
short_url_test.go Chore: Refactor short url api test (#35051) 2021-06-01 20:34:59 +02:00
short_url.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
signup.go Login: Replace command dispatch by explicit call (#32088) 2021-03-18 17:16:56 +01:00
stars.go Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516) 2021-02-27 18:04:28 +01:00
team_members_test.go Add an option to hide certain users in the UI (#28942) 2020-11-24 12:10:32 +01:00
team_members.go Chore: Add context to team (#40504) 2021-10-18 14:02:39 +02:00
team_test.go Chore: replace macaron with web package (#40136) 2021-10-11 14:30:59 +02:00
team.go Chore: Add context to team (#40504) 2021-10-18 14:02:39 +02:00
user_test.go Create search filters by interface (#39843) 2021-10-07 16:06:16 +02:00
user_token_test.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
user_token.go add context to getsignedinUser calls (#35963) 2021-06-21 07:51:33 +02:00
user.go Chore: Add context to user (#39649) 2021-10-04 15:46:09 +02:00
utils.go Permissions: Validate against Team/User permission role update (#29101) 2020-11-18 15:36:41 +01:00