Grot (@grafanabot)
760146aeab
[v9.5.x] Annotations: Improve get tags query performance ( #66744 )
...
Annotations: Improve get tags query performance (#66182 )
* Add benchmark
* Add fix
(cherry picked from commit 04370f92dc )
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com >
2023-04-18 13:47:13 +03:00
idafurjes
982939111b
Rename Id to ID for annotation models ( #62886 )
...
* Rename Id to ID for annotation models
* Add xorm tags
* Rename Id to ID for API key models
* Add xorm tags
2023-02-03 17:23:09 +01:00
Serge Zaitsev
bc2813ef06
Chore: Fix goimports grouping in pkg/services ( #62420 )
...
* fix goimports
* fix goimports order
2023-01-30 08:21:27 +00:00
idafurjes
7c2522c477
Chore: Move dashboard models to dashboard pkg ( #61458 )
...
* Copy dashboard models to dashboard pkg
* Use some models from current pkg instead of models
* Adjust api pkg
* Adjust pkg services
* Fix lint
2023-01-16 16:33:55 +01:00
Alexander Weaver
1381fb6dfc
Annotations: Fix EpochEnd being zero for Alert-generated annotations ( #60931 )
...
* Revert linter suggestion
* Re-add nolint
* Work in terms of pointer rather than copy
* Add tests covering validation
* Add comment
2023-01-04 10:16:54 -06:00
ying-jeanne
12c292fd44
[Bug] Fix annotations update/patch ( #60385 )
...
* fix annotations update/patch
* verify that when update doesn't contain data, we will not update data
2022-12-26 09:53:52 -05:00
Sofia Papagiannaki
9855e74b92
Chore: Refactor quota service ( #58643 )
...
Chore: Refactor quota service (#57586 )
* Chore: refactore quota service
* Apply suggestions from code review
2022-11-14 21:08:10 +02:00
Sofia Papagiannaki
96cdf77995
Revert "Chore: Refactor quota service ( #57586 )" ( #58394 )
...
This reverts commit 326ea86a57 .
2022-11-08 11:52:07 +02:00
Sofia Papagiannaki
326ea86a57
Chore: Refactor quota service ( #57586 )
...
* Chore: refactore quota service
* Apply suggestions from code review
2022-11-08 10:25:34 +02:00
Alexander Weaver
cc8c1380e2
Alerting: Persist annotations from multidimensional rules in batches ( #56575 )
...
* Reduce piecemeal state fields
* Read data directly off state instead of rule
* Unify state and context into single struct
* Expose contextual information to layer above setNextState
* Work in terms of ContextualState and call historian in batches
* Call annotations service in batches
* Export format state and reason and remove workaround in unrelated test package
* Add new method to annotation service for batch inserting
* Fix loop variable aliasing bug caught by linter, didn't change behavior
* Incl timerange on annotation tests
* Insert one at a time if tags are present
* Point to rule from ContextualState rather than copy fields
* Build annotations and copy data prior to starting goroutine
* Rename to StateTransition
* Use new bulk-insert utility
* Remove rule from StateTransition and pass in directly to historian
* Simplify annotations logic since we have only one rule
* Fix logs and context, nilcheck, simplify method name
* Regenerate mock
2022-11-04 10:39:26 -05:00
Karl Persson
7386f8652c
RBAC: Improve performance of dashboard filter query ( #56813 )
...
* RBAC: Move UserRolesFilter to domain package
* Dashboard Permissions: Rewrite rbac filter to check access in sql
* RBAC: Add break when wildcard is found
* RBAC: Add tests for dashboard filter
* RBAC: Update tests
* RBAC: Cover more test cases
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com >
2022-10-25 11:14:27 +02:00
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
ying-jeanne
2472777ce2
Chore: implement sqlx into tag service ( #55908 )
...
* add sqlx store to tag service
* add sqlx into tag service
* fix test
* change to camal cases
* change in xorm camal case
2022-09-28 08:23:40 -04:00
Sofia Papagiannaki
d0e7765c6a
Annotation: Optionally allow storing longer annotation tags ( #54754 )
...
* Annotation: Optionally allow longer annotation tags
* Do not accept configuration lower than today's default (500)
* Apply suggestion from code review
2022-09-23 06:04:41 -04:00
Sofia Papagiannaki
2f14575dd3
Chore: Move annotations cleanup to the annotations service ( #55618 )
2022-09-22 15:27:48 +03:00
ying-jeanne
7b4cea8151
Chore: StoreSplit tag service ( #55453 )
...
* move tag service outside
* fix dashboard
* fix test
* lint
* fix linter
* remove spew
2022-09-21 08:04:01 -04:00
Sofia Papagiannaki
754eea20b3
Chore: SQL store split for annotations ( #55089 )
...
* Chore: SQL store split for annotations
* Apply suggestion from code review
2022-09-19 10:54:37 +03:00