Added agent's custom fields to table result

This action is to enable search and summary in the dashboard view.
This commit is contained in:
João Paulo Ros 2023-03-30 11:44:15 -07:00 committed by GitHub
parent b28316a4f2
commit 4c789225b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,7 @@ class AgentTableSerializer(serializers.ModelSerializer):
local_ips = serializers.ReadOnlyField()
make_model = serializers.ReadOnlyField()
physical_disks = serializers.ReadOnlyField()
custom_fields = AgentCustomFieldSerializer(many=True, read_only=True)
def get_alert_template(self, obj):
if not obj.alert_template:
@ -153,6 +154,7 @@ class AgentTableSerializer(serializers.ModelSerializer):
"local_ips",
"make_model",
"physical_disks",
"custom_fields",
]
depth = 2