Merge pull request #1979 from weaveworks/1977-fix-notty-resizing

Allow resizing on attached pipes too.
This commit is contained in:
David
2016-11-04 13:30:05 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -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});
}
}

View File

@@ -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));