Beispiel #1
0
def incident_events(request):
	"""
	Retrieves incident events for a specified incident
	@param request: The Django WSGI Request to process
	@type request: WSGIRequest
	@return: A response code to indicate status and the incident events table data
	@rtype: dict
	"""
	try:
		data = get_request_data(request)
		data_source = TableData.incidents(system = data.get('system_id'), incident = data.get('incident_id'))
		return JsonResponse(data_source)
	except Exception as ex:
		lgr.exception('Get incident events table data exception %s' % ex)
	return JsonResponse({'code': '800.500.001'})
Beispiel #2
0
def escalation_rules(request):
	"""
	Retrieves escalation rules for a system
	@param request: The Django WSGI Request to process
	@type request: WSGIRequest
	@return: A response code to indicate status and the escalation rules table data
	@rtype: dict
	"""
	try:
		data = get_request_data(request)
		data_source = TableData.escalation_rules(
			system = data.get('system_id'), parameters = data.get('body')
		)
		return JsonResponse(data_source)
	except Exception as ex:
		lgr.exception('Get escalation rules table data exception %s' % ex)
	return JsonResponse({'code': '800.500.001'})
Beispiel #3
0
def system_recipient_table_data(request):
	"""
	Retrieves  System Recipients Table data
	@param request: The Django WSGI Request to process
	@type request: WSGIRequest
	@return: A response code to indicate successful rule creation or otherwise
	@rtype: dict
	"""
	try:
		data = get_request_data(request)
		data_source = TableData.get_system_recipients(
			parameters = data.get('body'), system_id = data.get('system_id')
		)
		return JsonResponse(data_source)
	except Exception as ex:
		lgr.exception('Get Table data %s' % ex)
	return JsonResponse({'code': '800.500.001'})