codeout/inet-henge

'Star' Layout in a Pop

Closed this issue · 3 comments

iNet-Henge is great. I like it...
But I have an issue when is 'Pop' related devices.
So I have added a switch node and a load of PC nodes.
I then link each of the PC's to the switch.

If I don't 'Pop' them they display radially, in a star around my switch.
If i do 'Pop' them they display in 1 column.
How can I fix this? Is it me?

Thanks
Steve

ftosteve,

Thank you for your comment!

If i do 'Pop' them they display in 1 column.

Could you show me your JSON data to reproduce in my environment?

Hi, Thanks for your reply. I have now fixed it.
Nothing wrong with your code but rather my usage.
I was only displaying 1 switch with multiple PC's attached.
If however I add a Core switch connected to the Switch, the nodes then 'star' around their parent switch correctly.
Sorry to waste your time.
If you still want to see what I mean then here is the json:
{
"nodes": [
{ "name": "swa15: 282-uk-swa15:l2", "icon": "./images/switch.png", "meta": { "loopback": "10.254.60.25" } },
{ "name": "swa15: sf-uksto-bh1044", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.57" } },
{ "name": "swa15: sfuksto-bh10626", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.254" } },
{ "name": "swa15: sf-uksto-bh1107", "icon": "./images/pc.png", "meta": { "loopback": "10.234.232.84" } },
{ "name": "swa15: sf-uksto-bh1736", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.90" } },
{ "name": "swa15: sf-uksto-bh1761", "icon": "./images/pc.png", "meta": { "loopback": "10.234.228.121" } },
{ "name": "swa15: uksto-bh11504", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.88" } },
{ "name": "swa15: uksto-bh12246", "icon": "./images/pc.png", "meta": { "loopback": "10.234.228.39" } },
{ "name": "swa15: uksto-bh12369", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.81" } },
{ "name": "swa15: uksto-bh14223", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.123" } },
{ "name": "swa15: uksto-bh15149", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.244" } },
{ "name": "swa15: uksto-bh1709", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.120" } },
{ "name": "swa15: uksto-bh1829", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.162" } },
{ "name": "swa15: uksto-bh1871", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.46" } },
{ "name": "swa15: uksto-bh8679", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.65" } }
],

"links": [
{ "source": "swa15: sf-uksto-bh1761", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/38" } } },
{ "source": "swa15: sf-uksto-bh1736", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/20" } } },
{ "source": "swa15: uksto-bh1709", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/40" } } },
{ "source": "swa15: uksto-bh11504", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/31" } } },
{ "source": "swa15: uksto-bh15149", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/30" } } },
{ "source": "swa15: uksto-bh1871", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/7" } } },
{ "source": "swa15: sf-uksto-bh1044", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/25" } } },
{ "source": "swa15: uksto-bh12369", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/18" } } },
{ "source": "swa15: uksto-bh14223", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/16" } } },
{ "source": "swa15: uksto-bh12246", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/33" } } },
{ "source": "swa15: sfuksto-bh10626", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/17" } } },
{ "source": "swa15: uksto-bh1829", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/34" } } },
{ "source": "swa15: uksto-bh8679", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/32" } } },
{ "source": "swa15: sf-uksto-bh1107", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/1" } } }
]
}

What fixed it was just adding 1 node and 1 link. Simple really :o)
{
"nodes": [
{ "name": "DR: 282-uk-swc03:l3", "icon": "./images/router.png", "meta": { "loopback": "10.254.60.3" } },
{ "name": "swa15: 282-uk-swa15:l2", "icon": "./images/switch.png", "meta": { "loopback": "10.254.60.25" } },
{ "name": "swa15: sf-uksto-bh1044", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.57" } },
{ "name": "swa15: sfuksto-bh10626", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.254" } },
{ "name": "swa15: sf-uksto-bh1107", "icon": "./images/pc.png", "meta": { "loopback": "10.234.232.84" } },
{ "name": "swa15: sf-uksto-bh1736", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.90" } },
{ "name": "swa15: sf-uksto-bh1761", "icon": "./images/pc.png", "meta": { "loopback": "10.234.228.121" } },
{ "name": "swa15: uksto-bh11504", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.88" } },
{ "name": "swa15: uksto-bh12246", "icon": "./images/pc.png", "meta": { "loopback": "10.234.228.39" } },
{ "name": "swa15: uksto-bh12369", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.81" } },
{ "name": "swa15: uksto-bh14223", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.123" } },
{ "name": "swa15: uksto-bh15149", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.244" } },
{ "name": "swa15: uksto-bh1709", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.120" } },
{ "name": "swa15: uksto-bh1829", "icon": "./images/pc.png", "meta": { "loopback": "10.234.229.162" } },
{ "name": "swa15: uksto-bh1871", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.46" } },
{ "name": "swa15: uksto-bh8679", "icon": "./images/pc.png", "meta": { "loopback": "10.234.230.65" } }
],

"links": [
{ "source": "swa15: 282-uk-swa15:l2", "target": "DR: 282-uk-swc03:l3", "meta": { "interface": { "source": "gigabitethernet1/0/38" } } },
{ "source": "swa15: sf-uksto-bh1761", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/38" } } },
{ "source": "swa15: sf-uksto-bh1736", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/20" } } },
{ "source": "swa15: uksto-bh1709", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/40" } } },
{ "source": "swa15: uksto-bh11504", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/31" } } },
{ "source": "swa15: uksto-bh15149", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/30" } } },
{ "source": "swa15: uksto-bh1871", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/7" } } },
{ "source": "swa15: sf-uksto-bh1044", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/25" } } },
{ "source": "swa15: uksto-bh12369", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/18" } } },
{ "source": "swa15: uksto-bh14223", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/16" } } },
{ "source": "swa15: uksto-bh12246", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/33" } } },
{ "source": "swa15: sfuksto-bh10626", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/17" } } },
{ "source": "swa15: uksto-bh1829", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/34" } } },
{ "source": "swa15: uksto-bh8679", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/32" } } },
{ "source": "swa15: sf-uksto-bh1107", "target": "swa15: 282-uk-swa15:l2", "meta": { "interface": { "source": "gigabitethernet1/0/1" } } }
]
}

Thanks again.
Steve

Thanks! Your JSON helps me to check what happened before your fix.
I'll be closing this issue as the problem has been gone.