From ebd6376bd4529bb362d3df7855d1000178257357 Mon Sep 17 00:00:00 2001 From: guyfedwards Date: Wed, 22 Aug 2018 15:32:35 +0100 Subject: [PATCH] support `storagesheet` for old scope reports Old versions of scope reports use `storagesheet` as the value for node shape. This shape is no longer supported in weaveworks-ui-components and so this commit normalises to `sheet` for compatiblity with old reports. related #3322 --- client/app/scripts/charts/nodes-chart-elements.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/app/scripts/charts/nodes-chart-elements.js b/client/app/scripts/charts/nodes-chart-elements.js index de3034850..a9002ad8c 100644 --- a/client/app/scripts/charts/nodes-chart-elements.js +++ b/client/app/scripts/charts/nodes-chart-elements.js @@ -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 (