From eb8a56bb1f3f4e24bf53e1c07d269cbe3554e285 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Thu, 11 Jun 2015 19:19:54 +0200 Subject: [PATCH] show N/A if node disappears on remove --- client/app/scripts/components/node-details.js | 17 ++++++++++++----- client/app/styles/main.less | 4 ++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index 96913ea76..1c74c0db9 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -32,9 +32,15 @@ const NodeDetails = React.createClass({ n/a
- Not visible to Scope anymore: {this.props.nodeId} + {this.props.nodeId}
+
+

+ This node is not visible to Scope anymore. + The node will re-appear if it communicates again. +

+
); }, @@ -43,13 +49,14 @@ const NodeDetails = React.createClass({ const details = this.props.details; const nodeExists = this.props.nodes[this.props.nodeId]; - if (!details) { - if (nodeExists) { - return this.renderLoading(); - } + if (!nodeExists) { return this.renderNotAvailable(); } + if (!details) { + return this.renderLoading(); + } + const style = { 'background-color': this.getNodeColorDark(details.label_major) }; diff --git a/client/app/styles/main.less b/client/app/styles/main.less index cc1794187..b4df69bf9 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -290,6 +290,10 @@ body { width: 100%; padding: 0 36px 0 36px; overflow-y: scroll; + + &-info { + margin-top: 16px; + } } &-table {