* Add notification policies preview in alert rule form
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Refactor using new useGetPotentialInstances hook and apply some style changes
* Add notification policy detail modal
* Use backtesting api for simulating potential alert instances
* Fix logic to travserse all the children from the root route
* Split notification preview by alert manager
* Add instance count to matching policy header and fix some styles
* Move some logic to a new hook useGetAlertManagersSourceNames to make the code more clean
* Fix some tests
* Add initial test for NotificationPreview
* Use button to preview potential instances
* Add link to contact point details
* Add route matching result details
* Show AlertManager image in the routing preview list
* Add tests setup, add single AM preview test
* Handle no matchers and no labels use case
* Update some style in collapse component and fix policy path in modal
* Update modal styles
* Update styles
* Update collapse header styling
* Normalize tree nodes should happen before findMatchingRoutes call
* Fix findMatchingRoutes and findMatchingAlertGroups methods after reabasing
* Move instances matching to the web worker code
* Fix config fetching for vanilla prometheus AMs
* Add tests
* Add tests mocks
* Fix tests after adding web worker
* Display matching labels for each matching alert instance
* Add minor css improvements
* Revert changes added in Collapse component as we don't use it anymore
* Move the route details modal to a separate file
* Move NotificationRoute and preview hook into separate files
* Fix Alertmanager preview tests
* Fix tests
* Move matcher code to a separate file, improve matcher mock
* Add permissions control for contact point edit view link
* Fix from and to for the temporal use of backtesting api
* Fix tests, add lazy loading of the preview component
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* Fix preview test
* Add onclick on the header div so it collapse and expands when clicking on it, and update styles to be consistent with the rest of tables
* Adapt the code to the new rule testing endpoint definition
* Fix tests
* small changes after reviewing the final code
* compute entire inherited tree before computing the routes map
* Throw error in case of not having receiver in routesByIdMap and add test for the use case of inheriting receiver from parent to check UI throws no errors
* Add list of labels in the policy route path that produces the policy matchers to match potential instances
* Use color determined by the key, in label tags when hovering matchers in the policy tree
* Remove labels in modal and handle empty string as receiver to inherit from parent as we do with undefined
* Revert "Add list of labels in the policy route path that produces the policy matchers to match potential instances"
This reverts commit ee73ae9cf9.
* fix inheritance for computeInheritedTree
* Fix message shown when preview has not been executed yet
* First round for adressing PR review comments
* Adress the rest of PR review commments
* Update texts and rename id prop in NotificaitonStep to alertUid
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/CodeEditor.internal.story.tsx
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/suggestions.ts
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/CodeEditor.internal.story.tsx
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/suggestions.ts
* remove duplicate editor from story
* remove suggestions from story
---------
Co-authored-by: Laura Benz <laura.benz@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
* Update dependency @testing-library/dom to v9.3.0
* dedupe versions in the lockfile
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* refactor: tooltip is required
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: add tooltips
* refactor: adjust tests
* refactor: apply changes from code review
* refactor: adjust component for e2e test
* refactor: adjust fallback
* refactor: apply changes from code review
* refactor: apply changes from code review
* refactor: set IconButton default as type=button and remove from use cases
* refactor: remove aria-labels when duplicated and type=button from use cases
* refactor: clean up
* refactor: fix tests
* refactor: fix type errors
* refactor: remove changes in order in order to add them to a separate PR
* refactor: set IconButton default as type=button
* refactor: remove tooltip
* refactor: apply changes requested in review
* loading states!
* fix uncontrolled checkbox
* cleaner css
* improve flickering title
* make sure @grafana/ui has the same version of react-loading-skeleton
* fix unit test + add tooltip text
* better way of restoring focus
* only restore focus when loading
* missing !
* use aria-label instead of tooltip
* Update dependency esbuild to v0.17.18
* chore(npm): update all esbuild dependencies to use esbuild@0.17.18
* build(esbuild): update configs so esbuild-loader matches loader from file extension
* build(webpack): fix failed monaco editor loading due to require not existing
* chore(esbuild): bump to 0.17.19
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Themes: Unify secondary button and ToolbarButton
* Update
* Update light theme
* fix test
* fix toolbar button border
* fix disabled outline button style
* Use transparent color instead of dynamic computed color for hover bg for text/outline versions. this is what figma components do
* Center align cell items
* Change empty folder message + style
* Use new Text components in TypeCell
* Use new components in Move and Delete modals
* fix test
* Change spinner in DescendantsCount to the same font size as the text to prevent layout shift