Welcome to mirror list, hosted at ThFree Co, Russian Federation.

agent_integration_status_row.vue « components « agents « clusters « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 59de6df1e499a40cdd05a8273f0250a8c993fa69 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<script>
import { GlLink, GlIcon, GlBadge } from '@gitlab/ui';
import { s__ } from '~/locale';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';

export default {
  components: {
    GlLink,
    GlIcon,
    GlBadge,
  },
  mixins: [glFeatureFlagMixin()],
  i18n: {
    premiumTitle: s__('ClusterAgents|Premium'),
  },
  props: {
    text: {
      required: true,
      type: String,
    },
    icon: {
      required: false,
      type: String,
      default: 'information',
    },
    iconClass: {
      required: false,
      type: String,
      default: 'text-info',
    },
    helpUrl: {
      required: false,
      type: String,
      default: null,
    },
    featureName: {
      required: false,
      type: String,
      default: null,
    },
  },
  computed: {
    showPremiumBadge() {
      return this.featureName && !this.glFeatures[this.featureName];
    },
  },
};
</script>

<template>
  <li class="gl-mb-3">
    <gl-icon :name="icon" :size="16" :class="iconClass" class="gl-mr-2" />

    <gl-link v-if="helpUrl" :href="helpUrl">{{ text }}</gl-link>
    <span v-else>{{ text }}</span>

    <gl-badge
      v-if="showPremiumBadge"
      size="md"
      class="gl-ml-2 gl-vertical-align-middle"
      icon="license"
      variant="tier"
      >{{ $options.i18n.premiumTitle }}</gl-badge
    >
  </li>
</template>