From d8761aada1b11cd967a67f7507039b83482fe02f Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Wed, 6 Apr 2016 17:17:06 +0200 Subject: [PATCH] Fix terminals (broken since f34146d) `controlPipe` is now an immutable map, but was not treated that way by all components. --- client/app/scripts/actions/app-actions.js | 8 ++++---- client/app/scripts/components/app.js | 1 - client/app/scripts/components/embedded-terminal.js | 5 +++-- client/app/scripts/components/terminal-app.js | 1 - client/app/scripts/components/terminal.js | 6 +++--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 401ad9a54..36274ce29 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -219,10 +219,10 @@ export function enterNode(nodeId) { export function hitEsc() { const controlPipe = AppStore.getControlPipe(); - if (controlPipe && controlPipe.status === 'PIPE_DELETED') { + if (controlPipe && controlPipe.get('status') === 'PIPE_DELETED') { AppDispatcher.dispatch({ type: ActionTypes.CLICK_CLOSE_TERMINAL, - pipeId: controlPipe.id + pipeId: controlPipe.get('id') }); updateRoute(); // Don't deselect node on ESC if there is a controlPipe (keep terminal open) @@ -320,8 +320,8 @@ export function receiveControlPipe(pipeId, nodeId, rawTty) { } const controlPipe = AppStore.getControlPipe(); - if (controlPipe && controlPipe.id !== pipeId) { - deletePipe(controlPipe.id); + if (controlPipe && controlPipe.get('id') !== pipeId) { + deletePipe(controlPipe.get('id')); } AppDispatcher.dispatch({ diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 2868de368..da50a2acb 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -118,7 +118,6 @@ export default class App extends React.Component { {showingTerminal && }
diff --git a/client/app/scripts/components/embedded-terminal.js b/client/app/scripts/components/embedded-terminal.js index b80909b5b..b4d4c5c26 100644 --- a/client/app/scripts/components/embedded-terminal.js +++ b/client/app/scripts/components/embedded-terminal.js @@ -5,7 +5,8 @@ import Terminal from './terminal'; import { DETAILS_PANEL_WIDTH, DETAILS_PANEL_MARGINS, DETAILS_PANEL_OFFSET } from '../constants/styles'; -export default function EmeddedTerminal({pipe, nodeId, details}) { +export default function EmeddedTerminal({pipe, details}) { + const nodeId = pipe.get('nodeId'); const node = details.get(nodeId); const d = node && node.details; const titleBarColor = d && getNodeColorDark(d.rank, d.label); @@ -21,7 +22,7 @@ export default function EmeddedTerminal({pipe, nodeId, details}) { // the term.js and creating a new one for the new pipe. return (
-
); diff --git a/client/app/scripts/components/terminal-app.js b/client/app/scripts/components/terminal-app.js index dec4e86f6..0c5fa87a8 100644 --- a/client/app/scripts/components/terminal-app.js +++ b/client/app/scripts/components/terminal-app.js @@ -42,7 +42,6 @@ export class TerminalApp extends React.Component { return (
{this.state.controlPipe &&

Connection Closed