mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
HostMetrics migration
This commit is contained in:
committed by
John Westcott IV
parent
ef4e77d78f
commit
d80759cd7a
@@ -1549,10 +1549,18 @@ class HostRelatedSearchMixin(object):
|
||||
|
||||
|
||||
class HostMetricList(ListAPIView):
|
||||
always_allow_superuser = False
|
||||
name = _("Host Metrics List")
|
||||
model = models.HostMetric
|
||||
serializer_class = serializers.HostMetricSerializer
|
||||
permission_classes = (IsSystemAdminOrAuditor,)
|
||||
search_fields = ('hostname', 'deleted')
|
||||
|
||||
|
||||
class HostMetricDetail(RetrieveDestroyAPIView):
|
||||
name = _("Host Metric Detail")
|
||||
model = models.HostMetric
|
||||
serializer_class = serializers.HostMetricSerializer
|
||||
permission_classes = (IsSystemAdminOrAuditor,)
|
||||
|
||||
|
||||
class HostList(HostRelatedSearchMixin, ListCreateAPIView):
|
||||
|
||||
Reference in New Issue
Block a user