mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Merge pull request #1979 from weaveworks/1977-fix-notty-resizing
Allow resizing on attached pipes too.
This commit is contained in:
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user