2013-04-25 Miguel de Dios <miguel.dedios@artica.es>

* extensions/update_manager/update_pandora.php: cleaned source code
	style.
	
	* include/functions_events.php,
	operation/events/events.build_table.php: show columns by group in
	metaconsole.
	
	Fixes: #3609374




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8083 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-29 14:09:01 +00:00
parent 481960d32b
commit 4b1ed028a7
4 changed files with 55 additions and 2 deletions

View File

@ -1,3 +1,14 @@
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* extensions/update_manager/update_pandora.php: cleaned source code
style.
* include/functions_events.php,
operation/events/events.build_table.php: show columns by group in
metaconsole.
Fixes: #3609374
2013-04-29 Sergio Martin <sergio.martin@artica.es> 2013-04-29 Sergio Martin <sergio.martin@artica.es>
* images/mod_async_proc.png * images/mod_async_proc.png

View File

@ -79,7 +79,7 @@ function update_pandora_administration($settings, $user_key) {
$conf_update_pandora = update_pandora_get_conf(); $conf_update_pandora = update_pandora_get_conf();
if (!empty($conf_update_pandora['last_installed'])) { if (!empty($conf_update_pandora['last_installed'])){
echo '<h4>'; echo '<h4>';
echo __('Your Pandora FMS open source package installed is') . echo __('Your Pandora FMS open source package installed is') .
' ' . $conf_update_pandora['last_installed']; ' ' . $conf_update_pandora['last_installed'];

View File

@ -18,11 +18,40 @@ include_once($config['homedir'] . "/include/functions_ui.php");
include_once($config['homedir'] . "/include/functions_tags.php"); include_once($config['homedir'] . "/include/functions_tags.php");
enterprise_include_once ('meta/include/functions_events_meta.php'); enterprise_include_once ('meta/include/functions_events_meta.php');
/** /**
* @package Include * @package Include
* @subpackage Events * @subpackage Events
*/ */
function events_get_all_fields() {
$columns = array();
$columns['id_evento'] = __('Event id');
$columns['evento'] = __('Event name');
$columns['id_agente'] = __('Agent name');
$columns['id_usuario'] = __('User');
$columns['id_grupo'] = __('Group');
$columns['estado'] = __('Status');
$columns['timestamp'] = __('Timestamp');
$columns['event_type'] = __('Event type');
$columns['id_agentmodule'] = __('Agent module');
$columns['id_alert_am'] = __('Alert');
$columns['criticity'] = __('Criticity');
$columns['user_comment'] = __('Comment');
$columns['tags'] = __('Tags');
$columns['source'] = __('Source');
$columns['id_extra'] = __('Extra id');
$columns['owner_user'] = __('Owner');
$columns['ack_utimestamp'] = __('ACK Timestamp');
$columns['instructions'] = __('Instructions');
$columns['server_name'] = __('Server name');
return $columns;
}
/** /**
* Get all rows of events from the database, that * Get all rows of events from the database, that
* pass the filter, and can get only some fields. * pass the filter, and can get only some fields.
@ -50,6 +79,14 @@ function events_get_events ($filter = false, $fields = false) {
return db_get_all_rows_filter ('tevento', $filter, $fields); return db_get_all_rows_filter ('tevento', $filter, $fields);
} }
/**
* Get the event with the id pass as parameter.
*
* @param int $id Event id
* @param mixed $fields The fields to show or by default all with false.
*
* @return mixed False in case of error or invalid values passed. Event row otherwise
*/
function events_get_event ($id, $fields = false) { function events_get_event ($id, $fields = false) {
if (empty ($id)) if (empty ($id))
return false; return false;

View File

@ -23,7 +23,12 @@ $table->head = array ();
$table->data = array (); $table->data = array ();
//fields that the user has selected to show //fields that the user has selected to show
$show_fields = explode (',', $config['event_fields']); if ($meta) {
$show_fields = events_meta_get_custom_fields_user();
}
else {
$show_fields = explode (',', $config['event_fields']);
}
//headers //headers
$i = 0; $i = 0;