diff options
author | robertfoss <dev@robertfoss.se> | 2019-01-08 21:32:37 +0300 |
---|---|---|
committer | robertfoss <dev@robertfoss.se> | 2019-01-08 21:32:37 +0300 |
commit | 7df39921f06023bf3481fe84c9ae90968fdf61e0 (patch) | |
tree | 2f99052cd85e47cea45783a2c8aacd89a403dd77 /app/assets/javascripts | |
parent | e4b31f5415537a8b5172f1b753700d934aeeeb3f (diff) |
web-terminal: Add support for URL to Link parsing
This is desirable since it enables people who are viewing job results
to quickly go from the logs to more detailed information about an issue.
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/terminal/terminal.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/terminal/terminal.js b/app/assets/javascripts/terminal/terminal.js index 560f50ebf8f..e5dd7a465ea 100644 --- a/app/assets/javascripts/terminal/terminal.js +++ b/app/assets/javascripts/terminal/terminal.js @@ -2,11 +2,13 @@ import _ from 'underscore'; import $ from 'jquery'; import { Terminal } from 'xterm'; import * as fit from 'xterm/lib/addons/fit/fit'; +import * as webLinks from 'xterm/lib/addons/webLinks/webLinks'; import { canScrollUp, canScrollDown } from '~/lib/utils/dom_utils'; const SCROLL_MARGIN = 5; Terminal.applyAddon(fit); +Terminal.applyAddon(webLinks); export default class GLTerminal { constructor(element, options = {}) { @@ -48,6 +50,7 @@ export default class GLTerminal { this.terminal.open(this.container); this.terminal.fit(); + this.terminal.webLinksInit(); this.terminal.focus(); this.socket.onopen = () => { |