|
@@ -249,7 +249,7 @@ class IPPrefixAdmin(admin.ModelAdmin):
|
|
|
|
|
|
|
|
|
class IPResourceAdmin(admin.ModelAdmin):
|
|
|
- list_display = ('__str__', 'available_display', 'last_use',)
|
|
|
+ list_display = ('__str__', 'available_display', 'last_use', 'last_ping',)
|
|
|
list_filter = (
|
|
|
'category',
|
|
|
ResourceInUseFilter,
|
|
@@ -289,6 +289,11 @@ class IPResourceAdmin(admin.ModelAdmin):
|
|
|
last_use.short_description = 'Dernière utilisation'
|
|
|
last_use.admin_order_field = 'last_use'
|
|
|
|
|
|
+ def last_ping(self, obj):
|
|
|
+ return obj.last_ping
|
|
|
+ last_ping.short_description = 'Dernier Ping'
|
|
|
+ last_ping.admin_order_field = 'last_ping'
|
|
|
+
|
|
|
def get_actions(self, request):
|
|
|
actions = super().get_actions(request)
|
|
|
if 'delete_selected' in actions:
|