diff --git a/client/app/scripts/components/details.js b/client/app/scripts/components/details.js index 24e9553da..bccab8f1a 100644 --- a/client/app/scripts/components/details.js +++ b/client/app/scripts/components/details.js @@ -16,7 +16,8 @@ const Details = React.createClass({ - + ); @@ -27,7 +28,6 @@ const Details = React.createClass({ AppActions.clickCloseDetails(); } - }); module.exports = Details; diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index 099290317..1c74c0db9 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -18,28 +18,60 @@ const NodeDetails = React.createClass({ TitleUtils.resetTitle(); }, - render: function() { - const node = this.props.details; + renderLoading: function() { + return ( +
+ ); + }, - if (!node) { - return
; + renderNotAvailable: function() { + return ( +
+
+

+ n/a +

+
+ {this.props.nodeId} +
+
+
+

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

+
+
+ ); + }, + + render: function() { + const details = this.props.details; + const nodeExists = this.props.nodes[this.props.nodeId]; + + if (!nodeExists) { + return this.renderNotAvailable(); + } + + if (!details) { + return this.renderLoading(); } const style = { - 'background-color': this.getNodeColorDark(node.label_major) + 'background-color': this.getNodeColorDark(details.label_major) }; return (

- {node.label_major} + {details.label_major}

-
{node.label_minor}
+
{details.label_minor}
- {this.props.details.tables.map(function(table) { + {details.tables.map(function(table) { return ; })}
diff --git a/client/app/styles/main.less b/client/app/styles/main.less index 4f12fd9aa..b4df69bf9 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -19,6 +19,7 @@ @primary-color: @weave-charcoal-blue; @background-color: lighten(@primary-color, 66%); @background-secondary-color: lighten(@background-color, 8%); +@background-dark-color: @primary-color; @text-color: lighten(@primary-color, 10%); @text-secondary-color: lighten(@primary-color, 33%); @text-tertiary-color: lighten(@primary-color, 50%); @@ -275,7 +276,10 @@ body { font-size: 120%; color: @white; } + } + &-notavailable { + background-color: @background-dark-color; } } @@ -286,6 +290,10 @@ body { width: 100%; padding: 0 36px 0 36px; overflow-y: scroll; + + &-info { + margin-top: 16px; + } } &-table {