Skip to content

Commit

Permalink
Merge pull request #1979 from weaveworks/1977-fix-notty-resizing
Browse files Browse the repository at this point in the history
Allow resizing on attached pipes too.
  • Loading branch information
davkal authored Nov 4, 2016
2 parents d0d100b + 4004b21 commit 722d5cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/app/scripts/components/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down Expand Up @@ -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});
}
}

Expand Down
4 changes: 3 additions & 1 deletion client/app/scripts/utils/web-api-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 722d5cd

Please sign in to comment.