feat: network topology diagram with Packet-Tracer-style symbols
- New section "Netzwerk-Topologie": one diagram per site built from NetBox cable paths (traced through patch panels), layered top-down by cabling (provider > firewall/router > core > access > endpoints), barycenter ordering, "2x" for parallel links, provider circuits as clouds and devices outside the scope dashed. Labels: management IP, model, ports. - New export format "draw.io": the topology as an editable .drawio file (one page per site, symbols embedded). - 14 built-in symbols drawn with Pillow; automatic mapping from role, model and manufacturer, passive gear (patch panels, PDUs, UPS) hidden. - New TopologySymbol model (migration 0002) with list/edit/delete UI, symbol gallery, custom icon upload and a "Topologie-Symbol" button on device type and device role pages. Bump version to 0.4.0 - requires "manage.py migrate". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -160,12 +160,14 @@ def render_docx(doc):
|
||||
cell = t.cell(0, i).paragraphs[0]
|
||||
cell.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
if png:
|
||||
cell.add_run().add_picture(BytesIO(png), width=Cm(7)) # Höhe skaliert mit der Rackgröße
|
||||
# Topologie: volle Breite; Racks: 7 cm (Höhe skaliert mit der Rackgröße)
|
||||
cell.add_run().add_picture(BytesIO(png), width=Cm(16.5 if blk.level == 1 else 7))
|
||||
else:
|
||||
cell.add_run("(Rack-Grafik nicht verfügbar)")
|
||||
cap = t.cell(1, i).paragraphs[0]
|
||||
cap.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
cap.add_run(img["caption"]).italic = True
|
||||
if img["caption"]:
|
||||
cap.add_run(img["caption"]).italic = True
|
||||
d.add_paragraph()
|
||||
|
||||
# Fußzeile nur setzen, wenn die Vorlage keine eigene mitbringt
|
||||
|
||||
Reference in New Issue
Block a user