feat: map hypervisor clusters to NetBox clusters automatically

- Read the vCenter/ESXi compute resource and the Proxmox cluster name
  (node name when standalone) for every VM
- Match each hypervisor cluster to a NetBox cluster by name, normalized
  name or unique similarity; remember manual choices per profile and
  offer to create missing clusters (with cluster type)
- Import wizard: per-cluster mapping table instead of a single cluster,
  tenant prefilled from the mapped clusters, review shows the mapping
- Show the hypervisor cluster in the VM table

fix: graphic glitches
- Empty state text no longer clipped by the buttons
- Combo boxes open a plain drop-down list instead of the overlay popup
- Status bar badges keep their height and no longer get cut off

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-12 15:24:00 +02:00
1 parent 4878275f2a
commit c3b5fb547e
12 files changed
+300 -50

No files matched your search

+1 -5
View File
@@ -60,6 +60,7 @@ class VMsPage(Page):
Column("netbox", "NetBox", 95, value=self._netbox_state,
color=lambda row: "accent" if self._netbox_state(row) == "Neu" else "text_muted"),
Column("source", "Quelle", 140),
Column("cluster", "Cluster", 140, tooltip=lambda row: f"Hypervisor-Cluster: {row.get('cluster') or '–'}"),
Column("kind", "Typ", 55),
Column("status", "Status", 135, value=lambda row: "Eingeschaltet" if row["status"] == "active" else "Aus",
dot=lambda row: "success" if row["status"] == "active" else "text_faint"),
@@ -188,11 +189,6 @@ class VMsPage(Page):
vms = self.model.checked_rows()
if not vms or self.state.engine is None:
return
if not self.state.engine.clusters:
widgets.message(self.window, "Kein Cluster in NetBox",
"In NetBox ist noch kein Cluster angelegt. Bitte zuerst unter Virtualisierung → Cluster "
"einen Cluster anlegen und die VMs neu laden.", "warning")
return
wizard = ImportWizard(self.window, self.state, self.tasks, vms)
wizard.exec()
if wizard.result_summary: