Skip to content

Alert endpoint dropdown

David O'Regan requested to merge alert-endpoint-dropdown into master

What does this MR do?

A MVC for #218572 (closed)

In this merge we do the following:

  1. Create a new SFC for the consolidation of the alerts settings
  2. Migrate as small an amount of code as possible to allow the enabling of the prometheus manual configuration
  3. Create a path for the removal of: app/assets/javascripts/prometheus_alerts/*, we could in theory do this as a follow up merge now.
  4. Show a banner on the old prometheus settings page to inform users of the new section.

Screenshots

R1

Screenshot_2020-07-01_at_12.17.45

Screenshot_2020-07-01_at_12.17.58

Screenshot_2020-07-01_at_12.18.06

Notes, Suggestions, Constraints && future work

  • We are forced to migrate the API URL into the prometheus settings as the activation of the endpoint depends on a valid external URL.

  • We create a baseline constants file to extract re-used variables.

  • This feature sits behind: Feature.enable(:alert_integrations_dropdown)

  • ~~- We use the https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-form-form-select--default component for the select which will allow us to implement the full form in a correct fashion for: #215356 (closed), this however comes with a UX trade off on the chevron used, we could replace this via CSS?~~ => Fixed

  • ~~We attempt to make a start on #224667 (closed) for the backend but I could use some help pairing with the test side of things in Rspec.~~ => Done thanks to @syasonik

  • We should migrate the createFlash setup into a GlAlert pattern. => Done

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Jose Ivan Vargas

Merge request reports