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
|
// Calculate viewBox dimensions
|
||||||
this.downView = document.getElementById('downstream-lines').getBoundingClientRect();
|
this.downView = document.getElementById('downstream-lines').getBoundingClientRect();
|
||||||
const upstreamLines = document.getElementById('upstream-lines').getBoundingClientRect();
|
const upstreamLines = document.getElementById('upstream-lines').getBoundingClientRect();
|
||||||
const upstreamColumn = document.getElementById('upstream-column').getBoundingClientRect();
|
const upstreamColumn = document.getElementById('upstream-column');
|
||||||
|
|
||||||
this.upView = {
|
if (upstreamColumn) {
|
||||||
x: upstreamLines.x,
|
this.upView = {
|
||||||
y: upstreamLines.y,
|
x: upstreamLines.x,
|
||||||
width: upstreamLines.width,
|
y: upstreamLines.y,
|
||||||
height: upstreamColumn.height,
|
width: upstreamLines.width,
|
||||||
};
|
height: upstreamColumn.getBoundingClientRect().height + 10,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Get Card elements positions
|
// Get Card elements positions
|
||||||
const downCards = [
|
const downCards = [
|
||||||
|
|
Loading…
Reference in New Issue