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

runner_summary_cell.vue « cells « components « runner « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1cd098d67130623c3d90971d54eed5312cb73c2b (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
67
68
69
70
71
<script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';

import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
import RunnerName from '../runner_name.vue';
import RunnerTypeBadge from '../runner_type_badge.vue';

import { I18N_LOCKED_RUNNER_DESCRIPTION } from '../../constants';

export default {
  components: {
    GlIcon,
    TooltipOnTruncate,
    RunnerName,
    RunnerTypeBadge,
  },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  props: {
    runner: {
      type: Object,
      required: true,
    },
  },
  computed: {
    runnerType() {
      return this.runner.runnerType;
    },
    locked() {
      return this.runner.locked;
    },
    description() {
      return this.runner.description;
    },
    ipAddress() {
      return this.runner.ipAddress;
    },
  },
  i18n: {
    I18N_LOCKED_RUNNER_DESCRIPTION,
  },
};
</script>

<template>
  <div>
    <slot :runner="runner" name="runner-name">
      <runner-name :runner="runner" />
    </slot>

    <runner-type-badge :type="runnerType" size="sm" />
    <gl-icon
      v-if="locked"
      v-gl-tooltip
      :title="$options.i18n.I18N_LOCKED_RUNNER_DESCRIPTION"
      name="lock"
    />
    <tooltip-on-truncate class="gl-display-block gl-text-truncate" :title="description">
      {{ description }}
    </tooltip-on-truncate>
    <tooltip-on-truncate
      v-if="ipAddress"
      class="gl-display-block gl-text-truncate"
      :title="ipAddress"
    >
      <span class="gl-md-display-none gl-lg-display-inline">{{ __('IP Address') }}</span>
      <strong>{{ ipAddress }}</strong>
    </tooltip-on-truncate>
  </div>
</template>