Fixed img

This commit is contained in:
Daniel Maya 2021-03-15 13:32:25 +01:00
parent 971f86601a
commit e4e3007def
2 changed files with 28 additions and 2 deletions

View File

@ -367,7 +367,7 @@ $img_style = [
if ($id_agente) { if ($id_agente) {
// View tab. // View tab.
$viewtab['text'] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">'.html_print_image( $viewtab['text'] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">'.html_print_image(
'images/operation.png', 'images/eye.png',
true, true,
[ [
'title' => __('View'), 'title' => __('View'),
@ -563,6 +563,27 @@ if ($id_agente) {
$agent_wizard['active'] = false; $agent_wizard['active'] = false;
} }
$total_incidents = agents_get_count_incidents($id_agente);
// Incident tab.
if ($total_incidents > 0) {
$incidenttab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=incident&amp;id_agente='.$id_agente.'">'.html_print_image(
'images/book_edit.png',
true,
[
'title' => __('Incidents'),
'class' => 'invert_filter',
]
).'</a>';
if ($tab == 'incident') {
$incidenttab['active'] = true;
} else {
$incidenttab['active'] = false;
}
}
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) { if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) {
if ($has_remote_conf) { if ($has_remote_conf) {
$agent_name = agents_get_name($id_agente); $agent_name = agents_get_name($id_agente);
@ -616,6 +637,11 @@ if ($id_agente) {
]; ];
} }
// Only if the agent has incidents associated show incidents tab.
if ($total_incidents) {
$onheader['incident'] = $incidenttab;
}
} else { } else {
$onheader = [ $onheader = [
'view' => $viewtab, 'view' => $viewtab,

View File

@ -144,7 +144,7 @@ function snmp_browser_get_html_tree(
// Branch or leave with branches! // Branch or leave with branches!
if (isset($sub_level['__OID__'])) { if (isset($sub_level['__OID__'])) {
$output .= "<a onfocus='javascript: this.blur();' href='javascript: snmpGet(\"".addslashes($sub_level['__OID__'])."\");'>"; $output .= "<a onfocus='javascript: this.blur();' href='javascript: snmpGet(\"".addslashes($sub_level['__OID__'])."\");'>";
$output .= '<img src="'.$url.'/../../images/eye.png" class="vertical_middle">'; $output .= '<img src="'.$url.'/../../images/operation.png" class="vertical_middle">';
$output .= '</a>'; $output .= '</a>';
} }