ui: Fix empty SVG height to prevent service mesh from breaking when there are no upstreams (#10122)
This commit is contained in:
parent
16f1995d6d
commit
c9b7fe5051
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Adding conditional to prevent Service Mesh from breaking when there are no Upstreams
|
||||
```
|
|
@ -108,14 +108,16 @@ export default class TopologyMetrics extends Component {
|
|||
// Calculate viewBox dimensions
|
||||
this.downView = document.getElementById('downstream-lines').getBoundingClientRect();
|
||||
const upstreamLines = document.getElementById('upstream-lines').getBoundingClientRect();
|
||||
const upstreamColumn = document.getElementById('upstream-column').getBoundingClientRect();
|
||||
const upstreamColumn = document.getElementById('upstream-column');
|
||||
|
||||
this.upView = {
|
||||
x: upstreamLines.x,
|
||||
y: upstreamLines.y,
|
||||
width: upstreamLines.width,
|
||||
height: upstreamColumn.height,
|
||||
};
|
||||
if (upstreamColumn) {
|
||||
this.upView = {
|
||||
x: upstreamLines.x,
|
||||
y: upstreamLines.y,
|
||||
width: upstreamLines.width,
|
||||
height: upstreamColumn.getBoundingClientRect().height + 10,
|
||||
};
|
||||
}
|
||||
|
||||
// Get Card elements positions
|
||||
const downCards = [
|
||||
|
|
Loading…
Reference in New Issue