Skip to content

Add error states to the dashboard metrics internal objects

Miguel Rincon requested to merge 34121-add-error-states-to-metrics-store into master

What does this MR do?

As part of #34121 (closed).

This MR adds error states to the dashboard metrics object.

In order to have each individual error displayed in the dashboard, the error status of the metrics should be stored.

The error store is added to the metrics, so each panel can display it's own individual error state if needed.

Specifics:

  • Add error states as constants
  • Add mutations to capture loading and error states in each metric
  • Capture each of the conditions that can create a given error

The metric object structure changed:

Before

metric: {
  result: [...]
  ...
}

After

metric: {
  loading: true/false,
  error: <constant>,
  result: [...]
  ...
}

Future steps

After merging this, the dashboard will contain redundant information about error states that should become computed (e.g. using getters), so data in the metrics will become the single source of truth. The errors and state at upper levels of the data structure should get computed.

Screenshots

No visual changes are present, they will be added in follow up MRs.

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

Related to #34121 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports