More work on the visualization section of the eHorus integration

(cherry picked from commit 7f72a089e0)
This commit is contained in:
Alejandro Gallardo Escobar 2016-05-05 18:32:34 +02:00
parent 077420ffd4
commit 71a20bd286
2 changed files with 30 additions and 27 deletions

View File

@ -39,7 +39,7 @@ if (empty($agent_id)) {
return;
}
$ehorus_agent_id = agents_get_agent_custom_field($agent_id, 'eHorus ID');
$ehorus_agent_id = agents_get_agent_custom_field($agent_id, $config['ehorus_custom_field']);
if (empty($ehorus_agent_id)) {
ui_print_error_message(__('Missing ehorus agent id'));

View File

@ -925,31 +925,34 @@ if (enterprise_installed() && $config['log_collector']) {
}
/* eHorus tab */
if ($config['ehorus_enabled']) {
$ehorus_tab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ehorus&id_agente='.$id_agente.'" class="ehorus_tab">'
. html_print_image ('images/operation.png', true, array ( 'title' => __('eHorus')))
. '</a>';
// Hidden subtab layer
// $ehorus_tab['sub_menu'] = '<ul class="mn subsubmenu" style="display:none; float:none;">';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '</ul>';
$ehorus_tab['active'] = $tab == 'ehorus';
if ($config['ehorus_enabled'] && !empty($config['ehorus_custom_field'])) {
$ehorus_agent_id = agents_get_agent_custom_field($id_agente, $config['ehorus_custom_field']);
if (!empty($ehorus_agent_id)) {
$ehorus_tab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=ehorus&id_agente='.$id_agente.'" class="ehorus_tab">'
. html_print_image ('images/operation.png', true, array ( 'title' => __('eHorus')))
. '</a>';
// Hidden subtab layer
// $ehorus_tab['sub_menu'] = '<ul class="mn subsubmenu" style="display:none; float:none;">';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_snmp.png", true, array ( "title" => __('SNMP Wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_interfaces.png", true, array ( "title" => __('SNMP Interfaces wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '<li class="nomn tab_godmode" style="text-align: center;">';
// $ehorus_tab['sub_menu'] .= '<a href="javascript:;">'
// . html_print_image ("images/wand_wmi.png", true, array ( "title" => __('WMI Wizard')))
// . '</a>';
// $ehorus_tab['sub_menu'] .= '</li>';
// $ehorus_tab['sub_menu'] .= '</ul>';
$ehorus_tab['active'] = $tab == 'ehorus';
}
}
$onheader = array('manage' => $managetab,
@ -975,7 +978,7 @@ if (isset($log_viewer_tab) && !empty($log_viewer_tab)) {
$onheader['log_viewer'] = $log_viewer_tab;
}
// If the ehorus id exists
if ($config['ehorus_enabled']) {
if (isset($ehorus_tab) && !empty($ehorus_tab)) {
$onheader['ehorus'] = $ehorus_tab;
}