diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 24f82a08c3..d4c6adeb6d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-04-02 Sergio Martin + + * operation/reporting/reporting_xml.php: Added xml export + feature to the new report items of inventory and inventory changes + 2012-04-02 Dario Rodriguez * godmode/menu.php: Delete reporting menu in godmode section. diff --git a/pandora_console/operation/reporting/reporting_xml.php b/pandora_console/operation/reporting/reporting_xml.php index 543d5e61ae..0321c70297 100644 --- a/pandora_console/operation/reporting/reporting_xml.php +++ b/pandora_console/operation/reporting/reporting_xml.php @@ -619,6 +619,30 @@ foreach ($contents as $content) { $data["title"] = __('MTTR'); $data["objdata"] = $mttr; + break; + case 'inventory': + $data["title"] = __('Inventory'); + $data["objdata"]["inventory"] = array(); + + $es = json_decode($content['external_source'], true); + + $id_agent = $es['id_agents']; + $module_name = $es['inventory_modules']; + $date = $es['date']; + + $data["objdata"]["inventory"] = inventory_get_data((array)$id_agent,(array)$module_name,$date,'',false, 'array'); + break; + case 'inventory_changes': + $data["title"] = __('Inventory changes'); + $data["objdata"]["inventory_changes"] = array(); + + $es = json_decode($content['external_source'], true); + + $id_agent = $es['id_agents']; + $module_name = $es['inventory_modules']; + + $data["objdata"]["inventory_changes"] = inventory_get_changes($id_agent, $module_name, $report["datetime"] - $content['period'], $report["datetime"], 'array'); + break; } xml_array ($data);