Skip to content

Simplify dashboard variable manipulation by using arrays

Miguel Rincon requested to merge refactor-variables-for-array into master

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!
  • 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

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 Miguel Rincon

Merge request reports

Loading