* feat: add incomplete unit test
* refactor: add idea for unit test
* feat: create new e2e test
* feat: add some steps
* feat: add comment
* feat: complete prep work
* feat: complete clean up
* rebase
* feat: add more steps to test flow
* refactor: remove unit test
* refactor: clean up
* refactor: create a provisioned alert rule
* refactor: change location and content
* refactor: e2e test
* refactor: betterer
* refactor: move provisioned alert rule
* refactor: make provisioning file available remote
* refactor: clean up test
* refactor: move provisioned alert rule
* refactor: remove wait()
* feat: restructure first test and add more tests
* feat: add another provisioned alert rule
* feat: add a new test
* feat: complete new test
* refactor: replace data-testid in alert rules
* refactor: replace data-testid
* refactor: fix tests for drone
* refactor: fix third test after review
* refactor: fix last test
* temp
* refactor: improve some things
* refactor: adjust unit tests
* refactor: remove assertions for alert rule details view
* refactor: remove assertions
* refactor: add check for button text
* refactor: remove session storage
* refactor: apply changes from code review
* refactor: add codeowner
* refactor
* refactor
* refactor: clean up
* refactor: clean up
* refactor: clean up
* refactor: increase pa11y threshold for /alerting/list
* Fix wrong use of empty list in times field in the UI
* Add tooltip for disable switch
* Show disabled badge in mute timings
* Disable time ranges when disabling time interval in the UI
* PR review comments
* remove tooltip for the field as it does not register it correctly
* remove wrong code line
* Add comment
* Address PR review comments
Removes legacy alerting, so long and thanks for all the fish! 🐟
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Implement keep last state for state transitions
* Respect For duration when keeping state
* Only keep transition from recording an annotation
* Add keep last state option for nodata/error in UI
* Use time_intervals instead of the deprecated mute_time_intervals in alert manager config
* don't send mute_time_intervals in the payload
* Add and update tests
* Fix usecase when having both fields in response from getting alert manager config
* Use mute_timings for grafana data source and both for cloud data source when deleting mute timing
* Use mute_timings for grafana data source and both for cloud data source when saving a new or existing alert rule
* Address first code review
* Address more review comments
* replace react-popper with floating-ui in Popover
* update HoverCard
* fix unit tests
* mock useTransitionStyles to ensure consistent unit test results
* chore(monaco): bump monaco-editor to latest version
* feat(codeeditor): use esm to load monaco editor
* revert(monaco): put back previous version
* feat(monaco): setup MonacoEnvironment when bootstrapping app
* feat(monaco): load monaco languages from registry as workers
* feat(webpack): clean up warnings, remove need to copy monaco into lib
* fix(plugins): wip - remove amd loader workaround in systemjs hooks
* chore(azure): clean up so QueryField passes typecheck
* test(jest): update config to fix failing tests due to missing monaco-editor
* test(jest): update config to work with monaco-editor and kusto
* test(jest): prevent message eventlistener in nodeGraph/layout.worker tripping up monaco tests
* test(plugins): wip - remove amd related tests from systemjs hooks
* test(alerting): prefer clearAllMocks to prevent monaco editor failing due to missing matchMedia
* test(parca): fix failing test due to undefined backendSrv
* chore: move monacoEnv to app/core
* test: increase testing-lib timeout to 2secs, fix parca test to assert dom element
* feat(plugins): share kusto via systemjs
* test(e2e): increase timeout for checking monaco editor in exemplars spec
* test(e2e): assert monaco has loaded by checking the spinner is gone and window.monaco exists
* test(e2e): check for monaco editor textarea
* test(e2e): check monaco editor is loaded before assertions
* test(e2e): add waitForMonacoToLoad util to reduce duplication
* test(e2e): fix failing mysql spec
* chore(jest): add comment to setupTests explaining need to incresae default timeout
* chore(nodegraph): improve comment in layout.worker.utils to better explain the need for file
* Chore: Replace Form component usage in EditDefaultPolicyForm.tsx
* Chore: Replace Form component usage in EditNotificationPolicyForm.tsx
* Remove ts-ignore
Alerting: Remove start page of upgrade preview
Alerting upgrade page will now always show the summary table even before
upgrading any alerts or notification channels. There a few reasons for this:
- The information on the start page is redundant as it's now contained in the
documentation.
- Previously, if some unexpected issue prevented performing a full upgrade, a
user would have limited to no means to using the preview tool to help fix the
problem. This is because you could not see the summary table until the full
upgrade was performed at least once. Now, you can upgrade individual alerts and
notification channels from the beginning.
* Fix folder and rule name in groupBy for simplified routing
* Review suggestions
* Use proper type for MultiValueRemove props
* hoist getting groupBy count
* Use watch instead of getValues
* Bring back validation for required fields
* Expand route settings by default when alert rule has values in these fields
* Default to manual routing option if FF is enabled and local storage is not set to false
* Add test for getDefautManualRouting function
* Update seting local storage item to false in case of policy routing
* Only save to local storage when creating a new alert rule
* use new read only contact points list endpoint in simplified routing section
* Dont use alertmanager endpoint to get groupby defaults
* Use the new read only endpoint for mute timings in route settings
* review suggestions
* Rename hook
* Use options in params for useContactPointsWithStatus hook
* Refactor useContactPointsWithStatus
* second part of the enhanceContactPointsWithMetadata refactor
* Alerting: upgrade preview enable folder alert tab and dashboard alert panel
Enable the folder alert tab and the dashboard alert panel when the
alertingPreviewUpgrade feature flag is enabled
* Link directly to folder alerts in upgrade page
* Display alerts in scenes dashboard
* sort of working adding alerts
* move alert button to own component
* First fixes
* Generate link/url on click
* some cleanup
* making sure all links from scene go back to scene dashboard/panel; add rule button when there are rules; styling
* remove unused import
* add &scenes to url for alert instance annotations
* Add tests from old alert tab
* Revert addition of &scenes to dashboard urls
* Refactor to simplify NewAlertRuleButton interface
* update test
* Use the raw range to calculate the relative range
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* remove advancedDataSourcePicker feature toggle from DataSourcePickerWithPrompt
* remove advancedDataSourcePicker toggle from DataSourcePicker and adjust tests that relied on old picker
* adjust failing tests in QueryVariableEditorForm
* move DataSourceDropdown to DataSourcePicker file
* covert style declaration syntax to object style in DataSourcePicker
* remove advancedDataSourcePicker feature flag from registry
* remove .only from test
* adjust QueryVariableEditor test to avoid console.error
* DashboardScene: Action toolbar progress
* Add discard confirmation modal
* minor fix
* Update
* tweaked
* Updating
* Progress
* Update
* Update
* Added some unit tests
* fix test
* Change name to Exit edit
* Tweaks
* fix test
* Minor margin fix
* Move share to left of edit
* Show warning when cp does not exist and invalidate the form
* Set error in contact selectedContactPoint form field manually
* use RHF validate and trigger
* Fix defaultvalue not being set in contact point and update the error message text
* Simplify refetchReceivers prop definition in ContactPointSelectorProps
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* migrate some stuff from aria-label to data-testid
* convert styles to objects
* fix unit tests
* empty commit to kick drone now enterprise branch is there
* Add filtering by dashboard UID annotation
* Update the inline doc for search
* Add AlertRulesDrawer to the dashboards toolbar
* Use DashboardPicker as a filter on the alert rules page
* Fix accessibility errors
* Update drawer subtitle
* Display Alerting toolbar button only if there are linked alert rules
* Change toolbar rendering method, prevent displaying when no linked rules
* Improve text
* Use React.lazy to load the Alert rule toolbar button and drawer when needed
Fixes the group by custom labels and timings override logic in the simplified routing section of the edit rule page.
Previously:
- Custom labels would fail on first attempt at adding them to the group by.
- Timings fields required all timings to be overridden instead of any of them.