debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_external_url.vue
2019-02-15 15:39:39 +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>