* Move role types to a separate package
* Make role type singular and remove _ from directory name
* Add orguser methods to org service
* Fix fake method
* Chore: Copy methods from sqlstore to org store
* Rename method, add test
* Add comments of tests
* Chore: Add methods from sqlstore to org service interface
* Avoiding import cycle
* Add and remove some methods
* User AddOrgUSer from org service in api
* Fix test function calls
* Chore: Copy methods from sqlstore to org store
* Rename method, add test
* Add comments of tests
* Chore: Add methods from sqlstore to org service interface
* Avoiding import cycle
* Add and remove some methods
* search: create a separate http endpoint
* search: extract api uri
* search: rename uri
* search: replicate the readiness check
* search: replicate the readiness check metric
* search: update mock
* Chore: move team store implementation to a separate package
* trying to fix more tests
* fix tests in service accounts and access control
* fix common tests
* restore commented out test
* add todos
* Add org methods to org service and store
* Fix name of fake
* Remove unused fake
* Add xorm tags and half of a test
* Add cmment for clarifying missing part of test
* Add some comments about future refactors
* Rename test
* Add test for update org address
The length of the identifier from the underlying library is 9 or more characters depending on the rate at which the identifiers are generated. See https://pkg.go.dev/github.com/teris-io/shortid
The test previously made the assumption that the length will always be 10, which would intermittently fail.
* Alerting: Change screenshots to use components
This commit changes screenshots to use a number of components instead of a set of functional wrappers.
It moves the uploading of screenshots from the screenshot package to the image package so we can re-use the same code for both uploading screenshots and server-side images; SingleFlight from the screenshot package to the image package so we can use it for both taking and uploading the screenshot, where as before it was used just for taking the screenshot; and it also removes the use of a cache because we know that screenshots can be taken at most once per tick of the scheduler.
Introduces a FromContext method on the log.Logger interface that
allows contextual key/value pairs to be attached, e.g. per request,
so that any logger using this API will automatically get the per request
context attached. The proposal makes the traceID available for
contextual logger , if available, and would allow logs originating from
a certain HTTP request to be correlated with traceID.
In addition, when tracing not enabled, skip adding
traceID=00000000000000000000000000000000
to logs.
* Create struct for Slack's receiver settings
* Remove one layer of indirection when building slack notifier
* Delete un-used struct
* Validate against settings struct instead of simplejson object
* Genericize settings marshalling
* Remove repetition between fields on notifier and fields on settings struct
* Rename unmarshal settings wrapper
* Handle comma separated strings at marshalling time rather than validation time
* Address misc review feedback
* Add function to remove metadata from queries
* Add test for RemoveMetadataFromQueryData function
* Remove only custom data and executed query string
* Add sanity check to SanitizeMetadataFromQueryData
* Hide Correlations Page behind a toggle
* Remove redundant defaults
* Ensure top nav is rendered when correlations are disabled
This is for the case when:
[feature_toggles]
topnav = true
This commit fixes a bug where we did not send resolved alerts to Alertmanager for resolved alert instances. This meant that resolved notifications did not have the annotations from the resolved state, and a result did not also have the resolved screenshot.