diff options
Diffstat (limited to 'app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue')
-rw-r--r-- | app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue b/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue index 32bf27f1143..cfd787b3f52 100644 --- a/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue +++ b/app/assets/javascripts/registry/explorer/components/list_page/image_list_row.vue @@ -10,6 +10,7 @@ import { LIST_DELETE_BUTTON_DISABLED, REMOVE_REPOSITORY_LABEL, ROW_SCHEDULED_FOR_DELETION, + CLEANUP_TIMED_OUT_ERROR_MESSAGE, } from '../../constants/index'; export default { @@ -34,7 +35,6 @@ export default { LIST_DELETE_BUTTON_DISABLED, REMOVE_REPOSITORY_LABEL, ROW_SCHEDULED_FOR_DELETION, - ASYNC_DELETE_IMAGE_ERROR_MESSAGE, }, computed: { encodedItem() { @@ -42,6 +42,7 @@ export default { name: this.item.path, tags_path: this.item.tags_path, id: this.item.id, + cleanup_policy_started_at: this.item.cleanup_policy_started_at, }); return window.btoa(params); }, @@ -55,6 +56,14 @@ export default { this.item.tags_count, ); }, + warningIconText() { + if (this.item.failedDelete) { + return ASYNC_DELETE_IMAGE_ERROR_MESSAGE; + } else if (this.item.cleanup_policy_started_at) { + return CLEANUP_TIMED_OUT_ERROR_MESSAGE; + } + return null; + }, }, }; </script> @@ -82,11 +91,12 @@ export default { :disabled="item.deleting" :text="item.location" :title="item.location" - css-class="btn-default btn-transparent btn-clipboard gl-text-gray-300" + category="tertiary" /> <gl-icon - v-if="item.failedDelete" - v-gl-tooltip="{ title: $options.i18n.ASYNC_DELETE_IMAGE_ERROR_MESSAGE }" + v-if="warningIconText" + v-gl-tooltip="{ title: warningIconText }" + data-testid="warning-icon" name="warning" class="gl-text-orange-500" /> |