Update interface-status.ts

This commit is contained in:
piotrpekala7 2020-07-21 20:02:55 +02:00
parent dede19d686
commit e228ac2654

View File

@ -70,7 +70,9 @@ export class InterfaceStatusWidget implements Widget {
status_started status_started
.merge(status_started_enter) .merge(status_started_enter)
.attr('class', 'status_started') .attr('class', 'status_started')
.attr('width', 60) .attr('width', (ls: LinkStatus) => {
return (ls.port.length * 8) + 10;
})
.attr('height', 20) .attr('height', 20)
.attr('x', (ls: LinkStatus) => ls.x - 30) .attr('x', (ls: LinkStatus) => ls.x - 30)
.attr('y', (ls: LinkStatus) => ls.y - 10) .attr('y', (ls: LinkStatus) => ls.y - 10)
@ -100,7 +102,9 @@ export class InterfaceStatusWidget implements Widget {
status_stopped status_stopped
.merge(status_stopped_enter) .merge(status_stopped_enter)
.attr('class', 'status_stopped') .attr('class', 'status_stopped')
.attr('width', 60) .attr('width', (ls: LinkStatus) => {
return (ls.port.length * 8) + 10;
})
.attr('height', 20) .attr('height', 20)
.attr('x', (ls: LinkStatus) => ls.x - 30) .attr('x', (ls: LinkStatus) => ls.x - 30)
.attr('y', (ls: LinkStatus) => ls.y - 10) .attr('y', (ls: LinkStatus) => ls.y - 10)
@ -130,7 +134,9 @@ export class InterfaceStatusWidget implements Widget {
status_suspended status_suspended
.merge(status_suspended_enter) .merge(status_suspended_enter)
.attr('class', 'status_suspended') .attr('class', 'status_suspended')
.attr('width', 60) .attr('width', (ls: LinkStatus) => {
return (ls.port.length * 8) + 10;
})
.attr('height', 20) .attr('height', 20)
.attr('x', (ls: LinkStatus) => ls.x - 30) .attr('x', (ls: LinkStatus) => ls.x - 30)
.attr('y', (ls: LinkStatus) => ls.y - 10) .attr('y', (ls: LinkStatus) => ls.y - 10)