Add error states to the dashboard metrics internal objects
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 metric
s 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
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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)