feat / AEB-64 create alert routes
This commit is contained in:
@@ -8,7 +8,6 @@ class MultiplexorAdmin(admin.ModelAdmin):
|
||||
search_fields = ('name', 'ip', 'subnet', 'gateway', 'sd_path')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('ip', 'subnet', 'gateway', 'sd_path')
|
||||
list_display_links = ('name',)
|
||||
|
||||
@admin.register(Channel)
|
||||
@@ -18,7 +17,6 @@ class ChannelAdmin(admin.ModelAdmin):
|
||||
search_fields = ('multiplexor', 'number', 'position')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('number', 'position')
|
||||
list_display_links = ('multiplexor',)
|
||||
|
||||
@admin.register(SensorType)
|
||||
@@ -28,7 +26,6 @@ class SensorTypeAdmin(admin.ModelAdmin):
|
||||
search_fields = ('code', 'name', 'description')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('name', 'description')
|
||||
list_display_links = ('code',)
|
||||
|
||||
|
||||
@@ -39,17 +36,15 @@ class MetricAdmin(admin.ModelAdmin):
|
||||
search_fields = ('timestamp', 'sensor', 'status')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('value', 'status')
|
||||
list_display_links = ('timestamp',)
|
||||
|
||||
@admin.register(Alert)
|
||||
class AlertAdmin(admin.ModelAdmin):
|
||||
list_display = ('sensor', 'metric', 'sensor_type', 'message', 'severity', 'created_at', 'resolved')
|
||||
list_display = ('sensor', 'sensor_type', 'message', 'severity', 'created_at', 'resolved')
|
||||
list_filter = ('sensor', 'metric', 'sensor_type', 'severity')
|
||||
search_fields = ('sensor', 'metric', 'sensor_type', 'severity')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('message', 'severity', 'resolved')
|
||||
list_display_links = ('sensor',)
|
||||
|
||||
@admin.register(SignalFormat)
|
||||
@@ -59,7 +54,6 @@ class SignalFormatAdmin(admin.ModelAdmin):
|
||||
search_fields = ('sensor_type', 'code', 'unit', 'conversion_rule')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('unit', 'conversion_rule')
|
||||
list_display_links = ('sensor_type',)
|
||||
|
||||
@admin.register(Sensor)
|
||||
@@ -69,7 +63,6 @@ class SensorAdmin(admin.ModelAdmin):
|
||||
search_fields = ('channel', 'sensor_type', 'signal_format', 'serial_number', 'name', 'math_formula')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('signal_format', 'serial_number', 'name', 'math_formula')
|
||||
list_display_links = ('channel',)
|
||||
|
||||
@admin.register(Object)
|
||||
@@ -88,5 +81,4 @@ class ZoneAdmin(admin.ModelAdmin):
|
||||
search_fields = ('object__title', 'name')
|
||||
list_per_page = 10
|
||||
list_max_show_all = 100
|
||||
list_editable = ('floor', 'name')
|
||||
list_display_links = ('object',)
|
||||
Reference in New Issue
Block a user