|
@@ -234,11 +234,17 @@ class ServiceTypeAdmin(admin.ModelAdmin):
|
|
|
|
|
|
|
|
|
class AntennaAdmin(geo_admin.OSMGeoAdmin):
|
|
|
+ list_display = ('__str__', 'ip_display')
|
|
|
inlines = (AntennaAllocationInline,)
|
|
|
list_filter = (
|
|
|
AntennaPrefixFilter,
|
|
|
)
|
|
|
|
|
|
+ def ip_display(self, obj):
|
|
|
+ allocations = obj.allocations(manager='actives').filter(active=True)
|
|
|
+ return ', '.join(allocations.values_list('resource__ip', flat=True))
|
|
|
+ ip_display.short_description = 'IP'
|
|
|
+
|
|
|
def view_on_site(self, obj):
|
|
|
return '/admin/services/antenna/map.html'
|
|
|
|