summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/admin/deploy_keys/components/table.vue
blob: 97a5a2f2f32499f7a794ea34be3f89fe95d4c8bd (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
<script>
import { GlTable, GlButton } from '@gitlab/ui';

import { __ } from '~/locale';

export default {
  name: 'DeployKeysTable',
  i18n: {
    pageTitle: __('Public deploy keys'),
    newDeployKeyButtonText: __('New deploy key'),
  },
  fields: [
    {
      key: 'title',
      label: __('Title'),
    },
    {
      key: 'fingerprint',
      label: __('Fingerprint'),
    },
    {
      key: 'projects',
      label: __('Projects with write access'),
    },
    {
      key: 'created',
      label: __('Created'),
    },
    {
      key: 'actions',
      label: __('Actions'),
    },
  ],
  components: {
    GlTable,
    GlButton,
  },
  inject: ['editPath', 'deletePath', 'createPath', 'emptyStateSvgPath'],
};
</script>

<template>
  <div>
    <div class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-py-5">
      <h4 class="gl-m-0">
        {{ $options.i18n.pageTitle }}
      </h4>
      <gl-button variant="confirm" :href="createPath">{{
        $options.i18n.newDeployKeyButtonText
      }}</gl-button>
    </div>
    <gl-table :fields="$options.fields" data-testid="deploy-keys-list" />
  </div>
</template>