mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Improve comments; fix missing links w/o metrics
This commit is contained in:
@@ -198,7 +198,7 @@ class NodeDetails extends React.Component {
|
||||
</div>}
|
||||
|
||||
<div className="node-details-content">
|
||||
{Object.keys(metricLinks).length > 0 && <div className="node-details-content-section">
|
||||
{((details.metrics || []).length + Object.keys(unattachedLinks).length > 0) && <div className="node-details-content-section">
|
||||
<div className="node-details-content-section-header">Status</div>
|
||||
<NodeDetailsHealth
|
||||
metrics={details.metrics}
|
||||
|
||||
@@ -29,7 +29,6 @@ export default class NodeDetailsHealth extends React.Component {
|
||||
topologyId,
|
||||
} = this.props;
|
||||
|
||||
const hasUnattached = Object.keys(unattachedLinks).length > 0;
|
||||
const primeCutoff = metrics.length > 3 && !this.state.expanded ? 2 : metrics.length;
|
||||
const primeMetrics = metrics.slice(0, primeCutoff);
|
||||
const overflowMetrics = metrics.slice(primeCutoff);
|
||||
@@ -57,7 +56,7 @@ export default class NodeDetailsHealth extends React.Component {
|
||||
handleClick={this.handleClickMore} collection={this.props.metrics}
|
||||
expanded={this.state.expanded} notShown={notShown} hideNumber />
|
||||
|
||||
{hasUnattached && <div className="node-details-health-wrapper">
|
||||
<div className="node-details-health-wrapper">
|
||||
{Object.keys(unattachedLinks).map(id => <CloudFeature alwaysShow key={id}>
|
||||
<NodeDetailsHealthLinkItem
|
||||
withoutGraph
|
||||
@@ -66,7 +65,7 @@ export default class NodeDetailsHealth extends React.Component {
|
||||
topologyId={topologyId}
|
||||
/>
|
||||
</CloudFeature>)}
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user