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

deployments_table.vue « environment_details « environments « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e46411f4d2cc33e4a0ec558f6ea10ee2d92de153 (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
72
73
<script>
import { GlTableLite } from '@gitlab/ui';
import Commit from '~/vue_shared/components/commit.vue';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import DeploymentStatusLink from './components/deployment_status_link.vue';
import DeploymentJob from './components/deployment_job.vue';
import DeploymentTriggerer from './components/deployment_triggerer.vue';
import DeploymentActions from './components/deployment_actions.vue';
import { ENVIRONMENT_DETAILS_TABLE_FIELDS } from './constants';

export default {
  components: {
    DeploymentTriggerer,
    DeploymentActions,
    DeploymentJob,
    Commit,
    TimeAgoTooltip,
    DeploymentStatusLink,
    GlTableLite,
  },
  props: {
    deployments: {
      type: Array,
      required: true,
    },
  },
  tableFields: ENVIRONMENT_DETAILS_TABLE_FIELDS,
};
</script>
<template>
  <gl-table-lite :items="deployments" :fields="$options.tableFields" fixed stacked="lg">
    <template #table-colgroup="{ fields }">
      <col v-for="field in fields" :key="field.key" :class="field.columnClass" />
    </template>
    <template #cell(status)="{ item }">
      <deployment-status-link :deployment-job="item.job" :status="item.status" />
    </template>
    <template #cell(id)="{ item }">
      <strong data-testid="deployment-id">{{ item.id }}</strong>
    </template>
    <template #cell(triggerer)="{ item }">
      <deployment-triggerer :triggerer="item.triggerer" />
    </template>
    <template #cell(commit)="{ item }">
      <commit v-bind="item.commit" />
    </template>
    <template #cell(job)="{ item }">
      <deployment-job :job="item.job" />
    </template>
    <template #cell(created)="{ item }">
      <time-ago-tooltip
        :time="item.created"
        enable-truncation
        data-testid="deployment-created-at"
      />
    </template>
    <template #cell(deployed)="{ item }">
      <time-ago-tooltip
        v-if="item.deployed"
        :time="item.deployed"
        enable-truncation
        data-testid="deployment-deployed-at"
      />
    </template>
    <template #cell(actions)="{ item }">
      <deployment-actions
        :actions="item.actions"
        :rollback="item.rollback"
        :approval-environment="item.deploymentApproval"
      />
    </template>
  </gl-table-lite>
</template>