2012-06-11 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_reporting.php
	 operation/reporting/reporting_xml.php: Fixed XML items exportation
	 and item editor for alert agent and alert event.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6468 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2012-06-11 07:27:14 +00:00
parent 6c5a6943b0
commit 67ec5cfe38
3 changed files with 14 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2012-06-11 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_reporting.php
operation/reporting/reporting_xml.php: Fixed XML items exportation
and item editor for alert agent and alert event.
2012-06-09 Sancho Lerena <slerena@artica.es>
* functions_config.php: Fixed API password problem when

View File

@ -1234,11 +1234,11 @@ function reporting_alert_reporting_module ($id_agent_module, $period = 0, $date
$table->head[3] = __('Fired');
$alerts = db_get_all_rows_sql('SELECT *
$alerts = db_get_all_rows_sql('SELECT *, t1.id as id_alert_template_module
FROM talert_template_modules AS t1
INNER JOIN talert_templates AS t2 ON t1.id = t2.id
INNER JOIN talert_templates AS t2 ON t1.id_alert_template = t2.id
WHERE id_agent_module = ' . $id_agent_module);
if ($alerts === false) {
$alerts = array();
}
@ -1251,7 +1251,7 @@ function reporting_alert_reporting_module ($id_agent_module, $period = 0, $date
FROM talert_actions
WHERE id IN (SELECT id_alert_action
FROM talert_template_module_actions
WHERE id_alert_template_module = ' . $alert['id'] . ');');
WHERE id_alert_template_module = ' . $alert['id_alert_template_module'] . ');');
$data[2] = '<ul class="action_list">';
if ($actions === false) {
$actions = array();
@ -1262,7 +1262,7 @@ function reporting_alert_reporting_module ($id_agent_module, $period = 0, $date
$data[2] .= '</ul>';
$data[3] = '<ul style="list-style-type: disc; margin-left: 10px;">';
$firedTimes = get_module_alert_fired($id_agent_module, $alert['id'], (int) $period, (int) $date);
$firedTimes = get_module_alert_fired($id_agent_module, $alert['id_alert_template_module'], (int) $period, (int) $date);
if ($firedTimes === false) {
$firedTimes = array();
}

View File

@ -209,7 +209,7 @@ foreach ($contents as $content) {
230, '', null, false, true, false, ($datetime + $content['period']), '', true, 0, true, true);
preg_match("/src='(.*)'/", $img, $matches);
$url = $matches[1];
$url = "<![CDATA[".$matches[1]."]]>";
$data["objdata"]["img"] = $url;
break;
@ -232,7 +232,7 @@ foreach ($contents as $content) {
array_push ($weights, $content2["weight"]);
}
$img = $data[0] = graphic_combined_module(
$img = graphic_combined_module(
$modules,
$weights,
$content['period'],
@ -246,7 +246,7 @@ foreach ($contents as $content) {
$datetime);
preg_match("/src='(.*)'/", $img, $matches);
$url = $matches[1];
$url = "<![CDATA[".$matches[1]."]]>";
$data["objdata"]["img"] = $url;