mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-30 03:41:50 -05:00
job template labels init implementation
This commit is contained in:
@@ -2075,6 +2075,14 @@ class JobTemplateNotifiersSuccessList(SubListCreateAttachDetachAPIView):
|
||||
parent_model = JobTemplate
|
||||
relationship = 'notifiers_success'
|
||||
|
||||
class JobTemplateLabelList(SubListCreateAttachDetachAPIView):
|
||||
|
||||
model = Label
|
||||
serializer_class = LabelSerializer
|
||||
parent_model = JobTemplate
|
||||
relationship = 'labels'
|
||||
parent_key = 'job_template'
|
||||
|
||||
class JobTemplateCallback(GenericAPIView):
|
||||
|
||||
model = JobTemplate
|
||||
@@ -2333,6 +2341,14 @@ class JobDetail(RetrieveUpdateDestroyAPIView):
|
||||
return self.http_method_not_allowed(request, *args, **kwargs)
|
||||
return super(JobDetail, self).update(request, *args, **kwargs)
|
||||
|
||||
class JobLabelList(SubListAPIView):
|
||||
|
||||
model = Label
|
||||
serializer_class = LabelSerializer
|
||||
parent_model = Job
|
||||
relationship = 'labels'
|
||||
parent_key = 'job'
|
||||
|
||||
class JobActivityStreamList(SubListAPIView):
|
||||
|
||||
model = ActivityStream
|
||||
@@ -3148,6 +3164,18 @@ class NotificationDetail(RetrieveAPIView):
|
||||
serializer_class = NotificationSerializer
|
||||
new_in_300 = True
|
||||
|
||||
class LabelList(ListCreateAPIView):
|
||||
|
||||
model = Label
|
||||
serializer_class = LabelSerializer
|
||||
new_in_300 = True
|
||||
|
||||
class LabelDetail(RetrieveUpdateAPIView):
|
||||
|
||||
model = Label
|
||||
serializer_class = LabelSerializer
|
||||
new_in_300 = True
|
||||
|
||||
class ActivityStreamList(SimpleListAPIView):
|
||||
|
||||
model = ActivityStream
|
||||
|
||||
Reference in New Issue
Block a user