* Add phlare datasource
* Rename
* Add parca
* Add self field to parca
* Make sure phlare works with add to dashboard flow
* Add profiling category and hide behind feature flag
* Update description and logos
* Update phlare icon
* Cleanup logging
* Clean up logging
* Fix for shift+enter
* onRunQuery to set label
* Update type naming
* Fix lint
* Fix test and quality issues
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
This PR imposes better naming conventions on public dashboards api
* rename api functions and remove use of _config_ noun
* fix tests
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
This PR fixes the naming of routes for public dashboards to be more accurate and descriptive.
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* Add custom title to pushover contact point
* Update pkg/services/ngalert/notifier/channels/pushover.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Use simplejson
* Use more verbose variable names
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add custom title to googlechet contact point
* Update pkg/services/ngalert/notifier/channels/googlechat.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Use simplejson
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add custom title to discord contact point
* Update pkg/services/ngalert/notifier/channels/discord.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Use simplejson
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add custom title to DingDing contact point
* Update pkg/services/ngalert/notifier/channels_config/available_channels.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Update pkg/services/ngalert/notifier/channels/dingding.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add error checking before URL templating
* Remove comment
* Use simplejson
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add title and description to VictorOps contact point
* Update pkg/services/ngalert/notifier/channels_config/available_channels.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Add description and details to Kafka notifier
* Fixed testing and add new logic testing
* Add proper description to kafka contact point UI
* Update pkg/services/ngalert/notifier/channels_config/available_channels.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Update pkg/services/ngalert/notifier/channels_config/available_channels.go
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Remove methods from sqlstore
* Remove commented out code
* Remove GetUserById from tests
* Adjust fake for get user profile
* Adjust test
* Adjust go mod files
* Try fix test
* Test adjustment
* Adjust test 2
* Remove commented out code
* create contextual log context provider
* use contextual provider in scheduler
* init logger in the package
* use context for log context
* use context in state manager
* make TimeRange interface and add relative range
* make Execute methods support the current time
* update resample to support relative time range
* update DSNode to support relative time range
* update query service to create queries with absolute time
* make alerting evaluator create relative time ranges
* feat: add new Folder table migration
Add a new folder table to support the Nested Folders feature.
https://github.com/grafana/grafana/issues/56880
* register nested folders feature flag (unused)
* feat: nested folder service (experiment)
This commit adds a NestedFolderSvc interface and stubbed out implementation as an alternative to the existing folder service. This is an experimental feature to try out different methods for backwards compatibility and parallelization, so that Grafana can continue to store folders in the existing (non-nested) manner while also using the new nested folder service.
Eventually the new service will (hopefully) become _the_ service, at which point the legacy service can be deprecated (or remain, with the new service methods replacing the original. whatever makes sense at the time).
* nested folders: don't run the new migration
This commit removes the nested folder migration from the list of active migrations so we can merge this branch and continue development without impacting Grafana instances built off main.
* refactor metrics request
* Update pkg/tsdb/cloudwatch/routes/dimension_keys_test.go
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
* return metric struct value intead of pointer
* make it possible to test hard coded metrics service
* test all paths in route
* fix broken test
* fix one more broken test
* add integration test
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
`pkg/web` triggers a panic when a http handler chain does not return any
response to the client.
This has been put in place, because it usually means a middleware along
the way did not call the next one.
In this specific case however, the handlers meant to return 200, but did
not do so explicitely, instead relying on the default behavior of `net/http`
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
* Chore: Delete unused mocks
* Add back used methods
* Add back used mocks 2
* Add back used mocks 3
* Add back used mocks 4
* Add back the alerting mocks
* Remove mock variables
* Add bacl needed mock var
* Touch up log statements, fix casing, add and normalize contexts
* Dedicated logger for dashboard resolver
* Avoid injecting logger to historian
* More minor log touch-ups
* Dedicated logger for state manager
* Use rule context in annotation creator
* Rename base logger and avoid redundant contextual loggers
* Add start time and end time parameters while querying tempo traces
* Added configurable time shift to query by trace id
* Test that the URL is formatted correctly
* Added test to check for time shift
* Improved label and tooltip of new time shift settings
Co-authored-by: André Pereira <adrapereira@gmail.com>
* Swap order of login fields
* Validate email field before validating the username field.
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
* Plugins: Remove support for V1 manifests
* Plugins: Make proxy endpoints not leak sensitive HTTP headers
* Security: Fix do not forward login cookie in outgoing requests
(cherry picked from commit 4539c33fce)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Audit logs in sender package
* Fix casing and touch up a few key names
* Avoid logging entire alert struct
* Log configuration ID being applied
* Revert change to errorf rather than log
* Tune levels further and remove some redundancies
* Adjust logger naming and standardize log context
* Adjust logger naming in router
* Move log and get rid of dead error handling code
* Add github release command to build/cmd
* Use go-github library and implement dry-run
* Make tag optional and default to metadata
* Fix minor bug with tag default
* Make some refactors to ease testing
* Add tests for publish github command
* Refactor publish github tests
* Refactor test helper function name
* Isolate local test
* remove Plugins and CloudIntegrations tab and add ConnectData tab
* ConnectData: add Search component and use it
* ConnectData: add DataSourcePluginList component
* add CardGrid component
* add CategoryHeader component
* ConnectData: restructure content
DataSourcePluginList is removed, because its responsibilities are
actually the same as ConnectData's responsibilities.
NoResults was added as a reusable component, and was moved out of
CardGrid, since there could be more CardGrid on one page, but only one
NoResults.
* fix spacer
* use LoadingPlaceholder
* CardGrid: add margin
* generalize CardGridProps
* move isLoading and error into CardGrid
We'd like CardGrid to be reusable, even multiple times within a page.
In this case, it's better UX if we show the loading or error states per
card grid, not for the whole page.
* ConnectData: fix NoResults condition
* fix and add meaningful tests
* fix indentation
* move isLoading and error back to ConnectData
* make `url` required for CardGrid items
* use new layered architecture in get dimension keys request
* go lint fixes
* pr feedback
* more pr feedback
* remove not used code
* refactor route middleware
* change signature
* add integration tests for the dimension keys route
* use request suffix instead of query
* use typed args also in frontend
* remove unused import
* harmonize naming
* fix merge conflict
* RBAC: Remove the access control evaluator fake
* API: Change to use access control implementation instead of mocks with
rbac disabled in tests
* Tests: Set cfg and access control defaults after applying options
* Tests: Rewrite team legacy access control tests
* Tests: Add helper function to create user with permissions
* Tests: set fake quota service as default
* Team: Add ExpectedTeamDTO and set in query result
* RBAC: Revert change
* RBAC: Add deprecation notice to mock
* Define EvaluationContext
* Refactor ConditionEval to use new context struct
* Refactor QueriesAndExpressionsEval to use EvaluationContext
* Remove dead field from AlertExecCtx
* Refactor Validate to use EvaluationContext
* Get rid of privately used AlertExecCtx
* Move EvaluationContext to new file and add helper
* Add builder pattern and bind rule info to context
* Extract header logic and add rule UID header
* Fix missing call
* 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
This change adds new functionality to the wecom alerting contact point. In addition to a webhook address, you can now send alerts to the wecom apiapp endpoint.
Based on https://github.com/grafana/grafana/discussions/55883
Signed-off-by: aimuz <mr.imuz@gmail.com>