gitlab-org--gitlab-foss/app/assets/javascripts/environments/components/environment_terminal_button.js

38 lines
604 B
JavaScript
Raw Normal View History

2017-02-09 06:52:22 -05:00
/**
* Renders a terminal button to open a web terminal.
* Used in environments table.
*/
import terminalIconSvg from 'icons/_icon_terminal.svg';
2016-12-14 19:59:04 -05:00
export default {
2017-02-09 06:52:22 -05:00
props: {
terminalPath: {
type: String,
required: false,
2017-02-09 06:52:22 -05:00
default: '',
},
2017-02-24 13:47:17 -05:00
},
data() {
return {
terminalIconSvg,
};
},
computed: {
title() {
return 'Terminal';
},
2017-02-09 06:52:22 -05:00
},
2016-12-14 19:59:04 -05:00
2017-02-09 06:52:22 -05:00
template: `
<a class="btn terminal-button has-tooltip"
data-container="body"
:title="title"
:aria-label="title"
2017-02-09 06:52:22 -05:00
:href="terminalPath">
2017-02-24 19:44:46 -05:00
${terminalIconSvg}
2017-02-09 06:52:22 -05:00
</a>
`,
};