Simplify dashboard variable manipulation by using arrays
What does this MR do?
Simplify variable manipulation by using arrays
Variables are represented by users in the backend and yml by using hashes of objects to represent unique fields in their dashboards.
However, this can lead to difficulties when creating mock data and constructing flexible Vuex data structures.
This change addresses this issue by using a simpler data structure for variables based on arrays.
⚠ Large MR trigger warning
This MR is quite large, there are a couple of reasons:
- It changes a data in the store and works it's way up to be compatible with all related components.
- The main change occurs at:
app/assets/javascripts/monitoring/stores/variable_mapping.js
, but other changes are needed. - ~350 (out of ~850) changes in the mock data!
- The main change occurs at:
- It is likely several of our components are closely coupled, so one change impacts many files.
- Suggestions to improve this are welcome!
Screenshots
N/A
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 -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 Miguel Rincon