* OnGoing
* Continue migrating structure
* Comment
* Add intermediary service
* Remove unused error so far
* no need for fmt use errors
* use RoleNone
* Docs
* Fix test
* Accounting for review feedback
* Rename oauthserver.ExternalService to OAuthClient
* Revert as the interface looks weird
* Update pluginintegration
* Rename oauthserver.ExternalService
* closer to what it was before
* trying to remove tracing
* trying to remove tracing
* use plugin sdk tracing
* tracing is not init
* add infra tracing back
* remove infra trace
* Update pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* pr feedback
* remove code from other pr
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Chore: Clean up the context handler
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Better comment
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Use double quotes instead of backticks
* render time field as datetime
* add @react-awesome-query-builder/core
* Add time range filtering
* Update test
* Update macro test
* variables for filterforvalue
* use datalinkinput for basic matcher
* fix user select issue
* heatmap transformation variable interpolation
* clean code
* interpolate sort by
* add options interpolation in histogram transformation
* interpolation for limit
* Add suggestions UI to Filter by data value Transformation
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
* add validation for number/variable fields
* Add variables to add field from calculation
* Add validator to limit transformation
* Refactor validator
* Refactor suggestionInput styles
* Add variable support in heatmap calculate options to be in sync with tranform
* Refactor SuggestionsInput
* Fix histogram, limit and filter by value matchers
* clean up weird state ref
* Only interpolate when the feature toggle is set
* Add feature toggle to ui
* Fix number of variable test
* Fix issue with characters typed after opening suggestions still remains after selecting a suggestion
* Clean up from review
* Add more tests for numberOrVariableValidator
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* signing key wip
use db keyset storage
add signing_key table
add testing for key storage
add ES256 key tests
Remove caching and implement UpdateOrCreate
Stabilize interfaces
* Encrypt private keys
* Fixup signer
* Fixup ext_jwt
* Add GetOrCreatePrivate with automatic key rotation
* use GetOrCreate for ext_jwt
* use GetOrCreate in id
* catch invalid block type
* fix broken test
* remove key generator
* reduce public interface of signing service
* extend RuleStore interface to get namespace by UID
* add new export API endpoints
* implement request handlers
* update authorization and wire handlers to paths
* add folder error matchers to errorToResponse
* add tests for export methods
* Alerting: Expose metrics for Alertmanager Alerts
In Grafana, the alert evaluation and alert delivery are combined. We're always used a metric named `grafana_alerting_alerts` to get a sense of what are the alerts that are currently firing (these come from the evaluation side) and opted to not map the alertmanager alerts metric directly.
I think it's important that we make a disction between alerts that happen at evaluation vs alerts that are received for delivery by the internal Alertmanager as we have options to skip the delivery of these alerts to the internal alertmanager altogether.
* Migrate old alerting templates to use $labels
* Fix imports
* Add test coverage and separate rewriting to Go templates
* Fix lint
* Check for additional closing braces
* Add logging of invalid message templates
* Fix tests
* Small fixes
* Update comments
* Panic on empty token
* Use logtest.Fake
* Fix lint
* Allow for spaces in variable names by not tokenizing spaces
* Add template function to deduplicate Labels in a Value map
* Fix behavior of mapLookupString
* Reference deduplicated labels in migrated message template
* Fix behavior of deduplicateLabelsFunc
* Don't create variable for parent logger
* Add more tests for deduplicateLabelsFunc
* Remove unused function
* Apply suggestions from code review
Co-authored by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Give label val merge function better name
* Extract template migration and escape literal tokens
* Consolidate + simplify template migration
---------
Co-authored-by: William Wernert <william.wernert@grafana.com>
* Alerting: Manage remote Alertmanager silences
* fix typo
* check errors when encoding json in fake external AM
* take path from configured URL, check for nil responses
* Plugins: Add client middlware that forwards the signed grafana id token if present
* DsProxy: Set grafana id header if id token exists
* Add util function to apply id token to header
* Only add id forwarding middleware if feature toggle is enabled
* Add feature toggles to ds proxy and check if id forwarding is enabled
* Clean up test setup
* Change to use backend.ForwardHTTPHeaders interface
* PluginProxy: Forward signed identity when feature toggle is enabled
* PluginProxy: forrward signed id header