Preparing the element detail output for the tree view

This commit is contained in:
Alejandro Gallardo Escobar 2014-12-18 14:40:29 +01:00
parent 13fdccde1f
commit 93b248bf14
1 changed files with 39 additions and 0 deletions

View File

@ -40,6 +40,45 @@ if (is_ajax ()) {
return;
}
$get_detail = (bool) get_parameter('getDetail');
if ($get_detail) {
require_once($config['homedir']."/include/functions_treeview.php");
// Clean the output
ob_clean();
$id = (int) get_parameter('id');
$type = (string) get_parameter('type');
$server = array();
if (defined ('METACONSOLE')) {
$server_name = (string) get_parameter('server');
$server = metaconsole_get_connection($server_name);
metaconsole_connect($server);
}
switch ($type) {
case 'agent':
treeview_printTable($id, $server);
break;
case 'module':
treeview_printModuleTable($id, $server);
break;
case 'alert':
treeview_printAlertsTable($id, $server);
break;
default:
// Nothing
break;
}
if (!empty($server) && defined ('METACONSOLE')) {
metaconsole_restore_db();
}
return;
}
return;
}
?>