Skip to content

Commit

Permalink
Merge pull request #2882 from weaveworks/use-service-ui-terminal-route
Browse files Browse the repository at this point in the history
Use a context sensitive route for the popped out terminal.html
  • Loading branch information
foot committed Oct 12, 2017
2 parents 055a766 + b990473 commit 71a18fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/app/scripts/components/terminal.js
Expand Up @@ -9,7 +9,7 @@ import Term from 'xterm';
import { clickCloseTerminal } from '../actions/app-actions';
import { getNeutralColor } from '../utils/color-utils';
import { setDocumentTitle } from '../utils/title-utils';
import { getPipeStatus, doResizeTty, getWebsocketUrl, getApiPath } from '../utils/web-api-utils';
import { getPipeStatus, doResizeTty, getWebsocketUrl, basePath } from '../utils/web-api-utils';

const log = debug('scope:terminal');

Expand Down Expand Up @@ -243,7 +243,7 @@ class Terminal extends React.Component {

const bcr = this.node.getBoundingClientRect();
const minWidth = (this.state.characterWidth * 80) + (8 * 2);
openNewWindow(`${getApiPath()}/terminal.html#!/state/${paramString}`, bcr, minWidth);
openNewWindow(`${basePath(window.location.pathname)}/terminal.html#!/state/${paramString}`, bcr, minWidth);
}

handleResize() {
Expand Down
1 change: 1 addition & 0 deletions client/app/scripts/index.js
@@ -1,3 +1,4 @@
exports.reducer = require('./reducers/root').default;
exports.Scope = require('./components/app').default;
exports.actions = require('./actions/app-actions');
exports.TerminalApp = require('./components/terminal-app').default;

0 comments on commit 71a18fe

Please sign in to comment.