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>
|
|
|
|
`,
|
|
|
|
});
|