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

27 lines
576 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.
*/
const Vue = require('vue');
2017-02-24 13:47:17 -05:00
const terminalIconSvg = require('../../../../views/shared/icons/_icon_terminal.svg');
2016-12-14 19:59:04 -05:00
2017-02-09 06:52:22 -05:00
module.exports = Vue.component('terminal-button-component', {
props: {
terminalPath: {
type: String,
default: '',
},
2017-02-24 13:47:17 -05:00
},
data() {
return { terminalIconSvg };
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"
:href="terminalPath">
<span class="js-terminal-icon-container" v-html="terminalIconSvg"></span>
</a>
`,
});