summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/explorer/pages/details.vue
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/registry/explorer/pages/details.vue
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/registry/explorer/pages/details.vue')
-rw-r--r--app/assets/javascripts/registry/explorer/pages/details.vue15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/registry/explorer/pages/details.vue b/app/assets/javascripts/registry/explorer/pages/details.vue
index 540f02d58d4..0894fd6fcfa 100644
--- a/app/assets/javascripts/registry/explorer/pages/details.vue
+++ b/app/assets/javascripts/registry/explorer/pages/details.vue
@@ -22,9 +22,11 @@ import {
ALERT_DANGER_TAGS,
GRAPHQL_PAGE_SIZE,
FETCH_IMAGES_LIST_ERROR_MESSAGE,
+ UNFINISHED_STATUS,
} from '../constants/index';
export default {
+ name: 'RegistryDetailsPage',
components: {
DeleteAlert,
PartialCleanupAlert,
@@ -35,11 +37,11 @@ export default {
TagsLoader,
EmptyTagsState,
},
- inject: ['breadCrumbState', 'config'],
directives: {
GlResizeObserver: GlResizeObserverDirective,
},
mixins: [Tracking.mixin()],
+ inject: ['breadCrumbState', 'config'],
apollo: {
image: {
query: getContainerRepositoryDetailsQuery,
@@ -83,7 +85,10 @@ export default {
return this.image?.tags?.nodes || [];
},
showPartialCleanupWarning() {
- return this.image?.expirationPolicyStartedAt && !this.dismissPartialCleanupWarning;
+ return (
+ this.image?.expirationPolicyCleanupStatus === UNFINISHED_STATUS &&
+ !this.dismissPartialCleanupWarning
+ );
},
tracking() {
return {
@@ -97,7 +102,7 @@ export default {
},
methods: {
deleteTags(toBeDeleted) {
- this.itemsToBeDeleted = this.tags.filter(tag => toBeDeleted[tag.name]);
+ this.itemsToBeDeleted = this.tags.filter((tag) => toBeDeleted[tag.name]);
this.track('click_button');
this.$refs.deleteModal.show();
},
@@ -111,7 +116,7 @@ export default {
mutation: deleteContainerRepositoryTagsMutation,
variables: {
id: this.queryVariables.id,
- tagNames: itemsToBeDeleted.map(i => i.name),
+ tagNames: itemsToBeDeleted.map((i) => i.name),
},
awaitRefetchQueries: true,
refetchQueries: [
@@ -183,7 +188,7 @@ export default {
@dismiss="dismissPartialCleanupWarning = true"
/>
- <details-header :image="image" />
+ <details-header :image="image" :metadata-loading="isLoading" />
<tags-loader v-if="isLoading" />
<template v-else>