'.$agent_name.ui_print_help_tip(__('Disabled'), true);
} else {
$agent_name = ''.$agent_name.''.ui_print_help_tip(__('Disabled'), true);
}
} else if ($cluster->agent()->quiet()) {
if ($in_planned_downtime) {
$agent_name = "".$agent_name.' '.html_print_image('images/dot_blue.png', true, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']);
} else {
$agent_name = "".$agent_name.' '.html_print_image('images/dot_blue.png', true, ['border' => '0', 'title' => __('Quiet'), 'alt' => '']).'';
}
} else {
$agent_name = $agent_name;
}
if ($in_planned_downtime && !$cluster->agent()->disabled() && !$cluster->agent()->quiet()) {
$agent_name .= ' '.ui_print_help_tip(
__('Agent in scheduled downtime'),
true,
'images/minireloj-16.png'
).'';
} else if (($in_planned_downtime && !$cluster->agent()->disabled())
|| ($in_planned_downtime && !$cluster->agent()->quiet())
) {
$agent_name .= ' '.ui_print_help_tip(
__('Agent in scheduled downtime'),
true,
'images/clock.svg'
).'';
}
$table_agent_header = '';
$table_agent_header .= $agent_name;
$table_agent_header .= '
';
$table_agent_header .= '';
if (!$config['show_group_name']) {
$table_agent_header .= ui_print_group_icon(
$cluster->agent()->id_grupo(),
true,
'groups_small',
'padding-right: 6px;'
);
}
$table_agent_header .= '
';
$status_img = agents_detail_view_status_img(
$cluster->agent()->critical_count(),
$cluster->agent()->warning_count(),
$cluster->agent()->unknown_count(),
$cluster->agent()->total_count(),
$cluster->agent()->notinit_count()
);
$table_agent_header .= ''.$status_img.'
';
$table_agent_header .= ' ';
$table_agent_header .= ''.html_print_image(
'images/force@svg.svg',
true,
[
'title' => __('Force cluster status calculation'),
'alt' => '',
'class' => 'main_menu_icon invert_filter',
]
).'';
// Fixed width non interactive charts.
$status_chart_width = 180;
$graph_width = 180;
$table_agent_graph = '';
$table_agent_graph .= graph_agent_status(
$cluster->agent()->id_agente(),
$graph_width,
$graph_width,
true,
false,
false,
true
);
$table_agent_graph .= '
';
$table_agent_os = ''.ui_print_os_icon(
$cluster->agent()->id_os(),
false,
true,
true,
false,
false,
false,
['title' => __('OS').': '.get_os_name($cluster->agent()->id_os())]
);
$table_agent_os .= (empty($cluster->agent()->os_version()) === true) ? get_os_name((int) $cluster->agent()->id_os()) : $cluster->agent()->os_version().'
';
$addresses = agents_get_addresses($cluster->agent()->id_agente());
$address = agents_get_address($cluster->agent()->id_agente());
foreach ($addresses as $k => $add) {
if ($add == $address) {
unset($addresses[$k]);
}
}
if (empty($address) === false) {
$table_agent_ip = ''.html_print_image(
'images/web@groups.svg',
true,
[
'title' => __('IP address'),
'class' => 'main_menu_icon invert_filter',
]
);
$table_agent_ip .= '';
$table_agent_ip .= empty($address) ? ''.__('N/A').'' : $address;
$table_agent_ip .= '
';
}
$table_agent_description = ''.html_print_image(
'images/logs@svg.svg',
true,
[
'title' => __('Description'),
'class' => 'main_menu_icon invert_filter',
]
);
$table_agent_description .= '';
$table_agent_description .= empty(
$cluster->description()
) ? ''.__('N/A').'' : $cluster->description();
$table_agent_description .= '
';
$table_agent_count_modules = reporting_tiny_stats(
$cluster->agent()->toArray(),
true,
'agent',
// Useless.
':',
true
);
$table_agent_version = ''.html_print_image(
'images/version.png',
true,
[
'title' => __('Agent Version'),
'class' => 'invert_filter',
]
);
$table_agent_version .= '';
$table_agent_version .= empty($cluster->agent()->agent_version()) ? ''.__('Cluster agent').'' : $cluster->agent()->agent_version();
$table_agent_version .= '
';
/*
*
* MAP
*
*/
$nodes = $cluster->getNodes();
$font_size = 20;
$width = '45%';
$height = '500';
$node_radius = 40;
// Generate map.
$map_manager = new NetworkMap(
[
'nodes' => $nodes,
'no_pandora_node' => 1,
'pure' => 1,
'map_options' => [
'generation_method' => LAYOUT_SPRING1,
'font_size' => $font_size,
'node_radius' => $node_radius,
'height' => $height,
'width' => '100%',
'tooltip' => true,
'size_image' => 50,
'z_dash' => 0.5,
'map_filter' => [
'node_sep' => 7,
'node_radius' => 50,
'x_offs' => 130,
'y_offs' => -70,
],
],
]
);
/*
*
* EVENTS 24h
*
*/
$table_events = '';
$table_events .= '';
$table_events .= '
';
$table_events .= graph_graphic_agentevents(
$cluster->agent()->id_agente(),
95,
70,
SECONDS_1DAY,
'',
true,
true,
500
);
$table_events .= '
';
$table_events .= '
';
?>
agent()->id_agente();
require_once $config['homedir'].'/operation/agentes/estado_monitores.php';
?>
'sub ok',
'icon' => 'next',
],
true
);
echo '';
// Print always go back button.
HTML::printForm($model->getGoBackForm(), false);