mirror of
https://github.com/ansible/awx.git
synced 2026-04-09 20:19:21 -02:30
add facts recent endpoints
* Hang most recent listing of facts per-host off of /hosts/n/
This commit is contained in:
@@ -4,12 +4,11 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from jsonbfield.fields import JSONField
|
||||
|
||||
from awx.main.fields import JSONBField
|
||||
|
||||
__all__ = ('Fact', 'FactRecent')
|
||||
|
||||
|
||||
class FactRecent(models.Model):
|
||||
host = models.ForeignKey(
|
||||
'Host',
|
||||
@@ -97,3 +96,4 @@ class Fact(models.Model):
|
||||
fact_obj = Fact.objects.create(host_id=host_id, module=module, timestamp=timestamp, facts=facts)
|
||||
fact_obj.save()
|
||||
return fact_obj
|
||||
|
||||
|
||||
Reference in New Issue
Block a user