Arve Knudsen
87c3a2b790
PluginManager: Make Plugins, Renderer and DataSources non-global ( #31866 )
...
* PluginManager: Make Plugins and DataSources non-global
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Replace outdated command
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* DashboardService: Ensure it gets constructed with necessary parameters
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove FocusConvey
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove dead code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo interface changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Backend: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Rename to DataSourceCount
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Consolidate dashboard interfaces into one
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix dashboard integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-17 16:06:10 +01:00
Arve Knudsen
1716de88b5
DashboardService: Consolidate constructors ( #31886 )
...
* DashboardService: Consolidate constructors
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-12 11:51:02 +01:00
Arve Knudsen
b79e61656a
Introduce TSDB service ( #31520 )
...
* Introduce TSDB service
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-03-08 07:02:49 +01:00
Hugo Häggmark
d84cfdbb0f
LibraryPanels: Adds version column ( #31590 )
...
* Refactor: adds version column and fixes tests
* Chore: adds version check when patching the library panel
* Refactor: adds support for version in FrontEnd
2021-03-02 13:33:26 +01:00
Hugo Häggmark
4bc6a7c407
LibraryPanels: Deletes library panels during folder deletion ( #31572 )
...
* Refactor: adds permissions for library panel creation
* Refactor: checks folder permissions for patch requests
* Chore: changes after PR comments
* Refactor: adds permissions to delete
* Refactor: moves get all permission tests out of get all tests
* Chore: move out get all tests to a separate file
* Refactor: adds permissions to get handler
* Refactor: fixes a bug with getting library panels in General folder
* Refactor: adds permissions for connect/disconnect
* Refactor: adds permissions and tests for get connected dashboards
* Tests: adds tests for connected dashboards in General Folder
* LibraryPanels: Deletes library panels during folder deletion
* LibraryPanels: Deletes library panels during folder deletion
* Update pkg/api/folder.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_permissions_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: updates after PR comments
* Chore: forgot to change some function signatures
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-02 10:34:01 +01:00
Hugo Häggmark
583b94557b
LibraryPanels: Adds folder checks and permissions ( #31473 )
...
* Refactor: adds permissions for library panel creation
* Refactor: checks folder permissions for patch requests
* Chore: changes after PR comments
* Refactor: adds permissions to delete
* Refactor: moves get all permission tests out of get all tests
* Chore: move out get all tests to a separate file
* Refactor: adds permissions to get handler
* Refactor: fixes a bug with getting library panels in General folder
* Refactor: adds permissions for connect/disconnect
* Refactor: adds permissions and tests for get connected dashboards
* Tests: adds tests for connected dashboards in General Folder
2021-03-01 15:33:17 +01:00
Hugo Häggmark
466462de37
LibraryPanels: Adds permissions to getAllHandler ( #31416 )
...
* LibraryPanels: Adds permissions to getAllHandler
* Chore: adds a test to verify the permissions
* Chore: tests refactor
2021-02-24 14:06:22 +01:00
Hugo Häggmark
0a4c3b8779
LibraryPanels: Syncs panel title with name ( #31311 )
2021-02-19 06:05:21 +01:00
Hugo Häggmark
06e6bcf091
LibraryPanels: Disconnect before connect during dashboard save ( #31235 )
...
* LibraryPanels: Disconnect before connect during dashboard save
* Tests: fixed test
* Chore: updates after PR comments
* Chore: changes from context.Background() to c.Context.Req.Context()
* Chore: fixes lint issue
2021-02-16 13:00:56 +01:00
Hugo Häggmark
179f35a537
PanelLibrary: Adds library panel meta information to dashboard json ( #30770 )
2021-02-02 06:25:35 +01:00
Hugo Häggmark
0b1f5c5e32
PanelLibrary: better handling of deleted panels ( #30709 )
2021-01-29 06:11:13 +01:00
Hugo Häggmark
0a8eae2c12
PanelLibrary: changes casing of responses and adds meta property ( #30668 )
...
* PanelLibrary: changes casing of responses and adds meta property
* Chore: updates comments
* Chore: updates after PR comments
* Chore: changes casing of orgId
2021-01-28 12:36:28 +01:00
Hugo Häggmark
b7b6632a4d
PanelLibrary: adding library panels to Dashboard Api ( #30278 )
...
* Wip: First naive impl
* Chore: fix after merge
* Chore: changes after PR comments
* Chore: removes unused types
* Chore: adds feature toggle
* Refactor: adds library panels cleanup and connect when storing dashboards
* Refactor: adds feature toggle
* Update pkg/services/librarypanels/librarypanels.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Refactor: adds disconnect library panels when deleting a dashboard
* Chore: changes after PR comments
* Tests: adds tests for LoadLibraryPanelsForDashboard
* Tests: adds tests for CleanLibraryPanelsForDashboard
* Tests: adds tests for ConnectLibraryPanelsForDashboard
* Tests: adds tests for DisconnectLibraryPanelsForDashboard and small refactor
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Refactor: deletes all connections in one call and connects all in the same transaction
* Chore: adds better comments
* Chore: changes after PR comments
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-20 09:28:10 +01:00
Hugo Häggmark
3d41267fc4
Chore: Moves common and response into separate packages ( #30298 )
...
* Chore: moves common and response into separate packages
* Chore: moves common and response into separate packages
* Update pkg/api/utils/common.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: changes after PR comments
* Chore: move wrap to routing package
* Chore: move functions in common to response package
* Chore: move functions in common to response package
* Chore: formats imports
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-15 14:43:20 +01:00
Hugo Häggmark
d6449c16c7
LibraryPanels: adds connections ( #30212 )
...
* LibraryPanels: adds connections
* Chore: testing signing verification
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: changes after PR comments
* Chore: changes after PR comments
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-12 12:57:40 +01:00
Hugo Häggmark
40d17af2e3
PanelLibrary: Add PATCH to the API ( #29956 )
...
* PanelLibrary: Adds uid and renames title to name
* Chore: removing lines
* PanelLibrary: Adds update to api
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/database.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/librarypanels_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: changes after PR comments
* Replace references to put with patch
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-23 12:42:52 +01:00
Arve Knudsen
be62dc4d2f
librarypanels: Fix JSON field casing in tests ( #29954 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-22 14:52:43 +01:00
Hugo Häggmark
35a755fe50
PanelLibrary: Adds uid and renames title to name ( #29944 )
...
* PanelLibrary: Adds uid and renames title to name
* Chore: removing lines
* Chore: updates comments
* Chore: changes after PR comments
2020-12-22 12:00:41 +01:00
Hugo Häggmark
433b861093
PanelLibrary: Adds get and getAll to the api ( #29772 )
...
* PanelLibrary: Adds get to the API
* Refactor: adds tests for get and getAll and cleans up other tests
* Refactor: changed name on DTO
* Update pkg/services/librarypanels/api.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/librarypanels/database.go
2020-12-21 09:40:27 +01:00
Hugo Häggmark
47afe1fa42
PanelLibrary: Adds delete Api ( #29741 )
...
* PanelLibrary: Adds delete
* Chore: fixes some comments
* Chore: changes after PR comments
* Refactor: deletes from correct org
2020-12-11 06:08:32 +01:00
Hugo Häggmark
941ba1d2f7
PanelLibrary: Adds api and db to create Library/Shared/Reusable Panel ( #29642 )
...
* PanelLibrary: Adds panellib table
* Refactor: removes drop table migration
* Refactor: fixes spelling mistake
* Refactor: changes after PR comments
* Refactor: some more renames
* PanelLibrary: Adds api and db to create Library/Shared/Reusable Panel
* Refactor: reverts SqlStore change and uses RegisterOverride instead
* Refactor: fixes lint error
* Refactor: fixes imports
* Refactor: reverts unintentional changes
* Refactor: Adds repository
* Revert "Refactor: Adds repository"
This reverts commit 4c46e8a6c4
.
* Refactor: changes after PR comments
* Refactor: Simplfies further
* Chore: fixes linting
* Chore: Changes after PR comments
* Update pkg/services/librarypanels/api.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: fixes import after commited suggestion
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-09 13:10:18 +01:00
Hugo Häggmark
562a1c36b1
PanelLibrary: Adds library_panel table ( #29565 )
...
* PanelLibrary: Adds panellib table
* Refactor: removes drop table migration
* Refactor: fixes spelling mistake
* Refactor: changes after PR comments
* Refactor: some more renames
2020-12-03 15:18:10 +01:00