function insight_ca_report_to_insight_alerts in Insight 7
1 call to insight_ca_report_to_insight_alerts()
File
- ./
insight.module, line 742
Code
function insight_ca_report_to_insight_alerts($context, $analysis, $report) {
//dsm($analysis);
//dsm($report);
$alerts = array();
if (isset($analysis['#insight']['alerts'])) {
foreach ($analysis['#insight']['alerts'] as $alert_name => $alert) {
$alert = array(
'name' => $alert_name,
'report' => $report['name'],
'nid' => $context['nid'],
'path' => $context['path'],
'irid' => $report['irid'],
'status' => $alert['status'],
'message' => $alert['message'],
);
$alerts[$alert_name] = $alert;
}
}
//dsm($alerts);
return $alerts;
}