Commit df7fe637 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'web-terminal_xterm_weblinks' into 'master'

web-terminal: Add support for URL to Link parsing

See merge request gitlab-org/gitlab-ce!24242
parents 08a320aa 7df39921
...@@ -2,11 +2,13 @@ import _ from 'underscore'; ...@@ -2,11 +2,13 @@ import _ from 'underscore';
import $ from 'jquery'; import $ from 'jquery';
import { Terminal } from 'xterm'; import { Terminal } from 'xterm';
import * as fit from 'xterm/lib/addons/fit/fit'; 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'; import { canScrollUp, canScrollDown } from '~/lib/utils/dom_utils';
const SCROLL_MARGIN = 5; const SCROLL_MARGIN = 5;
Terminal.applyAddon(fit); Terminal.applyAddon(fit);
Terminal.applyAddon(webLinks);
export default class GLTerminal { export default class GLTerminal {
constructor(element, options = {}) { constructor(element, options = {}) {
...@@ -48,6 +50,7 @@ export default class GLTerminal { ...@@ -48,6 +50,7 @@ export default class GLTerminal {
this.terminal.open(this.container); this.terminal.open(this.container);
this.terminal.fit(); this.terminal.fit();
this.terminal.webLinksInit();
this.terminal.focus(); this.terminal.focus();
this.socket.onopen = () => { this.socket.onopen = () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment