* Add mock method for getting a plugin
* Update tests to find "more" button via label
* Remove test for Silence action in rule details
* Unify alert rule actions to pull from same place
* Restore behaviour of only showing incident button when firing
* Fix identifier and pause permission/logic
* Remove TODO comment related to refactor
* Update snapshot for useAbilities
* Undo optional param
* Rename alert rule menu hook to component
* Refactor hook to component
* Rename Rule action buttons component
* Chore: update style syntax for RuleDetails
* Add tests for refactored alert rule menu
* Only re-fetch Grafana managed alerts after pausing/resuming
* Remove console log and check for extensions
* Improve share rule generation of GMA rules
* Rename component
* Update action
* Refactor plugins and fix tests
* lint
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This is not ideal! Preference would be to have a more robust mock server
that responds to the received silence and appends it to a stateful list for the test
and then resets afterwards
* feat: add a reactive extension registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: add hooks to work with the reactive registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: start using the reactive registry
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "command palette" extension point to use the hook
* feat: update the "alerting" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "explore" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "datasources config" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "panel menu" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "pyroscope datasource" extension point to use the hooks
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* feat: update the "user profile page" extension point to use the hooks
* chore: update betterer
* fix: update the hooks to not re-render unnecessarily
* chore: remove the old `createPluginExtensionRegistry` impementation
* chore: add "TODO" for `PanelMenuBehaviour` extension point
* feat: update the return value of the hooks to contain a `{ isLoading }` param
* tests: add more tests for the usePluginExtensions() hook
* fix: exclude the cloud-home-app from being non-awaited
* refactor: use uuidv4() for random ID generation (for the registry object)
* fix: linting issue
* feat: use the hooks for the new alerting extension point
* feat: use `useMemo()` for `AlertInstanceAction` extension point context
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Show list of labels on the alert rule form in a more visual way, and use a modal for managing them
* fix test
* Fix more tests
* Show orange badge when no labels are selected
* Remove unused datasource property in LabelsField
* Remove unused div and add comment
* Use button instead of icon for editing labels
* Use subform for labels
* Move logic fetching labels from different places in a separate hook
* Fix tests
* remove unused getLabelInput const in test
* Add ellispis and tooltip for long labels and move labels list in modal to the bottom
* Use text instead of badge when no using labels
* Fix tests after adding ellipsis and tooltip to the labels
* simplify styles
* Fix fetching values from gops when new key is used
* Address pr review comments
* Address pr review comments part2
* Fix tag on rtkq
* Remove color for no labels selected text
* Disable already used keys in the labels sub form
* Fix typo
* use the UseFieldArrayRemove type from react-hook-form
* Update some styles and text in the labels modal
* Address some review comments (nits)
* Address review comments part1
* Move logic getting labels in useCombinedLabels hook
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* apply empty state in a bunch of places
* fix unit tests
* put alert back on top
* add data-testids so e2e tests keep working
* remove info boxes
* fix annotations empty state alignment with new maxWidth
* Remove helper properties from the AM config object
* Make the omitTemporaryIdentifiers a pure function
* Add formValuesToCloudReceiver test
* Remove immer produce to prevent object freezing
* add history links for monaco completion provider folder
* add history links for monaco query field folder
* add history links for components folder
* add history links for configuration folder
* add history links for dashboard json folder
* add history links for gcopypaste folder
* add history link for variableMigration
* add history link for querybuilder/components/metrics-modal folder
* add history link for querybuilder/components/promqail folder
* add history links for querybuilder/components folder
* add history links for querybuilder/hooks folder
* add history links for querybuilder/shared folder
* add history links for querybuilder folder
* add history links for querycache folder
* add history links for src folder
* use frontend package and custom auth in module.ts
* remove files and fix import issues
* remove usePrometheusFrontendPackage
* remove extra files
* update betterer
* remove extra files after rebase
* fix betterer for rebase
* fix e2e flakiness
* Change from h5 to Text component
* Fix goworksum error
* Add headings for contact points and notification policies
* Alert group h2
* Reset labels and move h2 to group by
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>