Fix error when suspending and configuring a packet filter on a link

This commit is contained in:
grossmj 2023-01-31 19:18:27 +08:00
parent 829bfe12d7
commit aeef3e74ed
2 changed files with 2 additions and 6 deletions

View File

@ -87,6 +87,7 @@ export class LinkWidget implements Widget {
.filter((l) => {
return (
!l.capturing &&
!l.suspend &&
(l.filters.bpf || l.filters.corrupt || l.filters.delay || l.filters.frequency_drop || l.filters.packet_loss)
);
})
@ -113,9 +114,7 @@ export class LinkWidget implements Widget {
link_body
.filter((l) => {
return (
l.capturing &&
l.suspend &&
!(l.filters.bpf || l.filters.corrupt || l.filters.delay || l.filters.frequency_drop || l.filters.packet_loss)
l.suspend
);
})
.append<SVGGElement>('g')

View File

@ -63,9 +63,6 @@ export class LinkService {
}
updateLink(server: Server, link: Link) {
link.x = Math.round(link.x);
link.y = Math.round(link.y);
return this.httpServer.put<Link>(server, `/projects/${link.project_id}/links/${link.link_id}`, link);
}