mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Exported wsUrl constant from web-api-utils for the terminal component
This commit is contained in:
@@ -9,10 +9,8 @@ import Term from 'xterm';
|
||||
import { clickCloseTerminal } from '../actions/app-actions';
|
||||
import { getNeutralColor } from '../utils/color-utils';
|
||||
import { setDocumentTitle } from '../utils/title-utils';
|
||||
import { getPipeStatus, basePath, doResizeTty } from '../utils/web-api-utils';
|
||||
import { getPipeStatus, doResizeTty, wsUrl } from '../utils/web-api-utils';
|
||||
|
||||
const wsProto = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
const wsUrl = `${wsProto}://${location.host}${basePath(location.pathname)}`;
|
||||
const log = debug('scope:terminal');
|
||||
|
||||
const DEFAULT_COLS = 80;
|
||||
|
||||
@@ -63,7 +63,7 @@ const API_PATH = basePathSlash(window.location.pathname) === '/'
|
||||
: `/api${window.location.pathname}/api`;
|
||||
|
||||
const wsProto = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||
const wsUrl = basePathSlash(window.location.pathname) === '/'
|
||||
export const wsUrl = basePathSlash(window.location.pathname) === '/'
|
||||
? `${wsProto}://${location.host}${basePath(window.location.pathname)}`
|
||||
: `${wsProto}://${location.host}/api${basePath(window.location.pathname)}`;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.production.config.js",
|
||||
"build-external": "EXTERNAL=true webpack --config webpack.production.config.js",
|
||||
"build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist/styles",
|
||||
"build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist",
|
||||
"install": "./post-install",
|
||||
"start": "node server.js",
|
||||
"start-production": "NODE_ENV=production node server.js",
|
||||
|
||||
Reference in New Issue
Block a user