mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 09:45:29 +00:00
fix: remove deleted DomainEntities on diagram
This commit is contained in:
parent
c3a6129dcb
commit
b4aef61de2
@ -7,7 +7,7 @@ import {rolesToColor} from "../../../../utils/functions/rolesToColor";
|
|||||||
export function domainEntitiesToEdges(d: Domain, withRegistrar = false) {
|
export function domainEntitiesToEdges(d: Domain, withRegistrar = false) {
|
||||||
const rdapRoleTranslated = rdapRoleTranslation()
|
const rdapRoleTranslated = rdapRoleTranslation()
|
||||||
return d.entities
|
return d.entities
|
||||||
.filter(e => !withRegistrar ? !e.roles.includes('registrar') : true)
|
.filter(e => !e.deleted && (!withRegistrar ? !e.roles.includes('registrar') : true))
|
||||||
.map(e => ({
|
.map(e => ({
|
||||||
id: `e-${d.ldhName}-${e.entity.handle}`,
|
id: `e-${d.ldhName}-${e.entity.handle}`,
|
||||||
source: e.roles.includes('registrant') || e.roles.includes('registrar') ? e.entity.handle : d.ldhName,
|
source: e.roles.includes('registrant') || e.roles.includes('registrar') ? e.entity.handle : d.ldhName,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export const domainToNode = (d: Domain) => ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const domainEntitiesToNode = (d: Domain, withRegistrar = false) => d.entities
|
export const domainEntitiesToNode = (d: Domain, withRegistrar = false) => d.entities
|
||||||
.filter(e => !withRegistrar ? !e.roles.includes('registrar') : true)
|
.filter(e => !e.deleted && (!withRegistrar ? !e.roles.includes('registrar') : true))
|
||||||
.map(e => {
|
.map(e => {
|
||||||
return {
|
return {
|
||||||
id: e.entity.handle,
|
id: e.entity.handle,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user