diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index bb27f696da..e54220808a 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -185,7 +185,7 @@ class Terminal extends React.Component { this.term = new Term({ cols: this.state.cols, rows: this.state.rows, - convertEol: !this.props.raw, + convertEol: !this.props.pipe.get('raw'), cursorBlink: true, scrollback: 10000, }); @@ -278,6 +278,8 @@ class Terminal extends React.Component { if (resizeTtyControl) { doResizeTty(this.getPipeId(), resizeTtyControl, cols, rows) .then(() => this.setState({cols, rows})); + } else if (!this.props.pipe.get('raw')) { + this.setState({cols, rows}); } } diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index e8c2ec98b5..76bdad3775 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -232,11 +232,13 @@ export function doControlRequest(nodeId, control, dispatch) { if (res) { if (res.pipe) { dispatch(blurSearch()); + const resizeTtyControl = res.resize_tty_control && + {id: res.resize_tty_control, probeId: control.probeId, nodeId: control.nodeId}; dispatch(receiveControlPipe( res.pipe, nodeId, res.raw_tty, - {id: res.resize_tty_control, probeId: control.probeId, nodeId: control.nodeId})); + resizeTtyControl)); } if (res.removedNode) { dispatch(receiveControlNodeRemoved(nodeId));