More work on the visualization section of the eHorus integration
(cherry picked from commit 7f72a089e0
)
This commit is contained in:
parent
077420ffd4
commit
71a20bd286
|
@ -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'));
|
||||
|
|
|
@ -925,7 +925,9 @@ if (enterprise_installed() && $config['log_collector']) {
|
|||
}
|
||||
|
||||
/* eHorus tab */
|
||||
if ($config['ehorus_enabled']) {
|
||||
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>';
|
||||
|
@ -951,6 +953,7 @@ if ($config['ehorus_enabled']) {
|
|||
|
||||
$ehorus_tab['active'] = $tab == 'ehorus';
|
||||
}
|
||||
}
|
||||
|
||||
$onheader = array('manage' => $managetab,
|
||||
'main' => $maintab,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue