* expose ngalert API to public
* add delete action to time-intervals
* introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model
* implement api server
* add feature flag alertingApiServer
---- Test Infra
* update helper to support creating custom users with enterprise permissions
* add generator for Interval model
* Simple replace of State.Resolved with State.ResolvedAt
* Retain ResolvedAt time between Normal->Normal transition
* Introduce ResolvedRetention to keep sending recently resolved alerts
* Make ResolvedRetention configurable with resolved_alert_retention
* Tick-based LastSentAt for testing of ResendDelay and ResolvedRetention
* Do not reset ResolvedAt during Normal->Pending transition
Initially this was done to be inline with Prom ruler. However, Prom ruler
doesn't keep track of Inactive->Pending/Alerting using the same alert instance,
so it's more understandable that they choose not to retain ResolvedAt. In our
case, since we use the same cached instance to represent the transition, it
makes more sense to retain it.
This should help alleviate some odd situations where temporarily entering
Pending will stop future resolved notifications that would have happened
because of ResolvedRetention.
* Pointers for ResolvedAt & LastSentAt
To avoid awkward time.Time{}.Unix() defaults on persist
* use react-virtual
* Render story with 100k items
* Dyanmic height and TanStack
* Remove weird item
* Add numberOfOptions to story
* Update class name
* Update class name
* First pass
* WIP
* why is my cpu angy
* Avoid triggering onHiddenSeriesChanged too often
onHiddenSeriesChanged should be called only when dataWithConfig changes, not when the callback changes itself.
This is actually causing an infinite loop because onHiddenSeriesChanged may not be memoized in the parent and passed as a new callback function on each render.
* fix tests
* Remove store mock and clear store between tests instead
* Fix filtering
* First pass adding callbacks and dependencies
* Add useRef hook for toggleLegend and topLogsRef
* Remove unwanted reactivity
register(...) changes outlineItems. A function that calls register(...) behaves like a setter for the state - it cannot react to the state itself.
* Separate unmount clean-ups
* Ensure unmount is not reactive to props
* Make memoized functions stats
* Wrap functions passed down to components with useCallback
* Fix reporting interaction when context is closed
* Adjust several variables to use refs
* Post-merge fixes
* Ensure scrollIntoView is called with a ref to the container
* Update docs
* Ensure scrollIntoView is updated only if the scroll element changes
* Fix the default pinned log tooltip
* Small clean up
* Remove console.log()
---------
Co-authored-by: Piotr Jamroz <pm.jamroz@gmail.com>
Co-authored-by: harisrozajac <haris.rozajac12@gmail.com>
* Zanana: Use grafana migrations to run openFGA migration files and initilize store.
* Add feature toggle
* Zanzana: return noop client if feature toggle is disabled
* add new apis
* add payloads
* create snapshot status type
* add some impl
* finish implementing update
* start implementing build snapshot func
* add more fake build logic
* add cancel endpoint. do some cleanup
* implement GetSnapshot
* implement upload snapshot
* merge onprem status with gms result
* get it working
* update comment
* rename list endpoint
* add query limit and offset
* add helper method to snapshot
* little bit of cleanup
* work on swagger annotations
* manual merge
* generate swagger specs
* clean up curl commands
* fix bugs found during final testing
* fix linter issue
* fix unit test