Geo Replicable Details: Add ability to reverify from details view
Why are we doing this work
Broken off from Geo Replicable Details: Add ability to fire act... (#530840 - closed)
This currently is behind the feature flag geo_replicables_show_view
Recently we have added a Details View for individual registries in Geo. At the list view level we have the ability to commit Reverify actions on individual records. We should add this functionality to the details view too.
Relevant links
Screenshots
| Current | Proposed |
|---|---|
![]() |
![]() |
Implementation plan
- Add a Reverify button in the header of Verification Information card that emits an event 'reverify' when clicked
<template #header>
<div class="gl-flex gl-items-center">
<h5 class="gl-my-0">{{ $options.i18n.verificationInformation }}</h5>
<gl-button class="gl-ml-auto" @click="$emit('reverify')">{{ $options.i18n.reverify }}</gl-button>
</div>
</template>
- Add GraphQL update mutation file
geo_replicable_item/graphql/replicable_type_update_mutation.graphql- This may already be added via #534131 (closed)
mutation replicableTypeUpdate($action: GeoRegistryAction!, $registryId: GeoBaseRegistryID!) {
geoRegistriesUpdate(input: { action: $action, registryId: $registryId }) {
errors
}
}
- Add event listener and reverify mutation call in the
app.vue
<script>
export default {
// most of existing script omitted for clarity
methods: {
async reverify() {
try {
await this.$apollo.mutate({
mutation: replicableTypeUpdateMutation,
variables: {
action: 'REVERIFY',
registryId: convertToGraphQLId(this.replicableClass.graphqlRegistryClass, this.replicableItemId),
}
})
this.$apollo.queries.replicableItem.refetch();
} catch (error) {
createAlert({ message: this.$options.i18n.reverificationErrorMessage, error, captureError: true });
}
}
}
}
</script>
<template>
<!-- most of existing template omitted for clarity -->
<geo-replicable-item-verification-info
v-if="replicableClass.verificationEnabled"
:replicable-item="replicableItem"
@reverify="reverify"
/>
</template>
Edited by 🤖 GitLab Bot 🤖

