[go: up one dir, main page]

Skip to content

Geo Primary Verification: View helpers

Why are we doing this work

This work will be behind feature flag geo_primary_verification_view

We are building a view for customers to manage their instance's data and verify primary data integrity for Geo Improve primary verification experience (&16554)

This change is focused on creating the rails helpers needed by the Frontend to build a data-driven approach to which Models are available on the UI. This is will be very similar to how we handle this for the Geo Replication Views.

Ultimately, this comes down to building a helper based on ::Gitlab::Geo#REPLICATOR_CLASSES

What data we will need

This is all very psuedo we may need more or less than this. However, for an MVC just getting a place to expose this information will be very helpful. Additionally, its important to note that this response is very similar to GeoHelper#replicable_class_data, however, this is from the context of the Model rather than the Replicator.

# example helper response

{
  title: "Project"
  title_plural: "Projects",
  name: "project",
  name_plural: "projects",
  model_class: "Project",
  rest_endpoint: "/data_management/projects", # this is just an example, the endpoint will be determined by the API issue ${ISSUE_TBD}
  checksum_enabled: true # this is also just an example, we need a way to determine if the checksum is enabled for the model type (currently that is through either Geo being enabled or the custom primary verification feature flags but this could change)
}

We also will need to provide the empty_state_svg outside of the models list to the view. For MVC we can use the Geo Empty State image_path("illustrations/empty-state/empty-geo-md.svg")

Relevant links

Implementation plan

Taking inspiration from the geo_helper.rb file, create a new helper containing Model data. We can start from the replicator, but it is important to keep in mind that not all models could have a matching replicator.

Edited by 🤖 GitLab Bot 🤖