summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/explorer/pages/index.vue
blob: 95d83c829875babae8a8f66ce6d88d3d96c6642d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<script>
import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
import { mapState, mapActions, mapGetters } from 'vuex';
import { s__ } from '~/locale';

export default {
  components: {
    GlAlert,
    GlSprintf,
    GlLink,
  },
  i18n: {
    garbageCollectionTipText: s__(
      'ContainerRegistry|This Registry contains deleted image tag data. Remember to run  %{docLinkStart}garbage collection%{docLinkEnd} to remove the stale data from storage.',
    ),
  },
  computed: {
    ...mapState(['config']),
    ...mapGetters(['showGarbageCollection']),
  },
  methods: {
    ...mapActions(['setShowGarbageCollectionTip']),
  },
};
</script>

<template>
  <div>
    <gl-alert
      v-if="showGarbageCollection"
      variant="tip"
      class="my-2"
      @dismiss="setShowGarbageCollectionTip(false)"
    >
      <gl-sprintf :message="$options.i18n.garbageCollectionTipText">
        <template #docLink="{content}">
          <gl-link :href="config.garbageCollectionHelpPagePath" target="_blank">
            {{ content }}
          </gl-link>
        </template>
      </gl-sprintf>
    </gl-alert>

    <transition name="slide">
      <router-view ref="router-view" />
    </transition>
  </div>
</template>