mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 00:46:43 +00:00
ui: Fix empty SVG height to prevent service mesh from breaking when there are no upstreams (#10122)
This commit is contained in:
parent
4ad37c326e
commit
ce98d08d12
3
.changelog/10122.txt
Normal file
3
.changelog/10122.txt
Normal file
@ -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…
x
Reference in New Issue
Block a user