Reconcile some details-panel stuff after the rebase.

This commit is contained in:
Simon Howe
2016-01-19 17:07:56 +01:00
committed by Paul Bellamy
parent 3d32d10e2d
commit c43abd6075
4 changed files with 8 additions and 5 deletions

View File

@@ -159,7 +159,10 @@ export function hitEsc() {
type: ActionTypes.CLICK_CLOSE_TERMINAL,
pipeId: controlPipe.id
});
// Dont deselect node on ESC if there is a controlPipe (keep terminal open)
} else if (AppStore.getSelectedNodeId() && !controlPipe) {
AppDispatcher.dispatch({type: ActionTypes.DESELECT_NODE});
}
updateRoute();
}

View File

@@ -81,7 +81,7 @@ export default class App extends React.Component {
<div className="app">
{showingDebugToolbar() && <DebugToolbar />}
{showingDetails && <Details nodes={this.state.nodes}
controlStatus={this.state.controlStatus[this.state.selectedNodeId]}
controlStatus={this.state.controlStatus}
details={this.state.nodeDetails} />}
{showingTerminal && <EmbeddedTerminal

View File

@@ -11,9 +11,9 @@ export default class Details extends React.Component {
<div className="details">
{details.map((obj, index) => {
return (
<DetailsCard key={obj.id} controlError={this.props.controlError}
controlPending={this.props.controlPending} index={index}
cardCount={details.size} nodes={this.props.nodes} {...obj} />
<DetailsCard key={obj.id} index={index} cardCount={details.size}
nodes={this.props.nodes}
nodeControlStatus={this.props.controlStatus[obj.id]} {...obj} />
);
})}
</div>

View File

@@ -130,7 +130,7 @@ export default class NodeDetails extends React.Component {
const showSummary = details.metadata !== undefined || details.metrics !== undefined;
const showControls = details.controls && details.controls.length > 0;
const nodeColor = getNodeColorDark(details.rank, details.label_major);
const {error, pending} = (this.props.controlStatus || {});
const {error, pending} = (this.props.nodeControlStatus || {});
const tools = this.renderTools();
const styles = {
controls: {