Skip to content

Resolve "Reduce code duplication Alert / Incident Management"

David O'Regan requested to merge 232798-reduce-duplication into master

What does this MR do?

A not so tiny MVC for #232798 (closed)

This merge is designed to reduce the ~"technical debt" shared between:

  • Alert Management
  • Incident Management
  • Error Tracking(Coming soon)

through the abstraction of the common logic into a wrapper component i.e. a generic page layout component(page_wrapper.vue) that should allow for a:

  • Page Title
  • Set of filter tabs/item count badges
  • Token filtering bar(author, assignee, raw search, configurable)
  • Table of items
  • Pagination

This wrapper abstracts away much of the boiler plate, emitting up events to the actual page to allow it to handle any page specific logic i.e. API / GraphQL calls.

Merge You are here
Create wrapper and reduce duplication between ~"Category:Alert Management" and Category:Incident Management 🤘
Align Category:Error Tracking TBA
Refine page payout to provide more options TBA
Abstract table component into generic component with preloaded styles to further reduce duplication TBA

In this merge we also:

Screenshots

Alerts Incidents
Screenshot_2020-10-05_at_20.39.20 Screenshot_2020-10-05_at_20.47.09
Screenshot_2020-10-05_at_20.39.24 Screenshot_2020-10-05_at_20.47.23
Screenshot_2020-10-05_at_20.46.13 Screenshot_2020-10-05_at_20.47.14
Screenshot_2020-10-05_at_20.48.59 Screenshot_2020-10-05_at_20.48.27

Database queries

SELECT "alert_management_alerts".* 
FROM   "alert_management_alerts" 
       INNER JOIN "alert_management_alert_assignees" 
               ON "alert_management_alert_assignees"."alert_id" = 
                  "alert_management_alerts"."id" 
       INNER JOIN "users" 
               ON "users"."id" = "alert_management_alert_assignees"."user_id" 
WHERE  "alert_management_alerts"."project_id" = 1 
       AND ( Lower("users"."username") IN ( Lower('caneldem') ) ) 

Plan: https://explain.depesz.com/s/peYb

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

Closes #232798 (closed)

Edited by Toon Claes

Merge request reports