Phase 1 abgeschlossen: Art DSL, Host-IP an Bridge, Port 8001
- Schnittstellen-Art DSL: nur an Routern, ohne Bridge, Verbindung und IP - IP-Adresse kann an einer Bridge liegen (Host-IP), alternativ zur Schnittstelle - Admin: IP-Inline an Bridge und Schnittstelle inkl. Netz-Feld - Lokaler Port 8001 (8000 durch Portainer belegt) - README v0.4: offene Punkte 5 (teilweise) und 6 geklärt, Kapitel 10 aktualisiert - 49 Tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c22a717479
commit
c1766cd8ca
9 files changed
+151
-25
No files matched your search
+8
-3
@@ -41,10 +41,14 @@ class IPAdresseInline(admin.TabularInline):
|
||||
form = GeprueftesModelForm
|
||||
model = IPAdresse
|
||||
extra = 0
|
||||
fields = ["adresse", "schnittstelle", "art", "notiz"]
|
||||
fields = ["adresse", "netz", "schnittstelle", "bridge", "art", "notiz"]
|
||||
autocomplete_fields = ["schnittstelle"]
|
||||
|
||||
|
||||
class IPAdresseImNetzInline(IPAdresseInline):
|
||||
fields = ["adresse", "schnittstelle", "bridge", "art", "notiz"]
|
||||
|
||||
|
||||
@admin.register(Standort)
|
||||
class StandortAdmin(admin.ModelAdmin):
|
||||
form = GeprueftesModelForm
|
||||
@@ -73,6 +77,7 @@ class BridgeAdmin(admin.ModelAdmin):
|
||||
form = GeprueftesModelForm
|
||||
list_display = ["__str__", "host", "vlan_aware"]
|
||||
list_filter = ["host", "vlan_aware"]
|
||||
inlines = [IPAdresseInline]
|
||||
|
||||
|
||||
@admin.register(Schnittstelle)
|
||||
@@ -104,13 +109,13 @@ class NetzAdmin(admin.ModelAdmin):
|
||||
list_display = ["name", "slug", "cidr", "typ", "vlan_id", "gateway", "dhcp_von", "dhcp_bis", "standort"]
|
||||
list_filter = ["typ", "standort"]
|
||||
prepopulated_fields = {"slug": ["name"]}
|
||||
inlines = [IPAdresseInline]
|
||||
inlines = [IPAdresseImNetzInline]
|
||||
|
||||
|
||||
@admin.register(IPAdresse)
|
||||
class IPAdresseAdmin(admin.ModelAdmin):
|
||||
form = GeprueftesModelForm
|
||||
list_display = ["adresse", "netz", "schnittstelle", "art", "notiz"]
|
||||
list_display = ["adresse", "netz", "zugeordnet_an", "art", "notiz"]
|
||||
list_filter = ["netz", "art"]
|
||||
search_fields = ["adresse", "notiz", "schnittstelle__name", "schnittstelle__geraet__name"]
|
||||
autocomplete_fields = ["schnittstelle"]
|
||||
|
||||
Reference in new issue
Block a user