Commit Graph

21 Commits

Author SHA1 Message Date
Ezequiel Victorero 3413e1497e PublicDashboards: Add support for recorded queries used in Mixed ds (#70096) 2023-06-15 10:28:34 -03:00
Ezequiel Victorero fc374f93a3 PublicDashboards: Support timezone on query API (#68560) 2023-06-14 17:35:01 -03:00
Ezequiel Victorero b1b6d9e2db PublicDashboards: Return custom meta field (#67538) 2023-04-28 15:03:30 -03:00
Ryan McKinley 9452c0d718 Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Michael Mandrus 5626461b3c Caching: Refactor enterprise query caching middleware to a wire service (#65616)
* define initial service and add to wire

* update caching service interface

* add skipQueryCache header handler and update metrics query function to use it

* add caching service as a dependency to query service

* working caching impl

* propagate cache status to frontend in response

* beginning of improvements suggested by Lean - separate caching logic from query logic.

* more changes to simplify query function

* Decided to revert renaming of function

* Remove error status from cache request

* add extra documentation

* Move query caching duration metric to query package

* add a little bit of documentation

* wip: convert resource caching

* Change return type of query service QueryData to a QueryDataResponse with Headers

* update codeowners

* change X-Cache value to const

* use resource caching in endpoint handlers

* write resource headers to response even if it's not a cache hit

* fix panic caused by lack of nil check

* update unit test

* remove NONE header - shouldn't show up in OSS

* Convert everything to use the plugin middleware

* revert a few more things

* clean up unused vars

* start reverting resource caching, start to implement in plugin middleware

* revert more, fix typo

* Update caching interfaces - resource caching now has a separate cache method

* continue wiring up new resource caching conventions - still in progress

* add more safety to implementation

* remove some unused objects

* remove some code that I left in by accident

* add some comments, fix codeowners, fix duplicate registration

* fix source of panic in resource middleware

* Update client decorator test to provide an empty response object

* create tests for caching middleware

* fix unit test

* Update pkg/services/caching/service.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* improve error message in error log

* quick docs update

* Remove use of mockery. Update return signature to return an explicit hit/miss bool

* create unit test for empty request context

* rename caching metrics to make it clear they pertain to caching

* Update pkg/services/pluginsintegration/clientmiddleware/caching_middleware.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Add clarifying comments to cache skip middleware func

* Add comment pointing to the resource cache update call

* fix unit tests (missing dependency)

* try to fix mystery syntax error

* fix a panic

* Caching: Introduce feature toggle to caching service refactor (#66323)

* introduce new feature toggle

* hide calls to new service behind a feature flag

* remove licensing flag from toggle (misunderstood what it was for)

* fix unit tests

* rerun toggle gen

---------

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-04-12 12:30:33 -04:00
Ezequiel Victorero 232834f455 PublicDashboards: fix collapsed rows queries (#66014) 2023-04-05 10:35:00 -03:00
Ezequiel Victorero 63998b0ad2 PublicDashboards: fix annotations when Target is nil (#65744) 2023-03-31 19:13:06 -03:00
Ezequiel Victorero 8f0a9729f0 PublicDashboards: Allow hidden queries execution (#64858) 2023-03-16 15:39:17 -03:00
Ezequiel Victorero 3f5acf346d PublicDashboards: Query collapsed panels inside rows (#64779) 2023-03-15 12:44:17 -03:00
juanicabanas 4d0e309d4e PublicDashboards: New method created to get access through Request access page when its paused (#64451) 2023-03-09 14:17:54 -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
Michael Mandrus 7391793504 Query Caching: Add per-panel query caching TTL (#61968)
* *Create Caching Config interface and OSS impl
*Create front-end facing DS Cache config
*Populate Caching Config on Datasource DTO
*Update OSS wire deps

* fix unit test

* handle query caching TTL override on the frontend

* Make sure the override works with pubdash

* move caching config to the right place in the ds info

* move caching config logic to enterprise index hook

* move queryCachingTTL to pubdash query payload

* Remove  from metadata (not needed)

* rename struct and add comment

* remove invalid wire dependency

* manual revert of 395c74b

* fix frontend test

* fix backend test

* fix tests for real this time

* truly fix frontend test

* fix back end unit test for real
2023-02-02 23:39:54 -05:00
Denis Limarev e6dee8a723 Perfomance: Preallocate slices (#61580) 2023-01-17 11:50:17 +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
Ezequiel Victorero 8d5b19bc61 PublicDashboards: support time range selection on the backend (#60203) 2022-12-15 10:44:33 -03:00
Ezequiel Victorero ae30a0688a PublicDashboards: refactor using new grafana error types (#58078) 2022-11-04 14:14:32 -03:00
Ezequiel Victorero 860380d893 PublicDashboards: refactor following naming convention for services (#57625) 2022-10-25 21:40:42 -03:00
Michael Mandrus 5879805e4b PublicDashboards: Fix unsafe code snippets (#57641)
* return an error if we can't extract queries from a panel

* check for null or undefined
2022-10-25 20:16:10 -04:00
Ezequiel Victorero 1f3d34ecda PublicDashboards: service and store methods rename (#57463) 2022-10-21 18:25:20 -03:00
owensmallwood 0b8fb543fc Public Dashboards: Can toggle annotations in modal (#57312)
adds toggle for pubdash annotations
2022-10-21 13:42:14 -06:00
Ezequiel Victorero 5b9959014c PublicDashboards: refactor service (#57372) 2022-10-21 09:37:38 -03:00