add new field to checks serializer for agent
@@ -92,6 +92,7 @@ class CheckSerializer(serializers.ModelSerializer):
pingchecks = PingCheckSerializer(many=True, read_only=True)
winservicechecks = WinServiceCheckSerializer(many=True, read_only=True)
scriptchecks = ScriptCheckSerializer(many=True, read_only=True)
+ checks = serializers.ReadOnlyField()
class Meta:
model = Agent
@@ -106,8 +107,10 @@ class CheckSerializer(serializers.ModelSerializer):
"pingchecks",
"winservicechecks",
"scriptchecks",
+ "checks",
)
+
class PolicyChecksSerializer(serializers.ModelSerializer):
diskchecks = DiskCheckSerializer(many=True, read_only=True)
cpuloadchecks = CpuLoadCheckSerializer(many=True, read_only=True)
@@ -127,5 +130,5 @@ class PolicyChecksSerializer(serializers.ModelSerializer):
"memchecks",
"pingchecks",
"winservicechecks",
- "scriptchecks"
+ "scriptchecks",
)
