Skip to content

Assign alerts sidebar base severity

What does this MR do?

This is merge 2/3 for: #218404 (closed). Please see merge 1 for context here: !32642 (merged)

See #218404 (comment 345803729) for progression plan and caveeats.

These three merges are designed to provide the base of the rest of the work for: &3349 (closed)

In this merge we do a four things:

  1. Add the severity attribute sidebar base to Alert Details
  2. Disable severity dropdown edit access until the backend is complete.
  3. Pre-define a grapghql mutation to modify alert severity. This might be subject to change but I think the suggested model is a reasonable guess that can be updated without much effort later.
  4. Take a chance to reduce ~"technical debt" by breaking the alert severity icon into a SFC

We want to provide the most boring possible solution, clearing a clear path to progression in an iteration based approach. This is done by doing to main things:

Notes && Known Issues

  • Icon used for collapsed sidebar alert status => severity-critical. This is a stop gap as I assume we will need to change this? => Follow up MR
  • Severity Icon section needs to be enabled after backend is complete => Follow up MR
  • Page layout needs a extra class applied to correct padding at right side => follow up MR
  • Text for sidebar labels needs to be $gray-700 => Follow up MR

Proposed GraphQL mutation:

mutation ($projectPath: ID!, $status: AlertManagementSeverity!, $iid: String!) {
  updateAlertSeverity(input: { iid: $iid, severity: $severity, projectPath: $projectPath }) {
    errors
    alert {
      iid,
      severity,
    }
  }
}

Screenshots

Screenshot_2020-05-20_at_15.26.44

Screenshot_2020-05-20_at_15.26.49

Screenshot_2020-05-20_at_15.27.02

Current State - Edit Disabled
Screenshot_2020-05-21_at_08.07.42

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 Rémy Coutable

Merge request reports