summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/google_cloud/components/deployments_service_table.vue
blob: 7d27d7cf6b250bf124373fc934e90356b1f697b6 (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
<script>
import { GlButton, GlTable } from '@gitlab/ui';
import { __ } from '~/locale';

const i18n = {
  cloudRun: __('Cloud Run'),
  cloudRunDescription: __('Deploy container based web apps on Google managed clusters'),
  cloudStorage: __('Cloud Storage'),
  cloudStorageDescription: __('Deploy static assets and resources to Google managed CDN'),
  deployments: __('Deployments'),
  deploymentsDescription: __(
    'Configure pipelines to deploy web apps, backend services, APIs and static resources to Google Cloud',
  ),
  configureViaMergeRequest: __('Configure via Merge Request'),
  service: __('Service'),
  description: __('Description'),
};

export default {
  components: { GlButton, GlTable },
  props: {
    cloudRunUrl: {
      type: String,
      required: true,
    },
    cloudStorageUrl: {
      type: String,
      required: true,
    },
  },
  fields: [
    { key: 'title', label: i18n.service },
    { key: 'description', label: i18n.description },
    { key: 'action', label: '' },
  ],
  items: [
    {
      title: i18n.cloudRun,
      description: i18n.cloudRunDescription,
      action: { title: i18n.configureViaMergeRequest, disabled: true },
    },
    {
      title: i18n.cloudStorage,
      description: i18n.cloudStorageDescription,
      action: { title: i18n.configureViaMergeRequest, disabled: true },
    },
  ],
  i18n,
};
</script>
<template>
  <div class="gl-mx-3">
    <h2 class="gl-font-size-h2">{{ $options.i18n.deployments }}</h2>
    <p>{{ $options.i18n.deploymentsDescription }}</p>
    <gl-table :fields="$options.fields" :items="$options.items">
      <template #cell(action)="{ value }">
        <gl-button :disabled="value.disabled">{{ value.title }}</gl-button>
      </template>
    </gl-table>
  </div>
</template>