Commit Graph

44 Commits

Author SHA1 Message Date
Jim Ladd
2b792573f8 set messages default 2019-08-25 23:11:24 -07:00
Jim Ladd
8158632344 render notification templates 2019-08-25 23:11:24 -07:00
Jim Ladd
1a1eab4dab create jinja context based on job serialization 2019-08-25 23:11:24 -07:00
Jim Ladd
13b9679496 save/validate messages 2019-08-25 23:11:24 -07:00
Jim Ladd
0ddc32a6dc sort notification_type 2019-08-24 20:37:58 -07:00
Jim Ladd
cb411cc3be Add messages field 2019-08-24 20:37:35 -07:00
beeankha
0a0b09b394 Update logic in send method to recognize password field in upgraded webhook notifications 2019-07-23 11:47:19 -04:00
beeankha
69502bc133 Add functions in migration file for deleting and altering 'any' state notifications 2019-06-17 10:47:58 -04:00
beeankha
c6f1806a23 Removing references to 'any' state notifications 2019-06-17 10:47:58 -04:00
beeankha
c65e6ba30b Update the logic for 'any' and 'started' notifications 2019-06-17 10:47:58 -04:00
beeankha
9cfed6f2a8 Add check for no-op case back, remove redundant on_commit code 2019-06-17 10:47:58 -04:00
beeankha
8d6e1f0927 Trigger running notifications in WFJs and edit unit test 2019-06-17 10:47:57 -04:00
beeankha
8ec97235e3 Add feature for notifications to trigger on job start 2019-06-17 10:47:57 -04:00
AlanCoding
f4c18843a3 Resolve default ordering warnings from tests 2019-05-20 10:58:36 -04:00
beeankha
f5ea595763 Enable timeout feature to remain functional after upgrade
Have the UI spinner fill with a default upon notification type change or
upgrade.
2019-04-03 19:06:11 -04:00
AlanCoding
fbf6315a8c remove star imports in tasks and non-base models 2019-02-12 19:50:30 -05:00
Sebastian
4058d18593 Add grafana notification type 2019-01-20 13:51:23 +01:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
Matthew Jones
f5252d9147 Merge pull request #1624 from theblazehen/devel
Add Rocket.Chat notification type
2018-03-26 06:41:48 -07:00
Ryan Petrello
f59f47435b send job notification templates _after_ all events have been processed
see: https://github.com/ansible/awx/issues/500
2018-03-22 09:30:41 -04:00
Jeandre Le Roux
fd12c44ada Add Rocket.Chat notification type
Summary: Add Rocket.Chat notification type
Issue type: Feature Pull Request
Component: Notifications

Signed-off-by: Jeandre Le Roux <theblazehen@theblazehen.com>
2018-03-21 10:02:50 +02:00
crepe
bb0e968704 Add mattermost notifications 2017-09-09 22:00:31 -07:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
Ryan Petrello
12d41e2deb Support AWX_TASK_ENV injection in task and notification invocations.
This change _only_ injects `AWS_TASK_ENV` into `os.environ`; it's up to
underlying libraries to be good citizens and actually respect things
like `HTTPS_PROXY`.

see: #3508
2017-07-06 13:51:37 -04:00
Aaron Tan
7f1f68ee28 Prevent nested encrypted field leak in activity stream. 2017-05-23 14:05:55 -04:00
Aaron Tan
d0d201863b Enforce org dependency of notification template. 2017-04-28 10:14:21 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Matthew Jones
785a8d0789 Fix an issue where smtplib can't handle unicode strings
We probably do get this value as unicode originally but when we store
it, due to a recently fixed bug it will come out as *not* unicode.

So things were accidentally working because py2 smtplib uses hmac
which won't accept unicode.

This change adds a flag to encrypt_field that forces it to skip the
utf8 fixup from before for narrow use cases.
2017-02-15 14:07:30 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
AlanCoding
339661a6a5 New method to monkeypatch JSONField 2016-11-14 16:35:56 -05:00
Aaron Tan
eaa6567cf3 Convert notification_subject from byte string to unicode. 2016-09-28 15:51:34 -04:00
Chris Meyers
27b9fb8dab refactor notifications 2016-08-30 14:36:18 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Matthew Jones
469bff1d0b Fix required fields in notifier serializer
Handle the situation where the password field was left as-is when
posting the existing encrypted field
2016-04-04 12:04:31 -04:00
Matthew Jones
41d5393af0 Clean up flake8 related issues 2016-02-23 15:30:07 -05:00
Matthew Jones
ab3669efa9 Refactor message generator
* Job object can now control the output and generate K:V output for
  notification types that can support it
* Notifications store the body as json/dict now to encode more
  information
* Notification Type can further compose the message based on what is
  sensible for the notification type
* This will also allow customizing the message template in the future
* All notification types use sane defaults for the level of detail now
2016-02-22 17:09:36 -05:00
Matthew Jones
eb3d663d18 Support notification password field encryption
Modify encrypt_field and decrypt_field to support sub-fields under a
dictionary object.  It still uses the parent key when encrypting.
2016-02-21 23:11:17 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Matthew Jones
9d6739045a Implement irc notification backend 2016-02-11 15:34:27 -05:00
Matthew Jones
7abcb6e306 Add webhook notification backend 2016-02-10 17:03:57 -05:00
Matthew Jones
34ebe0a848 Pagerduty and Hipchat backends plus some cleanup 2016-02-10 15:17:11 -05:00
Matthew Jones
8db2f60405 Notification serializers, views, and tasks
* Implement concrete Notification model for notification runs
* Implement NotificationTemplate and Notification serializers and views
* Implement ancillary views
* Implement NotificationTemplate trigger m2m fields on all job templates
  via a fields mixin
* Link NotificationTemplates with an org
* Link notifications with the activity stream
* Implement Notification celery tasks
* Extend Backend field parameters to identify sender and receiver as
  parameters needed by the message and not the backend itself
* Updates to backends to better fit the django email backend model as it
  relates to Messages
* Implement success job chain task + notifications
* Implement notifications in error job chain task
2016-02-09 23:12:55 -05:00
Matthew Jones
172207cd4b Notification endpoints and url expositions
Also some changes to the footprint of the notification handler classes
2016-02-04 15:52:23 -05:00
Matthew Jones
7385efef35 Adding some early Notifications stubs
* A basic NotificationTemplate model class with early notification type
  definitions
* Initial implementations of the Email, Slack, and Twilio Notification
  backends using the Django email backend system
* Some dependencies thereof
2016-02-04 15:52:23 -05:00