Merge pull request #3324 from weaveworks/sheet-storage-node-name-compat

support `storagesheet` for old scope reports
This commit is contained in:
Guy Edwards
2018-08-23 16:53:47 +01:00
committed by GitHub

View File

@@ -150,6 +150,10 @@ class NodesChartElements extends React.Component {
renderNode(node) {
const { isAnimated } = this.props;
// old versions of scope reports have a node shape of `storagesheet`
// if so, normalise to `sheet`
const shape = node.get('shape') === 'storagesheet' ? 'sheet' : node.get('shape');
return (
<NodeContainer
matches={node.get('matches')}
@@ -157,7 +161,7 @@ class NodesChartElements extends React.Component {
metric={node.get('metric')}
focused={node.get('focused')}
highlighted={node.get('highlighted')}
shape={node.get('shape')}
shape={shape}
stacked={node.get('stack')}
key={node.get('id')}
id={node.get('id')}