Skip to content

Add alert counts by status to graphql

Sarah Yasonik requested to merge sy-status-counts into master

What does this MR do?

Adds alert counts by status (or category of statuses).

Related issue: #217670 (closed)

Explain output for new finder method:

GroupAggregate  (cost=4.04..4.06 rows=1 width=10) (actual time=0.132..0.133 rows=1 loops=1)
  Group Key: status
  Buffers: shared hit=3 read=1
  I/O Timings: read=0.017
  ->  Sort  (cost=4.04..4.04 rows=2 width=2) (actual time=0.128..0.129 rows=2 loops=1)
        Sort Key: status
        Sort Method: quicksort  Memory: 25kB
        Buffers: shared hit=3 read=1
        I/O Timings: read=0.017
        ->  Seq Scan on alert_management_alerts  (cost=0.00..4.03 rows=2 width=2) (actual time=0.102..0.103 rows=2 loops=1)
              Filter: (project_id = 14986497)
              Buffers: shared read=1
              I/O Timings: read=0.017
Planning Time: 4.155 ms
Execution Time: 0.350 ms

^ Ran against the monitor Tanuki Inc demo project, as it's the only one this feature is currently enabled for.

Screenshots

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 Craig Norris

Merge request reports