<%= d.name %>
<%= d.typeLabel %>
<%= d.nodeCount %> componenten · <%= d.edgeCount %> flows · bijgewerkt <%= new Date(d.updated_at).toLocaleDateString('nl-NL') %>
<% if (Object.keys(d.layers || {}).length) { %>
<% Object.entries(d.layers).forEach(function(e){ %><%= e[0] %>: <%= e[1] %><% }) %>
<% } %>
<% if (d.nodes && d.nodes.length) { %>
<% d.nodes.slice(0,12).forEach(function(n,i){ %>
<% if (i > 0) { %>→<% } %>
<%= n.label || n.type %><% if (n.rack_device_id) { %> ●rack<% } %>
<% }) %>
<% if (d.nodes.length > 12) { %>+<%= d.nodes.length - 12 %> meer<% } %>
<% } %>
<% if (d.edges && d.edges.length) { %>
| # | Van | Naar | Protocol | Animatie |
<% d.edges.forEach(function(e,i){
var from = (d.nodes || []).find(function(n){ return n.id == e.from; });
var to = (d.nodes || []).find(function(n){ return n.id == e.to; });
%>
| <%= i+1 %> |
<%= from ? from.label : e.from %> |
→ <%= to ? to.label : e.to %> |
<%= e.protocol || '—' %> |
<%= e.flow || 'off' %> |
<% }) %>
<% } %>
Open in designer
<% }) %>