2013-02-06 Sergio Martin <sergio.martin@artica.es>
* include/functions_treeview.php: Fixed repeated messages on treeview in metaconsole mode and fix some performance and aesthetic issues git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7594 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
04a857da4e
commit
2206967c68
pandora_console
|
@ -1,3 +1,9 @@
|
|||
2013-02-06 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_treeview.php: Fixed repeated messages on
|
||||
treeview in metaconsole mode and fix some performance and
|
||||
aesthetic issues
|
||||
|
||||
2013-02-05 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/agentes/estado_monitores.php,
|
||||
|
|
|
@ -380,7 +380,9 @@ function treeview_printTree($type) {
|
|||
if (metaconsole_connect($server) != NOERR) {
|
||||
continue;
|
||||
}
|
||||
$server_list = treeview_getData ($type, $server);
|
||||
|
||||
$server_list = treeview_getData ($type);
|
||||
|
||||
foreach ($server_list as $server_item) {
|
||||
if (! isset ($list[$server_item['_name_']])) {
|
||||
$list[$server_item['_name_']] = $server_item;
|
||||
|
@ -393,7 +395,6 @@ function treeview_printTree($type) {
|
|||
$list[$server_item['_name_']]['_num_unknown_'] += $server_item['_num_unknown_'];
|
||||
}
|
||||
}
|
||||
echo "<br/>";
|
||||
}
|
||||
|
||||
metaconsole_restore_db();
|
||||
|
@ -405,7 +406,7 @@ function treeview_printTree($type) {
|
|||
echo '</table>';
|
||||
}
|
||||
else {
|
||||
echo "<ul style='margin: 0; margin-top: 20px; padding: 0;'>\n";
|
||||
echo "<ul style='margin: 0; margin-top: 10px; padding: 0;'>\n";
|
||||
|
||||
$first = true;
|
||||
foreach ($list as $item) {
|
||||
|
@ -461,15 +462,9 @@ function treeview_printTree($type) {
|
|||
}
|
||||
|
||||
// Get data for the tree view
|
||||
function treeview_getData ($type, $server=false) {
|
||||
function treeview_getData ($type) {
|
||||
global $config;
|
||||
|
||||
if ($server !== false) {
|
||||
if (metaconsole_connect ($server) != NOERR) {
|
||||
return array ();
|
||||
}
|
||||
}
|
||||
|
||||
$search_free = get_parameter('search_free', '');
|
||||
$select_status = get_parameter('status', -1);
|
||||
|
||||
|
@ -547,7 +542,6 @@ function treeview_getData ($type, $server=false) {
|
|||
|
||||
// If there are not groups display error and return
|
||||
if (empty($avariableGroups)) {
|
||||
echo '<h3 class="error">'.__('There aren\'t agents in this agrupation').'</h3>';
|
||||
return array ();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue