Skip to content

Metrics: Save changes in the panels in dashboard to vuex store

What does this MR do?

From #27835 (closed) and #34519 (closed) Our dashboard must go from readable to readable and writable. So we must keep the backend structure so it can be POSTed back after edits are done.

Movegroups to dashboard.panel_groups in store

This MR Places the dashboard in a single object, which can be updated by vuex actions.

Previously, the .groups which rendered the dashboard were stored in a single array, this structure will not be sufficient for the frontend to POST back the original dashboard.panel_groups structure back to the backend. So this structure is kept intact.

Allow vue-draggable to commit to the store

Previously our solution modified the array directly using :list in draggable, now this update is done asyc using @input to go through the vuex store, so the data is updated in the whole application.

Removes the default sorting of dashboard metrics

In order for the user to re-order the metrics, the metrics must come in the original order of the dashboard.yml, so a few specs have been affected by this.

A new key is dynamically created to identify which groups receive changes. Changes done via draggable events can be saved to the right panel_group.

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

Relates to #34519 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports