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

uninstall_application_button.vue « components « clusters « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73191d6d84d5ac924fe796c3183c7fa81a6ca797 (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
<script>
import { GlButton } from '@gitlab/ui';
import { APPLICATION_STATUS } from '~/clusters/constants';
import { __ } from '~/locale';

const { UPDATING, UNINSTALLING } = APPLICATION_STATUS;

export default {
  components: {
    GlButton,
  },
  props: {
    status: {
      type: String,
      required: true,
    },
  },
  computed: {
    disabled() {
      return [UNINSTALLING, UPDATING].includes(this.status);
    },
    loading() {
      return this.status === UNINSTALLING;
    },
    label() {
      return this.loading ? __('Uninstalling') : __('Uninstall');
    },
  },
};
</script>

<template>
  <gl-button :disabled="disabled" variant="default" :loading="loading">
    {{ label }}
  </gl-button>
</template>