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 POST
ed back after edits are done.
groups
to dashboard.panel_groups
in store
MoveThis 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.
vue-draggable
to commit to the store
Allow 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
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
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
Relates to #34519 (closed)