* add modal scaffolding
* add some unit tests
* remove dummy api, add some TODO comments
* small test refactor
* another small test refactor
* fix unit tests due to aria-label/data-testid change
* add isNew notPersistedProperty to PanelModel
* if panel is newly created and user "Discard"s it, the panel is removed entirely
* add Todo's for when we remove the emptyDashboardPage FF
* add isNew to new panel after file dropping on dashboard page
* handle the "Apply" case
* CSV file dropping is not relevant to a new panel bc it doesnt open edit page
* avoid mutable
* remove mutableDataFrame from utils also
* fix build and add couple more testss
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* WIP
* Add instance totals to combined rule. Use totals to display instances stats in the UI
* WIP
* add global summaries, fix TS errors
* fix useCombined test
* fix test
* use activeAt from rule when available
* Fix NaN in global stats
* Add no data total to global summary
* Add totals recalculation for filtered rules
* Fix instances totals, remove instances filtering from alert list view
* Update tests
* Fetch alerts considering filtering label matchers
* WIP - Fetch alerts appending state filter to endpoint
* Fix multiple values for state in request being applyied
* fix test
* Calculate hidden by for grafana managed alerts
* Use INSTANCES_DISPLAY_LIMIT constant for limiting alert instances instead of 1
* Rename matchers parameter according to API changes
* Fix calculating total number of grafana instances
* Rename matcher prop after previous change
* Display button to remove max instances limit
* Change matcher query param to be an array of strings
* Add test for paramsWithMatcherAndState method
* Refactor matcher to be an string array to be consistent with state
* Use matcher query string as matcher object type (encoded JSON)
* Avoind encoding matcher parameters twice
* fix tests
* Enable toggle for the limit/show all button and restore limit and filters when we come back from custom view
* Move getMatcherListFromString method to utils/alertmanager.ts
* Fix limit toggle button being shown when it's not necessary
* Use filteredTotals from be response to calculate hidden by count
* Fix variables not being replaced correctly
* Fix total shown to be all the instances filtered without limits
* Adress some PR review comments
* Move paramsWithMatcherAndState inside prometheusUrlBuilder method
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
* remove old page component
* add test to check initDashboard is only called once (prevent variables loading twice)
* add help node
* update unit tests
* remove last mentions of topnav
* fix unit tests
* remove unused props from ButtonRow interface
* remove prop from test
* Loki: Fix incorrect evaluation of real/extracted labels in context
* Add tests
* Improve caching and add more tests
* Use mockResolvedValue
* Flip logic for getInitContextFiltersFromLabels
* Update to logic to use fetchSeriesLabels for queries with more than 1 parser
* Add CountInFolder to RegistryService interface
* Add folder children counts api route
* Update fake GetFolderChildrenCounts
* Add test for getting folder children counts
* Add validation to folder children counts handler
* Update openapi specs
* Update pkg/services/folder/folderimpl/folder.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add kind to TraceQL intrinsics
* Fix after merging main
* Fix intrinsics array reference after merge
* Dispatch error message when TraceQL autocomplete fails to retrieve tag values
* adds alertstatehistory backend config to grafanaBootData
* add alertStateHistory api
* show different ASH modal when using loki implementation
* group log lines by instance (unique set of labels)
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* render log lines for each instance
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* Add visual improvements to the log record of state changes
* Add values to log records
* compute common labels and show unique labels
* Add state changes visualization
* fix common labels extraction
* Code cleanup
* Add timespan-based log record view
* WIP
* scroll to timestamp - poc
* Use SortedVector for timestamp field
* add conditional accessor for frames
* update some of the log formats and styles
* Timestamp-based visualization with scrolling
* minor improvements
* Split Loki's state history viewer into multiple files
* Add memoization to prevent graph rerender on filter updates
* make chart size shrink when fewer instances
* style updates
* show warning when instances are hidden
* Add basic label-based filtering
* Improve label-based filtering
* Add regex validation
* Improve no instances message when everything was filtered out
* Update warning message
* Move timeline viewer to a separate file, refactor handling timeline pointer changes
* Remove unused component, add comments
* Fix test snapshot, fix type error
* adds tests for common.ts
* Add tests for converting log records into data frames
* Add basic component test, fix type guards
* Use a constant for timeseries limit
* Improve a11y, update component test
* Memoize AlertStateTag, migrate from deprecated ArrayVector
* Update public/app/features/alerting/unified/components/rules/state-history/common.ts
* Move helper hook into a separate file. Add Search input component
* Change the limit of visible time series on the timeline
* Add LogRecordViewer perf improvements, refactor timeline cursor events tracking
* Use callback to pass timeline refs
* Add grouping tests for the log record viewer
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>