Adds three functions:
`withStoredImages` iterates over a list of models.Alerts, extracting a stored image's data from storage, if available, and executing a user-provided function.
`withStoredImage` does this for an image attached to a specific alert.
`openImage` finds and opens an image file on disk.
Moves `store.Image` to `models.Image`
Simplifies `channels.ImageStore` interface and updates notifiers that use it to use the simpler methods.
Updates all pkg/alert/notifier/channels to use withStoredImage routines.
* Lots of changes, including new topic, also fixed all alerting relrefs
* Push stashed change.
* Updated content to reflect that Grafana alerting is enabled during upgrade.
* Fix typo
* Update docs/sources/alerting/migrating-alerts/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Checkin changes.
* Updates from Chris's review.
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Replaces the regexp with calls to strings.ReplaceAll and strings.Fields
for simplicity and improved performance.
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* Correctly encode default project response
* Make getGCEDefaultProject a method of Service and add test
* Handle error appropriately
* Update test and function definition
* grant data source reader to all users when running oss or enterprise
without license
* fix asserts in alerting tests
* add oss licensing service for test setup
* fix tests to pass in enterprise
* lint
* fix tests
* set setting.IsEnterprise flag for tests
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
* user essentials mob! 🔱
* user essentials mob! 🔱
* user essentials mob! 🔱
lastFile:public/app/plugins/panel/stat/types.ts
* user essentials mob! 🔱
* user essentials mob! 🔱
* Use generate defaults, and fix a few remaining issues
* Add annolist to dashboard dist plugins
* minor fixes
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
* Add store split for Get Dashboard version method
* Implement dashboard version service
* Fix api tests
* Remove GetDashboarVersion from sqlstore
* Add fakes for Get dashboard version
* Fix sqlstore test
* Add Get Dashboard store test
* Add dashver service test
* Remove useless comments
This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* pkg/web: store http.Handler internally
* pkg/web: remove injection
Removes any injection code from pkg/web.
It already was no longer functional, as we already only injected into
`http.Handler`, meaning we only inject ctx.Req and ctx.Resp.
Any other types (*Context, *ReqContext) were already accessed using the
http.Request.Context.Value() method.
* *: remove type mappings
Removes any call to the previously removed TypeMapper, as those were
non-functional already.
* pkg/web: remove Context.Invoke
was no longer used outside of pkg/web and also no longer functional
* initial commit
* Add to index list
* Improvements to intro section
* missing plural
* Minor fixes
* Some more changes.
* Updated image links
* Hide section "InfluxDB: Support for browser access mode removed
* Checkin more changes
* More changes.
* Fixed more image links
* Last batch of changes
* Fixed a few typos and ran prettier.
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>