src/pyams_notify/event.py
changeset 57 acaa49debeb6
parent 46 a5b2dd544313
equal deleted inserted replaced
56:39d7bddcd810 57:acaa49debeb6
    86 class NotificationEncoder(json.JSONEncoder):
    86 class NotificationEncoder(json.JSONEncoder):
    87     """Notification encoder"""
    87     """Notification encoder"""
    88 
    88 
    89     def default(self, obj):
    89     def default(self, obj):
    90         if isinstance(obj, Notification):
    90         if isinstance(obj, Notification):
    91             return {'action': obj.action,
    91             return {'host': obj.request.host,
       
    92                     'action': obj.action,
    92                     'category': obj.category,
    93                     'category': obj.category,
    93                     'title': obj.title,
    94                     'title': obj.title,
    94                     'message': obj.message,
    95                     'message': obj.message,
    95                     'source': obj.source,
    96                     'source': obj.source,
    96                     'target': obj.target,
    97                     'target': obj.target,