diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row.vue index 0e3e001614b61d11fb9108b8ba84dd77aaff48f8..3ce5e5ab9916e4e5acb732127a536cc5a6e7fc41 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row.vue @@ -33,6 +33,7 @@ import { SIGNATURE_BADGE_TOOLTIP, DOCKER_MEDIA_TYPE, OCI_MEDIA_TYPE, + MinimumAccessLevelText, } from '../../constants/index'; import SignatureDetailsModal from './signature_details_modal.vue'; @@ -172,10 +173,10 @@ export default { return `${this.tag.name}_badge`; }, accessLevelForDelete() { - return this.tag.protection?.minimumAccessLevelForDelete; + return MinimumAccessLevelText[this.tag.protection?.minimumAccessLevelForDelete]; }, accessLevelForPush() { - return this.tag.protection?.minimumAccessLevelForPush; + return MinimumAccessLevelText[this.tag.protection?.minimumAccessLevelForPush]; }, }, }; @@ -216,10 +217,16 @@ export default { <strong>{{ s__('ContainerRegistry|This tag is protected') }}</strong> <br /> <br /> - <strong>{{ s__('ContainerRegistry|Minimum role to push: ') }}</strong> - {{ accessLevelForPush }} - <strong>{{ s__('ContainerRegistry|Minimum role to delete: ') }}</strong> - {{ accessLevelForDelete }} + <ul class="gl-m-0 gl-list-none gl-p-0"> + <li> + <strong>{{ s__('ContainerRegistry|Minimum role to push: ') }}</strong> + {{ accessLevelForPush }} + </li> + <li> + <strong>{{ s__('ContainerRegistry|Minimum role to delete: ') }}</strong> + {{ accessLevelForDelete }} + </li> + </ul> </gl-popover> </template> diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/details.js b/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/details.js index 78e59c5c0f10259973ad75216a1af06980769cf9..db796af3e707f6f4d8b6d9a578bc05898dfc5b29 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/details.js +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/constants/details.js @@ -177,3 +177,9 @@ export const PACKAGE_DELETE_HELP_PAGE_PATH = helpPagePath( export const DOCKER_MEDIA_TYPE = 'application/vnd.docker.distribution.manifest.list.v2+json'; export const OCI_MEDIA_TYPE = 'application/vnd.oci.image.index.v1+json'; + +export const MinimumAccessLevelText = { + ADMIN: s__('AdminUsers|Administrator'), + MAINTAINER: __('Maintainer'), + OWNER: __('Owner'), +}; diff --git a/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue index c5c587883c89a1c679e32dbd222ecc304a5372c7..ae3d20b5488b8592df8a84b484a5f7de6078b6fe 100644 --- a/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue +++ b/app/assets/javascripts/packages_and_registries/settings/project/components/container_protection_tag_rules.vue @@ -319,23 +319,25 @@ export default { </template> <template #cell(rowActions)="{ item }"> - <gl-button - v-gl-tooltip - category="tertiary" - icon="pencil" - :title="$options.i18n.editIconButton" - :aria-label="$options.i18n.editIconButton" - @click="openEditFormDrawer(item)" - /> - <gl-button - v-gl-tooltip - v-gl-modal="$options.modal.id" - category="tertiary" - icon="remove" - :title="$options.i18n.deleteIconButton" - :aria-label="$options.i18n.deleteIconButton" - @click="showProtectionRuleDeletionConfirmModal(item)" - /> + <div class="gl-flex gl-justify-end"> + <gl-button + v-gl-tooltip + category="tertiary" + icon="pencil" + :title="$options.i18n.editIconButton" + :aria-label="$options.i18n.editIconButton" + @click="openEditFormDrawer(item)" + /> + <gl-button + v-gl-tooltip + v-gl-modal="$options.modal.id" + category="tertiary" + icon="remove" + :title="$options.i18n.deleteIconButton" + :aria-label="$options.i18n.deleteIconButton" + @click="showProtectionRuleDeletionConfirmModal(item)" + /> + </div> </template> </gl-table> <p v-else data-testid="empty-text" class="gl-text-subtle"> diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js index 37f97aa0420c62d319642c55ad3f7599f83361ab..30ff4d6e473961f40fd2cf5d92c581aabd426e1c 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js @@ -221,7 +221,7 @@ describe('tags list row', () => { expect(popoverText).toContain('This tag is protected'); expect(popoverText).toContain('Minimum role to push:'); expect(popoverText).toContain('Minimum role to delete:'); - expect(popoverText).toContain('MAINTAINER'); + expect(popoverText).toContain('Maintainer'); }); });