* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)
* Add interfaces for contact point errors
* [WIP] Create fake response for the new service to get contact point errors
* [WIP] Create action an reducer for the new service to get contact point errors
* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes
* [WIP] Use store to get error count
* Show number of integrations errors at the contact points main view
* Add warning icon and refactor styles using getStyles
* Change lastNotify type to string instead of DateTime
* Use Stack component from experimental library when it is possible
* Alerting: Add receivers error feedback in contact point list (#52524)
* Refactor types for contact points state
* Add health column in ReceiversTable in case error state is available for this AM
* Create method for converting contact points state DTO to the FE type used in Redux store
* Update types
* Fix indexOf criteria getting integration type
* Change type name to integrationType name
* Change new components to be named functions to follow the FE style-guide
* Fix typos
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Decouple ReceiversTable from Redux state
* Create private useContactPointsState hook to simplify code in ReceiversTable component
* Add tests for getIntegrationType and refactor the method to validate the name
* Add tests for contactPointsStateDtoToModel method
* Remove unnecessary check
* Use Badge compoment for health status in contact point list
* Create new method parseIntegrationName to simplify getting types and index from integration name
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Alerting: Show integrations error feedback when expanding contact point in list (#52920)
* Use DynamicTable for rendering list of contact points and make them expandable if error status is available
* Render expanded content for contact points integrations
* Style and format last notify column
* Add send resolve column to the integration details
* Fix receiver id for DynamicTable row
* Update clock icon in integration state
* Fix tests
* Add PR review sugestions
* Alerting/integrations error feedback handle null dates in response 3 (#55659)
* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes
* Update LastNotify in ReceiversTable component to handle null date
* Alerting/integrations error feedback handle 404 state not available (#55803)
* Create fetchContactPointsState using the future contact point url and handle 404 error
* Add contact points state tests
* Alerting/update receivers dto naming 2 (#56201)
* Update NotifierStatus naming and fix sendResolved not being updated in UI
* Return always empty ContactPointsState array when catching an error in the request response
* Fix test
* Show notification status only in notifications main view
* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response
* Add PR review suggestions
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* feat: make it possible to register standalone app plugin pages under different sections
* refactor(sample.ini): use "admin" instead of "starred" section in the INI
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* feat(defaults.ini): add app navigation settings to the defaults.ini as well
* fix: use the correct key in the tests
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Adds t.Run calls that supply the name of a receiver and its integrations
when the API response is being verified. This test has a rare flake and
it's difficult to track down without more context for the test failure.
Prior to this change, all alert instance writes and deletes happened
individually, in their own database transaction. This change batches up
writes or deletes for a given rule's evaluation loop into a single
transaction before applying it.
These new transactions are off by default, guarded by the feature toggle "alertingBigTransactions"
Before:
```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8 398 2991381 ns/op 1133537 B/op 27703 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
util.go:127: alert definition: {orgID: 1, UID: FovKXiRVzm} with title: "an alert definition FTvFXmRVkz" interval: 60 created
util.go:127: alert definition: {orgID: 1, UID: foDFXmRVkm} with title: "an alert definition fovFXmRVkz" interval: 60 created
util.go:127: alert definition: {orgID: 1, UID: VQvFuigVkm} with title: "an alert definition VwDKXmR4kz" interval: 60 created
PASS
ok github.com/grafana/grafana/pkg/services/ngalert/store 1.619s
```
After:
```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8 1440 816484 ns/op 352297 B/op 6529 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
util.go:127: alert definition: {orgID: 1, UID: 302r_igVzm} with title: "an alert definition q0h9lmR4zz" interval: 60 created
util.go:127: alert definition: {orgID: 1, UID: 71hrlmR4km} with title: "an alert definition nJ29_mR4zz" interval: 60 created
util.go:127: alert definition: {orgID: 1, UID: Cahr_mR4zm} with title: "an alert definition ja2rlmg4zz" interval: 60 created
PASS
ok github.com/grafana/grafana/pkg/services/ngalert/store 1.383s
```
So we cut time by about 75% and memory allocations by about 60% when
storing and deleting 100 instances.
* add new uid endpoing for star
* add store pool into service
* fix the endpoint caller
* udpate swagger file
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* remove useless code for star dashboard
* add new uid endpoing for star
* add store pool into service
* fix the endpoint caller
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update pkg/api/stars.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* solve linter
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Move annotation functionality behind a history persistence interface
* Rename to RecordState
* Fix lint error in import aliasing
* One more import linter error
* GRPC Server: Add signedInUser to context after auth
* add permissions to signedInUser
* add access control permissions test
* add additional signedInUser checks
* get user from context
* move `UserFromContext` to object/auth.go
Co-authored-by: Todd Treece <todd.treece@grafana.com>
* fix log row being falsely added to context
* do not add to many lines
* fix scroll position in context
* more flexible id comparison
* add original refid to context query
* added missing row comparison
* updated comment
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* feat(sass): introduce font-file-path var to define where to load fonts from
* feat(storybook): introduce storybook sass theme styles to set font file paths
* chore(sass): change imports so treated as sass rather than css
* feat(storybook): filter assets so builds dont contain thousands of files
* Copy sqlstore methods to suer store
* Adjust ProvideService signatures in test
* Add xorm tags and tests for search
* Remove methods from sqlstore
* fix lint in tests
* playlist: Split PlaylistItem into standalone TS type
* update playlist model
* actually set the title
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>