Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )
...
* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
Kristin Laemmert
c61b5e85b4
chore: replace sqlstore.Store with db.DB ( #57010 )
...
* chore: replace sqlstore.SQLStore with db.DB
* more post-sqlstore.SQLStore cleanup
2022-10-14 15:33:06 -04:00
Giordano Ricci
f1a0a5cb47
Glue: improves validation & fix api docs for correlations ( #56682 )
2022-10-11 14:04:55 +01:00
Laura Benz
bc9a37ee8d
Glue: Add configuration support to PATCH ( #56117 )
...
* feat: add config to tests v0
* feat: add config to UpdateCorrelationCommand
* refactor: repair some tests
* refactor: repair another test
* refactor: repair last test
* refactor: remove possible test
* refactor: add comments
* refactor: add changes from code review
* refactor: implement more detailed patch
* feat: add tests for partial config update
* refactor: make error handling more detailed
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-10-10 15:36:14 +02:00
Giordano Ricci
489b302c03
Glue: Correlations minor APIs behavior improvements ( #56078 )
...
* add correlation config type, CorrelationConfig validator & default values
* make config required when creating correlations
* make targetUID optional, add validation for createCommand & configType
* fix tests
* update remaining tests
* fix lint error
* Update pkg/services/correlations/models.go
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* update docs
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-10-04 09:39:55 +01:00
Piotr Jamróz
a8f43b97a2
Glue: Return correlation config in GET /correlations ( #55801 )
...
* Fix getting and creating correlations config
* Fix tests
2022-09-28 12:17:43 +01:00
Piotr Jamróz
becdf10f0e
Glue: Add DB migration & support provisioning for user-defined correlations config ( #55560 )
...
* Allow provisioning correlation config
* Simplify code
* Fix reading correlations test
* Fix linting errors
* Fix linting errors
* remove simpleJson
* Clean up
* Fix tests
* Update swagger docs
* Fix linting
* Fix linting
* Clean up swagger definitions
Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-09-27 11:08:02 +02:00
Giordano Ricci
d07abdd23c
Correlations: Only return correlation for which both source and target datasources exist ( #55454 )
...
* Correlation: only return correlation for which both source and targe ds exist
* add test
2022-09-26 14:05:04 +01:00
Giordano Ricci
d815e2cb56
Correlations: Return 200 instead of 404 for empt correlation lists ( #55242 )
...
* return 200 instead of 404 for empty correlations list
* handle empty list response & improve consistency
2022-09-20 11:13:33 +01:00
Karl Persson
be6b8d91eb
Correlations: Use correct fallback handlers ( #54511 )
...
* Correlations: Use correct fallback handlers
* Add signed in middleware to all routes
2022-09-01 12:29:44 +02:00
Giordano Ricci
c68d7f1e35
Correlations: Add CorrelationSettings Page ( #53821 )
...
* GrafanaUI: add option to close DeleteButton on confirm click
* add datasource readOnly info to frontend settings
* move isTruthy utility type guard
* add generic non-visualization table component
* Add correlations settings page
* add missing readOnly in mock
* Fix typo
* avoid reloading correlations after add/remove
* use DeepPartial from rhf
* validate source data source
* fix validation logic
* fix navmodel test
* add missing readonly property
* remove unused styles
* handle multiple clicks on elements
* better UX for loading states
* fix remove handler
* add glue icon
2022-08-26 11:27:28 +01:00
Giordano Ricci
6b84dddee8
Fix build error ( #53615 )
2022-08-11 15:21:37 -04:00
Giordano Ricci
c1b30c56c9
Correlations: Add GetCorrelation(s) HTTP APIs ( #52517 )
...
* Correlations: Get Single correlations
* Correlations: Get all correlations for given source ds
* Correlations: Get all correlations
* add tests
* add DB indices
* fix lint errors
* remove skip from tests
* use DatasourceService in test
2022-08-11 16:58:11 +01: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
Giordano Ricci
09c4dbdb9f
Correlations: Add UpdateCorrelation HTTP API ( #52444 )
...
* Correlations: add UpdateCorrelation HTTP API
* handle correlation not found
* add tests
* fix lint errors
* add bad request to API spec
* change casing
* fix casing in docs
* fix tests
* update spec
2022-08-03 14:18:51 +01:00
Sofia Papagiannaki
7ba076de10
Chore: Move swagger definitions to the handlers ( #52643 )
2022-07-27 09:54:37 -04:00
Giordano Ricci
9a06b00e92
Correlations: Add DeleteCorrelation HTTP API ( #51801 )
...
* Correlations: add DeleteCorrelation HTTP API
* fix error message copy
* add readonly check
* add source_uid in delete condition
* make path singular
* Revert "make path singular"
This reverts commit d15be89578e202e5cb64a3e964ee09521b72d87c.
* add tests
* fix lint errors
* fix lint errors
* change casing
* update spec
* Remove transaction
* change casing in param name in docs
2022-07-27 09:07:58 +01:00
Giordano Ricci
4b2144fe40
Correlations: change casing of *UID properties ( #52836 )
...
* Correlations: change casing of *UID properties
* add link to correlations HTTP API
2022-07-27 07:01:46 +01:00
Giordano Ricci
5ce4baf6f5
Correlations: Add CreateCorrelation HTTP API ( #51630 )
...
* Correlations: add migration
* Correlations: Add CreateCorrelation API
* Correlations: Make correlations work with provisioning
* Handle version changes
* Fix lining error
* lint fixes
* rebuild betterer results
* add a UID to each correlation
* Fix lint errors
* add docs
* better wording in API docs
* remove leftover comment
* handle ds updates
* Fix error message typo
* add bad data test
* make correlations a separate table
* skip readonly check when provisioning correlations
* delete stale correlations when datasources are deleted
* restore provisioned readonly ds
* publish deletion event with full data
* generate swagger and HTTP API docs
* apply source datasource permission to create correlation API
* Fix tests & lint errors
* ignore empty deletion events
* fix last lint errors
* fix more lint error
* Only publish deletion event if datasource was actually deleted
* delete DS provisioning deletes correlations, added & fixed tests
* Fix unmarshalling tests
* Fix linting errors
* Fix deltion event tests
* fix small linting error
* fix lint errors
* update betterer
* fix test
* make path singular
* Revert "make path singular"
This reverts commit 420c3d315e
.
* add integration tests
* remove unneeded id from correlations table
* update spec
* update leftover references to CorrelationDTO
* fix tests
* cleanup tests
* fix lint error
2022-07-25 15:19:07 +01:00