summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/runner_aws_deployments/runner_aws_deployments.vue
blob: e3e3b9abc3c6e1abd929471fa45a4c40ba3ed93a (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
<script>
import { GlButton, GlModalDirective } from '@gitlab/ui';
import { s__ } from '~/locale';
import RunnerAwsDeploymentsModal from './runner_aws_deployments_modal.vue';

export default {
  components: {
    GlButton,
    RunnerAwsDeploymentsModal,
  },
  directives: {
    GlModalDirective,
  },
  modalId: 'runner-aws-deployments-modal',
  i18n: {
    buttonText: s__('Runners|Deploy GitLab Runner in AWS'),
  },
  data() {
    return {
      opened: false,
    };
  },
  methods: {
    onClick() {
      this.opened = true;
    },
  },
};
</script>
<template>
  <div>
    <gl-button
      v-gl-modal-directive="$options.modalId"
      class="gl-mt-4"
      data-testid="show-modal-button"
      variant="confirm"
      @click="onClick"
    >
      {{ $options.i18n.buttonText }}
    </gl-button>
    <runner-aws-deployments-modal v-if="opened" :modal-id="$options.modalId" />
  </div>
</template>