debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_pin.vue
2021-11-18 22:05:49 +05:30

32 lines
607 B
Vue

<script>
/**
* Renders a prevent auto-stop button.
* Used in environments table.
*/
import { GlDropdownItem } from '@gitlab/ui';
import { __ } from '~/locale';
import eventHub from '../event_hub';
export default {
components: {
GlDropdownItem,
},
props: {
autoStopUrl: {
type: String,
required: true,
},
},
methods: {
onPinClick() {
eventHub.$emit('cancelAutoStop', this.autoStopUrl);
},
},
title: __('Prevent auto-stopping'),
};
</script>
<template>
<gl-dropdown-item @click="onPinClick">
{{ $options.title }}
</gl-dropdown-item>
</template>