debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_external_url.vue
2018-12-23 12:14:25 +05:30

41 lines
750 B
Vue

<script>
import { GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { s__ } from '~/locale';
/**
* Renders the external url link in environments table.
*/
export default {
components: {
Icon,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
externalUrl: {
type: String,
required: true,
},
},
computed: {
title() {
return s__('Environments|Open live environment');
},
},
};
</script>
<template>
<a
v-gl-tooltip
:title="title"
:aria-label="title"
:href="externalUrl"
class="btn external-url"
target="_blank"
rel="noopener noreferrer nofollow"
>
<icon name="external-link" />
</a>
</template>