diff options
Diffstat (limited to 'app/assets/javascripts/environments/components/environment_terminal_button.js')
-rw-r--r-- | app/assets/javascripts/environments/components/environment_terminal_button.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/environments/components/environment_terminal_button.js b/app/assets/javascripts/environments/components/environment_terminal_button.js new file mode 100644 index 00000000000..66a71faa02f --- /dev/null +++ b/app/assets/javascripts/environments/components/environment_terminal_button.js @@ -0,0 +1,27 @@ +/** + * Renders a terminal button to open a web terminal. + * Used in environments table. + */ +import terminalIconSvg from 'icons/_icon_terminal.svg'; + +export default { + props: { + terminalPath: { + type: String, + required: false, + default: '', + }, + }, + + data() { + return { terminalIconSvg }; + }, + + template: ` + <a class="btn terminal-button" + title="Open web terminal" + :href="terminalPath"> + ${terminalIconSvg} + </a> + `, +}; |