* Get golang to find an open port for us
* Update pkg/tests/api/alerting/api_notification_channel_test.go
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Fix merge
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Allow dimension operator selection
- Add dimension operators and function to update the operator in the query
- Add logic to ensure the same dimension cannot be selected multiple times (Azure restriction)
- Add selection component
* Update backend logic to default operation and filter to eq '*'
- This must be done as the ne and sw operators do not work with the wildcard filter
* Add tests on dimension operators
* Correct placement of 'and' when building query
* Add comment and simplify filtering logic
* Allow multiSelect for eq and ne operators
- Pass PanelData to DimensionFields component
- Add logic to retrieve labels from PanelData
- Add MultiSelect component for relevant operators
- Update frontend types to allow filter to be an array of strings
- Update backend types to allow filter to be an array of strings
- Update filter string building
* Improve setting of labels
* Update go tests
* Update frontend tests
- Add panelData mock (to be expanded later)
- Update null check in DimensionFields
* Allow custom value and set default
* Add frontend test and fix lint issues
* Improved handling of options for sw operator
* Remove changes related to multiselect
* Add check on refId to ensure dimension labels are correct for query
* Extract custom hook for setting dimension labels
* Add documentation around Azure Monitor metrics dimensions
* Update MetricQueryEditor tests
- Add missing data prop
* Correctly set field values
* Add additional expect for onQueryChange
* Correctly set operators
- Simplify onFilterInputChange
* Ensure no duplicate filters appear
* Ensure that filters are displayed correctly for saved queries
* Update dimension filter test
* Include additional test around changing dimension labels
* Pass panel data through new metrics query editor
* Move ApiKeyDTO to dtos package
* Add access control filter to api keys
* pass user in GetApiKeysQuery
* Add api key metadata to DTO
* Remove scope all requirement from get api keys endpoint
* Handle api key access control metadata in frondend
* loki: backend: better dataframe field names
* loki: backend: add dataframe-type to metric dataframes
* loki: backend: only add stats to the first metric dataframe
* AzureAd Oauth: Fix strictMode to reject users without an assigned role
Signed-off-by: kyschouv <kyschouv@microsoft.com>
* AzureAd OAuth: Add test for strictMode auth when no role claims are returned
Signed-off-by: kyschouv <kyschouv@microsoft.com>
* Template service
* Add GET routes and implement them
* Generate mock for persist layer
* Unit tests for reading templates
* Set up composition root and get integration tests working
* Fix prealloc issue
* Extract setup boilerplate
* Update AuthorizationTest
* Rebase and resolve
* Fix linter error
* #45498: add rbac support in searchv2
* to revert: fix dependency cycle
* Revert "to revert: fix dependency cycle"
This reverts commit 1ffbee73ec.
* added a TODO for caching user permissions
* add orgId to `getDashboardReadFilter`
* use orgId from signedInUser
* goimport
* provide public getter for config template variable regex
* add code comment
* Add documentation on assertion_name_mapping templates
* Add missing piece of SAML documentation while I'm in here.
* Update docs/sources/enterprise/saml/configure-saml.md
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Add a bit more documentation on error handling.
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* move upload to http
* use storage from grafanads
* rever gomod changes
* fix test
* wip
* add upload func
* update upload func
* writing to uploads
* edit response from service
* use dropzone for UI
* modify response struct in service
* better read file
* set content type for svg
* restrict file types upload
* add test and clean up errors
* pass test
* fix backend lint errors
* limit type of files on FE
* add TODO for after merge
* rebase with storage changes
* comment out unused function
* update UI to not have 2 uploads
* only call upload on select
* use utils function to find * in path
* show preview on drag over
* not allowing upload of svg
* add preview to upload tab
* no console.log
* resolve conflicts
* refactor log line
* fix failing BE test
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
* #45498: add entity events table
* #45498: add entity events service
* #45498: hook up entity events service to http server
* #45498: use `dashboards.id` rather than `uid` and `org_id` in grn
* Update pkg/services/entityevents/service.go
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* #45498: move entityeventsservice to services/store
* #45498: add null check
* #45498: rename
* #45498: fix comment
* #45498: switch grn back to uid
* Search: listen for updates (#47719)
* #45498: wire entity event service with searchv2
* load last event id before building index for org 1
* fix service init in integration tests
* depend on required subset of event store methods
* Update pkg/services/sqlstore/migrations/entity_events_mig.go
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
* #45498: pointer receiver
* #45498: mockery!
* #45498: add entity events service to background services
* dashboard query pagination, allow queries while re-indexing
* log level cleanups, use rlock, add comments
* fix lint, check feature toggle in search v2 service
* use unix time for event created column
* add missing changes for created column
* fix integration tests init
* log re-index execution times on info level
* #45498: fix entityEventsService tests
* #45498: save events on dashboard delete
* use camel case for log labels
* formatting
* #45498: rename grn to entityid
* #45498: add `IsDisabled` to entityEventsService
* #45498: remove feature flag from migration
* better context usage, fix capacity, comments/cleanups
* replace print with logger
* Revert "#45498: remove feature flag from migration"
This reverts commit ed23968898.
* revert:revert:revert conditional feature flag
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
Invalid PostableSilences could be passed to the Alerting API - if they
are passed all the way down into the alertmanager data layer, they can
cause a panic. This change adds validation to avoid a panic in the
alertmanager.
* Alerting: Create fewer contact points on migration
Previously a new contact point was created for every unique combination
of channels attached to any legacy alert. This was very hard to maintain,
requiring modifications in every generated contact point.
This change deduplicates the generated contact points to a more
reasonable state. There should now only be one contact point per legacy
channel, and we attached multiple contact points to a route by nesting
them. The sole exception to this is if there were multiple default
legacy channels, in which case we create a redundant contact point
containing all of them used only in the root policy. This allows for a
much simpler notification policy structure.
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* AzureMonitor: build azure portal deep link with resource uri
* extract resource name from the metrics api query
* extract func for getting resource name from metrics url
* add additional valid characters to regex
* Add test for decrypted values on datasource service
* Add debug log when fail to parse secure json fields
* Fix minor import issue
* Refactor encJson to json and simplejson to sjson on tests