grafana/pkg/services/alerting
Artur Wierzbicki a025109647
Dash previews: populate crawler queue from SQL query (#44083)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: lint fixes

* #44449: review fix: prefer `WithDbSession` over `WithTransactionalDbSession`

* #44449: review fix: add a comment explaining source of the filepath

* #44449: review fix: added filepath validation

* #44449: review fixes https://github.com/grafana/grafana/pull/45063/files @fzambia

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-09 13:23:32 +04:00
..
conditions Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
notifiers Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
testdata Alerting: improve error on failure to remove query referenced by legacy alerting (#42169) 2021-12-02 07:41:24 -08:00
alerting_usage_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
alerting_usage.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
engine_integration_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
engine_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
engine.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
eval_context_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
eval_context.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
eval_handler_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
eval_handler.go Chore: Refactor usage of legacy data contracts (#41218) 2021-11-10 11:52:16 +01:00
extractor_test.go Rename AddHandlerCtx to AddHandler (#43557) 2021-12-28 16:08:07 +01:00
extractor.go Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
interfaces.go Chore: Refactor usage of legacy data contracts (#41218) 2021-11-10 11:52:16 +01:00
models.go Chore: Fix various spelling errors in back-end code (#25241) 2020-06-01 17:11:25 +02:00
notifier_test.go Dash previews: populate crawler queue from SQL query (#44083) 2022-02-09 13:23:32 +04:00
notifier.go Dash previews: populate crawler queue from SQL query (#44083) 2022-02-09 13:23:32 +04:00
reader.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
result_handler.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
rule_test.go Add context for GetAlertNotificationUidQuery (#41633) 2021-11-12 14:35:38 +01:00
rule.go Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
scheduler.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
service_test.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
service.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
test_notification.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
test_rule.go Chore: Remove bus from the alerting service (#44496) 2022-02-03 13:26:05 +01:00
ticker_test.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
ticker.go AlertingNG: Create a scheduler to evaluate alert definitions (#29305) 2020-12-17 16:00:09 +02:00