add facts recent endpoints

* Hang most recent listing of facts per-host off of /hosts/n/
This commit is contained in:
Chris Meyers
2017-04-04 17:09:07 -04:00
parent f5d7d0bce5
commit f7fb541fe2
6 changed files with 20 additions and 2 deletions

View File

@@ -1835,6 +1835,15 @@ class HostFactCompareView(SystemTrackingEnforcementMixin, SubDetailAPIView):
return Response(self.serializer_class(instance=fact_entry).data)
class HostFactsRecentList(SubListAPIView):
model = FactRecent
parent_model = Host
relationship = 'facts_recent'
serializer_class = FactSerializer
new_in_320 = True
class GroupList(ListCreateAPIView):
model = Group