2014-08-21 Alejandro Gallardo <alejandro.gallardo@artica.es>
* include/functions_graph.php: Added filters to the function "graph_monitor_wheel". * operation/agentes/networkmap.dinamic.php, operation/agentes/networkmap.php, include/functions_networkmap.php: Added the 'radial dinamic' type. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10443 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d172f5e26d
commit
fe497317be
|
@ -1,3 +1,13 @@
|
||||||
|
2014-08-21 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
||||||
|
|
||||||
|
* include/functions_graph.php: Added filters to the
|
||||||
|
function "graph_monitor_wheel".
|
||||||
|
|
||||||
|
* operation/agentes/networkmap.dinamic.php,
|
||||||
|
operation/agentes/networkmap.php,
|
||||||
|
include/functions_networkmap.php: Added the 'radial
|
||||||
|
dinamic' type.
|
||||||
|
|
||||||
2014-08-21 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
2014-08-21 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
||||||
|
|
||||||
* include/functions_graph.php: Improved the function
|
* include/functions_graph.php: Improved the function
|
||||||
|
|
|
@ -4091,7 +4091,7 @@ function graph_snmp_traps_treemap ($data, $width = 700, $height = 700) {
|
||||||
/**
|
/**
|
||||||
* Print a solarburst graph with a representation of all the groups, agents, module groups and modules grouped
|
* Print a solarburst graph with a representation of all the groups, agents, module groups and modules grouped
|
||||||
*/
|
*/
|
||||||
function graph_monitor_wheel ($width = 500, $height = 600) {
|
function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
include_once ($config['homedir'] . "/include/functions_users.php");
|
include_once ($config['homedir'] . "/include/functions_users.php");
|
||||||
|
@ -4101,7 +4101,9 @@ function graph_monitor_wheel ($width = 500, $height = 600) {
|
||||||
|
|
||||||
$graph_data = array();
|
$graph_data = array();
|
||||||
|
|
||||||
$groups = users_get_groups(false, "AR", false, true);
|
$filter_module_group = (!empty($filter) && !empty($filter['module_group'])) ? $filter['module_group'] : false;
|
||||||
|
|
||||||
|
$groups = users_get_groups(false, "AR", false, true, (!empty($filter) && isset($filter['group']) ? $filter['group'] : null));
|
||||||
|
|
||||||
$data_groups = array();
|
$data_groups = array();
|
||||||
if (!empty($groups)) {
|
if (!empty($groups)) {
|
||||||
|
@ -4139,6 +4141,9 @@ function graph_monitor_wheel ($width = 500, $height = 600) {
|
||||||
$module_status = modules_get_agentmodule_status($module_id);
|
$module_status = modules_get_agentmodule_status($module_id);
|
||||||
$module_value = modules_get_last_value($module_id);
|
$module_value = modules_get_last_value($module_id);
|
||||||
|
|
||||||
|
if ($filter_module_group && $filter_module_group != $module_group_id)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!isset($data_agents[$agent_id])) {
|
if (!isset($data_agents[$agent_id])) {
|
||||||
$data_agents[$agent_id] = array();
|
$data_agents[$agent_id] = array();
|
||||||
$data_agents[$agent_id]['id'] = $agent_id;
|
$data_agents[$agent_id]['id'] = $agent_id;
|
||||||
|
|
|
@ -1584,6 +1584,7 @@ function networkmap_get_types () {
|
||||||
$networkmap_types['topology'] = __('Create a new topology map');
|
$networkmap_types['topology'] = __('Create a new topology map');
|
||||||
$networkmap_types['groups'] = __('Create a new group map');
|
$networkmap_types['groups'] = __('Create a new group map');
|
||||||
$networkmap_types['dinamic'] = __('Create a new dinamic map');
|
$networkmap_types['dinamic'] = __('Create a new dinamic map');
|
||||||
|
$networkmap_types['radial_dinamic'] = __('Create a new radial dinamic map');
|
||||||
|
|
||||||
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
|
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
|
||||||
$enterprise_types = enterprise_hook('policies_get_networkmap_types');
|
$enterprise_types = enterprise_hook('policies_get_networkmap_types');
|
||||||
|
@ -1607,6 +1608,7 @@ function networkmap_get_filter_types () {
|
||||||
$networkmap_types['topology'] = __('Topology');
|
$networkmap_types['topology'] = __('Topology');
|
||||||
$networkmap_types['groups'] = __('Group');
|
$networkmap_types['groups'] = __('Group');
|
||||||
$networkmap_types['dinamic'] = __('Dinamic');
|
$networkmap_types['dinamic'] = __('Dinamic');
|
||||||
|
$networkmap_types['radial_dinamic'] = __('Radial dinamic');
|
||||||
|
|
||||||
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
|
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
|
||||||
$enterprise_types = enterprise_hook('policies_get_networkmap_filter_types');
|
$enterprise_types = enterprise_hook('policies_get_networkmap_filter_types');
|
||||||
|
|
|
@ -28,6 +28,23 @@ if (! check_acl ($config['id_user'], 0, "AR")) {
|
||||||
|
|
||||||
require_once ('include/functions_networkmap.php');
|
require_once ('include/functions_networkmap.php');
|
||||||
|
|
||||||
|
if ($activeTab == "radial_dinamic") {
|
||||||
|
include_once("include/functions_graph.php");
|
||||||
|
|
||||||
|
echo "<div style='width: auto; text-align: center;'>";
|
||||||
|
|
||||||
|
$filter = array();
|
||||||
|
if (!empty($group))
|
||||||
|
$filter['group'] = $group;
|
||||||
|
if (!empty($module_group))
|
||||||
|
$filter['module_group'] = $module_group;
|
||||||
|
|
||||||
|
echo graph_monitor_wheel(600, 650, $filter);
|
||||||
|
|
||||||
|
echo "</div>";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Set filter
|
// Set filter
|
||||||
$filter = networkmap_get_filter ($layout);
|
$filter = networkmap_get_filter ($layout);
|
||||||
|
|
||||||
|
|
|
@ -215,6 +215,9 @@ $buttons['dinamic'] = array('active' => $activeTab == 'dinamic',
|
||||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=dinamic&pure='.$pure.'">' .
|
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=dinamic&pure='.$pure.'">' .
|
||||||
html_print_image("images/dynamic_network_icon.png", true, array ("title" => __('Dinamic view'))) .'</a>');
|
html_print_image("images/dynamic_network_icon.png", true, array ("title" => __('Dinamic view'))) .'</a>');
|
||||||
|
|
||||||
|
$buttons['radial_dinamic'] = array('active' => $activeTab == 'radial_dinamic',
|
||||||
|
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab=radial_dinamic&pure='.$pure.'">' .
|
||||||
|
html_print_image("images/dynamic_network_icon.png", true, array ("title" => __('Radial dinamic view'))) .'</a>');
|
||||||
|
|
||||||
$combolist = '<form name="query_sel" method="post" action="index.php?sec=network&sec2=operation/agentes/networkmap">';
|
$combolist = '<form name="query_sel" method="post" action="index.php?sec=network&sec2=operation/agentes/networkmap">';
|
||||||
|
|
||||||
|
@ -280,6 +283,9 @@ switch ($activeTab) {
|
||||||
case 'dinamic':
|
case 'dinamic':
|
||||||
$title = __('Dinamic view');
|
$title = __('Dinamic view');
|
||||||
break;
|
break;
|
||||||
|
case 'radial_dinamic':
|
||||||
|
$title = __('Radial dinamic view');
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($name)) {
|
if (!empty($name)) {
|
||||||
|
@ -327,7 +333,7 @@ $table->data[0][] = __('Name:') . ' ' .
|
||||||
html_print_input_text ('name', $name, '', 25, 50, true);
|
html_print_input_text ('name', $name, '', 25, 50, true);
|
||||||
$table->data[0][] = __('Group:') . ' ' .
|
$table->data[0][] = __('Group:') . ' ' .
|
||||||
html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
||||||
if ($activeTab == 'groups' || $activeTab == 'policies') {
|
if ($activeTab == 'groups' || $activeTab == 'policies' || $activeTab == 'radial_dinamic') {
|
||||||
$table->data[0][] = __('Module group') . ' ' .
|
$table->data[0][] = __('Module group') . ' ' .
|
||||||
html_print_select_from_sql ('
|
html_print_select_from_sql ('
|
||||||
SELECT id_mg, name
|
SELECT id_mg, name
|
||||||
|
@ -339,7 +345,7 @@ if ($activeTab == 'topology') {
|
||||||
html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab != 'dinamic') {
|
if ($activeTab != 'dinamic' && $activeTab != 'radial_dinamic') {
|
||||||
$table->data[0][] = __('Layout') . ' ' .
|
$table->data[0][] = __('Layout') . ' ' .
|
||||||
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
||||||
}
|
}
|
||||||
|
@ -362,7 +368,7 @@ if ($activeTab == 'policies') {
|
||||||
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab != 'dinamic') {
|
if ($activeTab != 'dinamic' && $activeTab != 'radial_dinamic') {
|
||||||
$table->data[1][] = __('No Overlap') . ' ' .
|
$table->data[1][] = __('No Overlap') . ' ' .
|
||||||
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
||||||
}
|
}
|
||||||
|
@ -380,12 +386,12 @@ if (($activeTab == 'groups' || $activeTab == 'policies') &&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab != 'dinamic') {
|
if ($activeTab != 'dinamic' && $activeTab != 'radial_dinamic') {
|
||||||
$table->data[1][] = __('Simple') . ' ' .
|
$table->data[1][] = __('Simple') . ' ' .
|
||||||
html_print_checkbox ('simple', '1', $simple, true);
|
html_print_checkbox ('simple', '1', $simple, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab != 'dinamic') {
|
if ($activeTab != 'dinamic' && $activeTab != 'radial_dinamic') {
|
||||||
$table->data[1][] = __('Regenerate') . ' ' .
|
$table->data[1][] = __('Regenerate') . ' ' .
|
||||||
html_print_checkbox ('regen', '1', $regen, true);
|
html_print_checkbox ('regen', '1', $regen, true);
|
||||||
}
|
}
|
||||||
|
@ -406,13 +412,16 @@ if ($pure == "1") {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab != 'dinamic') {
|
if ($activeTab != 'dinamic' && $activeTab != 'radial_dinamic') {
|
||||||
$table->data[1][] = __('Font') . ' ' .
|
$table->data[1][] = __('Font') . ' ' .
|
||||||
html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[2][] = __('Free text for search (*):') . ' ' .
|
if ($activeTab != 'radial_dinamic') {
|
||||||
html_print_input_text('text_filter', $text_filter, '', 30, 100, true);
|
$table->data[2][] = __('Free text for search (*):') . ' ' .
|
||||||
|
html_print_input_text('text_filter', $text_filter, '', 30, 100, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (($activeTab == 'groups') || ($activeTab == 'topology')) {
|
if (($activeTab == 'groups') || ($activeTab == 'topology')) {
|
||||||
$table->data[2][] = __('Don\'t show subgroups:') .
|
$table->data[2][] = __('Don\'t show subgroups:') .
|
||||||
ui_print_help_tip(__('Only run with it is filter for any group'), true) .
|
ui_print_help_tip(__('Only run with it is filter for any group'), true) .
|
||||||
|
@ -451,6 +460,9 @@ if ($id_networkmap != 0) {
|
||||||
case 'dinamic':
|
case 'dinamic':
|
||||||
require_once('operation/agentes/networkmap.dinamic.php');
|
require_once('operation/agentes/networkmap.dinamic.php');
|
||||||
break;
|
break;
|
||||||
|
case 'radial_dinamic':
|
||||||
|
require_once('operation/agentes/networkmap.dinamic.php');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
case 'topology':
|
case 'topology':
|
||||||
require_once('operation/agentes/networkmap.topology.php');
|
require_once('operation/agentes/networkmap.topology.php');
|
||||||
|
|
Loading…
Reference in New Issue