Ryan McKinley
5d66194ec5
FeatureFlags: define features outside settings.Cfg (take 3) ( #44443 )
2022-01-26 09:44:20 -08:00
Agnès Toulet
65bdb3a899
FeatureFlags: Revert managing feature flags outside of settings.Cfg ( #44382 )
...
* Revert "FeatureToggles: register all enterprise feature toggles (#44336 )"
This reverts commit f53b3fb007
.
* Revert "FeatureFlags: manage feature flags outside of settings.Cfg (#43692 )"
This reverts commit f94c0decbd
.
2022-01-24 16:08:05 +01:00
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg ( #43692 )
2022-01-20 13:42:05 -08:00
Isabella Siu
2c3bed1f4b
CloudWatch: remove unused "live" log code ( #44185 )
2022-01-20 08:58:39 -05:00
idafurjes
7936c4c522
Rename AddHandlerCtx to AddHandler ( #43557 )
2021-12-28 16:08:07 +01:00
Ryan McKinley
c0ff685d3b
Live: support query execution with live RPC ( #43118 )
...
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-12-14 18:38:20 +01:00
idafurjes
e6123bc3ef
Replace AddHandler with AddHandlerCtx in tests ( #42585 )
2021-12-01 15:43:31 +01:00
Serge Zaitsev
d9cdcb550e
Chore: Refactor api handlers to use web.Bind ( #42199 )
...
* Chore: Refactor api handlers to use web.Bind
* fix comments
* fix comment
* trying to fix most of the tests and force routing.Wrap type check
* fix library panels tests
* fix frontend logging tests
* allow passing nil as a response to skip writing
* return nil instead of the response
* rewrite login handler function types
* remove handlerFuncCtx
* make linter happy
* remove old bindings from the libraryelements
* restore comments
2021-11-29 10:18:01 +01:00
Alexander Emelin
345f0b658d
Live: crud for remote write backends ( #40147 )
2021-11-05 12:13:40 +03:00
idafurjes
47f6bb3583
Chore: Add context to org ( #40685 )
...
* Add context to org
* Rebase
* Fix rebase
2021-11-03 11:31:56 +01:00
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
Serge Zaitsev
57fcfd578d
Chore: replace macaron with web package ( #40136 )
...
* replace macaron with web package
* add web.go
2021-10-11 14:30:59 +02:00
Tania B
990911a3b9
Chore: Cleanup usageStatsMock duplication ( #39710 )
...
* Chore: Cleanup usageStatsMock duplication
* Remove making a new slice for UsageStatsMock
2021-09-29 09:59:02 +03:00
Agnès Toulet
57b20335e6
LibraryPanels: Refactor to use context.Context instead of models.ReqContext ( #39561 )
2021-09-27 09:04:36 +02:00
Tania B
b9acdce837
Chore: Fix grafana live stats reset when sending usage stats ( #39558 )
2021-09-23 12:55:00 +03:00
Joan López de la Franca Beltran
c75737c808
Usage Stats: Decouple from GrafanaLive ( #39512 )
...
* Usage Stats: Decouple from GrafanaLive
2021-09-22 16:28:40 +02:00
Hugo Häggmark
2696be49b9
LibraryPanels: Improves export and import of library panels between orgs ( #39214 )
...
* Chore: adds tests to reducer
* Refactor: rewrite state
* Refactor: adds library panels to export
* wip
* Refactor: adds import library panels
* Refactor: changes UI
* Chore: pushing drone
* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Update public/app/features/manage-dashboards/components/ImportDashboardForm.tsx
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Chore: reverted unknown merge changes
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-20 10:58:24 +02:00
Serge Zaitsev
c3ab2fdeb7
Macaron: remove custom Request type ( #37874 )
...
* remove macaron.Request, use http.Request instead
* remove com dependency from bindings module
* fix another c.Req.Request
2021-09-01 11:18:30 +02:00
Arve Knudsen
78596a6756
Migrate to Wire for dependency injection ( #32289 )
...
Fixes #30144
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>
2021-08-25 15:11:22 +02:00
Marcus Efraimsson
11d03f7961
Chore: Use context.Context for the get home dashboard API endpoint ( #36735 )
...
Use context.Context for the get home dashboard API endpoint.
Ref #36734
2021-07-16 12:40:03 +02:00
Alexander Emelin
5bbf45592e
Live: rely on app url for origin check ( #35983 )
2021-06-23 19:51:03 +03:00
Carl Bergquist
b40e78a943
Instrumentation: add context.Context to the dashboard get flow. ( #34955 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-06-15 16:08:27 +02:00
Dimitris Sotirakis
1c49986b2f
Chore: Remove endpoints that contain the slug field ( #35104 )
...
* Chore: Remove endpoints that contain the slug field
* More cleanups
* Lint fixes
* Remove unnecessary funcs
* Cleanup frontend code
* Remove deprecated endpoints from docs
* Revert change according to reviewer's comments
2021-06-03 16:20:13 +03:00
Serge Zaitsev
ef0fab9aa5
Expose folder UID in dashboards API response ( #33991 )
...
* expose folder UID in dashboards API response, import dashboards into folders by folder UID
* handle bad folder UID as 400 error
* 12591:Add tests for request with folderUid
* Use more descriptive error status for missing folders
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* return 400 when folder id is missing
* put error checking in the right place this time
* mention folderUid in the docs
* Clarify usage of folderUid and folderId when both present
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Capitalise UID
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* mention folder UID in the metadata for a GET response
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-05-26 10:20:13 -04:00
Hugo Häggmark
7b17801047
LibraryPanels: Fixes error when importing plugin dashboard ( #34557 )
2021-05-24 09:31:34 +02:00
Hugo Häggmark
740f1ab3e2
LibraryPanels: Fixes connections after dashboard import ( #34461 )
2021-05-20 09:40:23 +02:00
Hugo Häggmark
69d9f427e1
LibraryPanels: removes feature toggle ( #33839 )
...
* WIP: intial structure
* Refactor: adds create library element endpoint
* Feature: adds delete library element
* wip
* Refactor: adds get api
* Refactor: adds get all api
* Refactor: adds patch api
* Refactor: changes to library_element_connection
* Refactor: add get connections api
* wip: in the middle of refactor
* wip
* Refactor: consolidating both api:s
* Refactor: points front end to library elements api
* Tests: Fixes broken test
* LibraryPanels: removes feature toggle
* Fix: fixes delete library elements in folder and adds tests
* Tests: fixes snapshot
* Refactor: adds service interfaces so they can be easily mocked
* Refactor: changes order of tabs in manage folder
* Refactor: fixes so link does not cover whole card
* Refactor: fixes index string name
* Update pkg/services/libraryelements/libraryelements.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/libraryelements/libraryelements_permissions_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/services/libraryelements/database.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: changes after PR comments
* Update libraryelements.go
* Update libraryelements.go
* Chore: updates after PR comments
* Chore: trying to fix build error
* Refactor: fixed stupid mistake
* Update libraryelements.go
* Chore: tries to fix build errors
* Refactor: trying to fix MySQL key length
* Update libraryelements.go
* Update pkg/services/libraryelements/libraryelements.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: changes after PR comments
* Refactor: changes after PR comments
* Tests: fixes tests
* Refactor: renames connections to connectedDashboards
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-05-12 08:48:17 +02:00
Ryan McKinley
33e4f8d7ac
Live: remove feature toggle and enable by default ( #33654 )
2021-05-04 08:44:55 -07:00
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
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
ying-jeanne
388d00873f
[dashboard api] manage error when data in dashboard table is not valid json ( #29999 )
...
* retrieve dashboard api
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/api/dashboard.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-01-04 14:41:17 +01:00
Arve Knudsen
dd2d206d99
Backend: Remove more globals ( #29644 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 19:09:04 +01:00
Arve Knudsen
cb62e69997
Chore: Convert API tests to standard Go lib ( #29009 )
...
* Chore: Convert tests to standard Go lib
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2020-11-13 09:52:38 +01:00
Arve Knudsen
676d393ec9
Chore: Fix issues reported by staticcheck; enable stylecheck linter ( #28866 )
...
* Chore: Fix issues reported by staticcheck
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Apply suggestions from code review
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2020-11-05 15:37:11 +01:00
kay delaney
c4c5b2dc61
CloudWatch Logs queue and websocket support ( #28176 )
...
CloudWatch Logs queue and websocket support
2020-10-28 08:36:57 +00:00
Arve Knudsen
1698c74ec1
Chore: Fix tests for Go 1.15 ( #26957 )
...
* Chore: Fix tests for Go 1.15
2020-08-12 17:45:03 +02:00
gastonqiu
f427f90a45
Chore: Aggregate save dashboard error ( #26443 )
...
* Chore: Aggregate save dashboard error
* Use errors package for error detection
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-07-21 11:12:01 +02:00
Arve Knudsen
5fe27ee959
Fix back-end tests on Windows ( #26355 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-15 20:09:03 +02:00
Arve Knudsen
41d432b5ae
Chore: Enable whitespace linter ( #25903 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Arve Knudsen
3651a8e976
Chore: Disable scopelint for tests ( #25923 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-30 11:05:47 +02:00
Arve Knudsen
d1e6214a4a
Chore: Enable scopelint Go linter ( #25896 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 17:04:38 +02:00
Carl Bergquist
703f728c0c
Dashboards: Make path to default dashboard configurable ( #25595 )
...
Closes #25463
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-06-22 18:00:39 +02:00
Carl Bergquist
5fc255bd89
Linting fixes for provisoning ( #23600 )
2020-04-16 05:46:20 +02:00
Carl Bergquist
80f40040b0
Linting fixes for dashboard provsioning ( #23576 )
2020-04-15 08:12:52 +02:00
huanggze
69c5efcf00
Cleanup: move interface ProvisioningService into provisioning package ( #23061 )
2020-03-25 14:14:24 +01:00
Carl Bergquist
3fdd2648b1
Chore: Avoid aliasing importing models in api package ( #22492 )
2020-03-04 12:57:20 +01:00
Jon Gyllenswärd
b489c75aaf
Provisioning: fix for cannot save provisioned dashboard ( #20218 )
...
Provisioning of dashboards now always overwrite existing ones and does not look at the configuration `allowUiUpdates` anymore
2019-11-07 10:49:24 +01:00
Jon Gyllenswärd
a45ce36566
Allow saving of provisioned dashboards ( #19820 )
...
Allows saving of provisioned dashboards if the config value allowUiUpdates is set to true
Fixes #11778
2019-10-31 14:27:31 +01:00