diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-07 17:54:45 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-10 14:30:44 +0300 |
commit | 543f92d285d26469d549f7514751dda6ea9be471 (patch) | |
tree | 1a811f68253001454fc3cada77ed44f287af2a27 | |
parent | 7ddea69c2266e395be80dca46201abc02d676182 (diff) | |
download | gitlab-ce-543f92d285d26469d549f7514751dda6ea9be471.tar.gz |
Change websocket url to use gitlab-workhorse.
-rw-r--r-- | app/assets/javascripts/terminal/terminal.js.es6 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/terminal/terminal.js.es6 b/app/assets/javascripts/terminal/terminal.js.es6 index de291fd232d..67435aa3db0 100644 --- a/app/assets/javascripts/terminal/terminal.js.es6 +++ b/app/assets/javascripts/terminal/terminal.js.es6 @@ -9,8 +9,6 @@ gl.Terminal = class { options.screenKeys = options.screenKeys || true; options.cols = options.cols || 100; options.rows = options.rows || 40; - options.sessionId = options.sessionId || ''; - options.port = options.port || 5000; this.container = document.querySelector(options.selector); this.setSocketUrl(); @@ -18,10 +16,10 @@ gl.Terminal = class { } setSocketUrl() { - const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'; - const {sessionId, port} = this.options; + const {protocol, hostname, port} = window.location; + const wsProtocol = protocol === 'https:' ? 'wss://' : 'ws://'; - this.socketUrl = `${protocol}${location.hostname}:${port}/shell/${sessionId}?${document.cookie}`; + this.socketUrl = `${wsProtocol}${hostname}:${port}/gitlab-org/gitlab-ce/deployments/4/terminal_websocket` } createTerminal() { |