2012-04-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* godmode/groups/group_list.php
	 godmode/reporting/graphs.php: Several fixes in custom graph editor 
	 with metaconsole activated.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5928 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2012-04-10 16:32:40 +00:00
parent b6c5157efc
commit 041a3af401
3 changed files with 40 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2012-04-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* godmode/groups/group_list.php
godmode/reporting/graphs.php: Several fixes in custom graph editor
with metaconsole activated.
2012-04-10 Dario Rodriguez <dario.rodriguez@artica.es>
*operation/menu.php,

View File

@ -85,8 +85,39 @@ if (is_ajax ()) {
if($search != '') {
$filter['string'] = $search;
}
if ($config['metaconsole'] == 1) {
enterprise_include_once('include/functions_metaconsole.php');
$agents = agents_get_group_agents ($id_group, $filter, "none", false, $recursion);
$connection_names = enterprise_hook('metaconsole_get_connection_names');
if ($connection_names === false)
$connection_names = array();
$agents_tmp = array();
$agents = array();
foreach ($connection_names as $connection) {
$connection_data = enterprise_hook('metaconsole_get_connection', array($connection));
$connection_result = enterprise_hook('metaconsole_load_external_db', array($connection_data));
if ($connection_result) {
$agents_tmp = agents_get_group_agents ($id_group, $filter, "none", false, $recursion);
if ($agents_tmp === false)
$agents_tmp = array();
foreach ($agents_tmp as $agent_key => $agent_name) {
$agents[$connection_data['server_name'] . '|' . $agent_key] = $agent_name;
}
}
enterprise_hook('metaconsole_restore_db');
}
}
else {
$agents = agents_get_group_agents ($id_group, $filter, "none", false, $recursion);
}
echo json_encode ($agents);
return;
}

View File

@ -146,14 +146,14 @@ if (! empty ($graphs)) {
$table->head[1] = __('Description');
$table->head[2] = __('Number of Graphs');
$table->head[3] = __('Group');
$table->size[2] = '125px';
$table->size[2] = '80px';
$table->size[3] = '50px';
$table->align[2] = 'center';
$table->align[3] = 'center';
if (check_acl ($config['id_user'], 0, "AW")) {
$table->align[4] = 'center';
$table->head[4] = __('Op.');
$table->size[4] = '50px';
$table->size[4] = '70px';
}
$table->data = array ();