Will Browne
a8577c21ba
Plugins: Migrate PluginStore mock to pre-existing fakes package ( #71664 )
...
* migrate to existing fakes package
* fix imports
2023-07-17 10:21:44 +00:00
Will Browne
162dde5bdd
Plugins: Use suffix for plugin directory ( #71375 )
...
* plugin dir suffix
* fix whitespace
* fix cli
* fix tests
* fixup
* simplify
* undo uninstall changes
2023-07-14 11:49:05 +02:00
Andres Martinez Gotor
025465e611
Chore: Update plugin schema with service registration info ( #70692 )
2023-06-27 08:47:25 +02:00
Andres Martinez Gotor
4ff0abd0d1
SaveExternalService (OAuth) on plugin load ( #69764 )
2023-06-26 16:38:43 +02:00
Will Browne
1fd4953833
Plugins: Optimize creation of Golang errors and slices ( #69448 )
...
* tidy up
* fix tests
2023-06-07 17:22:43 +02:00
Will Browne
12dc56ad0c
Plugins: Refactor plugin repository API ( #69063 )
...
* support grafana wildcard version
* undo go.mod changes
* tidy
* flesh out tests
* refactor
* add tests
* tidy naming
* undo some changes
* split interfaces
* separation
* update new signature
* simplify
* update var namings
* unexport types
* introduce opts pattern
* reorder test
* fix compat checks
* middle ground
* unexport client
* move back
* fix tests
* inline logger
* make client usable
* use fake logger
* tidy errors
* remove unused types
* fix test
* review fixes
* rework compatibility
* adjust installer
* fix tests
* opts => cfg
* remove unused var
* fix var name
2023-05-30 11:48:52 +02:00
Giuseppe Guerra
bfe1b68800
Plugins: Fs: Add option to access unallowed files in dev mode ( #66492 )
...
* Plugins: Fs: Add option to access unallowed files in dev mode
* Plugins: Fs: allow accessing unallowed files only when in dev mode
* Plugins: Fs: Add ProvideLocalFinder
* Plugins: FS: Pass whole config in NewLocalFinder()
* Plugins: FS: Add AllowListLocalFS
* Plugins: FS: Fix some tests
* Plugins: FS: Update tests
* Plugins: FS: Removed dead code
* Plugins: FS: Add tests for AllowListFS
* Plugins: FS: Update comments
* Plugins: FS: Use variadic arguments for allow list rather than map
* Plugins: FS: Remove unnecessary log
* Plugins: FS: Do not escape plugin root dir
* Fix merge conflict
* Plugins: FS: Update comments
* Plugins: FS: PR review changes
* Fix merge conflict
* Fix tests
* Cleanup
* Fix flaky test
* Changes from PR review
* Lint
* Add comment to LocalFS.Remove
* Fix Windows
* Renamed devMode to production
2023-04-27 10:26:15 +02:00
Will Browne
739c7f1c68
Plugins: Simplify plugin file removal ( #66115 )
...
* make explicit class check when attempting to remove plugin
* simplify plugin file tracking
* fix test
* apply feedback
* fix linter
2023-04-20 11:52:59 +02:00
Andres Martinez Gotor
52f39e6fa0
Chore: Soft failure in plugin initialization ( #66210 )
2023-04-12 12:34:16 +03:00
Will Browne
7bbe255150
Plugins: Add file store abstraction for handling plugin files ( #65432 )
...
* add file store
* fix markdown fetch bug
* add markdown tests
* fix var name
2023-03-29 12:55:55 +02:00
Will Browne
1387fec51d
Plugins: Markdown fetch retry with lowercase ( #65384 )
...
* retry with lowercase
* undo incorrect err check
* re-add defer to close file
* fix test
2023-03-27 19:44:06 +03:00
Will Browne
ee2dd62a1f
Plugins: Refactor loader + finder to support multiple sourcing methods ( #64735 )
...
* it's cdn time
* tidy body closing
* auto signed
* fix close
* update log name
* remove comments
2023-03-20 14:35:49 +01:00
lean.dev
0b0140b761
Licensing: Send the app url to plugin ( #64258 )
2023-03-08 14:44:04 -03:00
Will Browne
68df83c86d
Plugins: Add Plugin FS abstraction ( #63734 )
...
* unexport pluginDir from dto
* first pass
* tidy
* naming + add mutex
* add dupe checking
* fix func typo
* interface + move logic from renderer
* remote finder
* remote signing
* fix tests
* tidy up
* tidy markdown logic
* split changes
* fix tests
* slim interface down
* fix status code
* tidy exec path func
* fixup
* undo changes
* remove unused func
* remove unused func
* fix goimports
* fetch remotely
* simultaneous support
* fix linter
* use var
* add exception for gosec warning
* fixup
* fix tests
* tidy
* rework cfg pattern
* simplify
* PR feedback
* fix dupe field
* remove g304 nolint
* apply PR feedback
* remove unnecessary gosec nolint
* fix finder loop and update comment
* fix map alloc
* fix test
* remove commented code
2023-03-07 16:47:02 +01:00
Will Browne
ec82719372
Plugins: Introduce plugin package specific logger ( #62204 )
...
* refactor
* implement with infra log for now
* undo moving
* update package name
* update name
* fix tests
* update pretty signature
* update naming
* simplify
* fix typo
* delete comment
* fix import
* retrigger
2023-02-28 16:10:27 +01:00
Will Browne
ab8de1a0e3
Plugins: Add simple plugin sources service ( #63814 )
...
add simple plugin sources svc
2023-02-28 15:27:11 +01:00
Will Browne
c54aa18cd8
Plugins: Add tailored interface for plugins licensing needs ( #61045 )
...
* tailored licensing service
* appease linter
* fix
* retrigger
2023-01-18 18:02:54 +01:00
Gabriel MABILLE
30fae33f66
RBAC: Allow role registration for plugins ( #57387 )
...
* Picking role registration from OnCall POC branch
* Fix test
* Remove include actions from this PR
* Removing unused permission
* Adding test to DeclarePluginRoles
* Add testcase to RegisterFixed role
* Additional test case
* Adding tests to validate plugins roles
* Add test to plugin loader
* Nit.
* Scuemata validation
* Changing the design to decouple accesscontrol from plugin management
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Fixing tests
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Add missing files
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Remove feature toggle check from loader
* Remove feature toggleimport
* Feedback
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Fix test'
* Make plugins.RoleRegistry interface typed
* Remove comment question
* No need for json tags anymore
* Nit. log
* Adding the schema validation
* Remove group to take plugin Name instead
* Revert sqlstore -> db
* Nit.
* Nit. on tests
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Update pkg/services/accesscontrol/plugins.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Remove unecessary method. Update test name.
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Fix linting
* Update cue descriptions
* Fix test
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: marefr <marcus.efraimsson@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-07 11:30:45 +01:00
Torkel Ödegaard
e31cb93ec0
NavTree: Make it possible to configure where in nav tree plugins live ( #55484 )
...
* NewIA: Plugin nav config
* progress
* Progress
* Things are working
* Add monitoring node
* Add alerts and incidents
* added experiment with standalone page
* Refactoring by adding a type for navtree root
* First test working
* More tests
* more tests
* Progress on richer config and sorting
* Sort weight working
* Path config
* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing
* fixed index routes
* removed file
* Fixes
* Fixing tests
* Fixing more tests and adding support for weight config
* Updates
* Remove unused fake
* More fixes
* Minor tweak
* Minor fix
* Can now control position using sortweight even when existing items have no sortweight
* Added tests for frontend standalone page logic
* more tests
* Remove unused fake and fixed lint issue
* Moving reading settings to navtree impl package
* remove nav_id setting prefix
* Remove old test file
* Fix trailing newline
* Fixed bug with adding nil node
* fixing lint issue
* remove some code we have to rethink
* move read settings to PrivideService and switch to util.SplitString
2022-09-28 08:29:35 +02:00
Will Browne
d0d8544ded
Plugins: Create single point of entry for adding / removing plugins ( #55463 )
...
* split out plugin manager
* remove whitespace
* fix tests
* split up tests
* updating naming conventions
* simplify manager
* tidy
* explorations
* fix build
* tidy
* fix tests
* add logger helper
* pass the tests
* tidying
* fix tests
* tidy and re-add test
* store depends on loader
* enrich tests
* fix test
* undo gomod changes
2022-09-23 14:27:01 +02:00
Will Browne
cd7a464f7e
Plugins: Ensure plugin uninstall success for "pre-installed" community plugins ( #55322 )
...
* track pre-installed external plugins in store
* fix tests
2022-09-19 12:14:30 +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