diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 329b1f38f6..c179a01547 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,20 @@ +2012-04-16 Vanessa Gil + + * operation/tree.php + operation/menu.php + operation/tree/no_branch.png + operation/tree/branch.png + operation/tree/closed.png + operation/tree/expanded.png + operation/tree/first_closed.png + operation/tree/first_expanded.png + operation/tree/last_closed.png + operation/tree/last_expanded.png + operation/tree/last_leaf.png + operation/tree/leaf.png + operation/tree/one_closed.png + operation/tree/one_expanded.png. Changed path. + 2012-04-16 Sergio Martin * operation/menu.php: Switched the visual console and custom reports diff --git a/pandora_console/index.php b/pandora_console/index.php index faa336d128..3e3ee34495 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -21,7 +21,7 @@ if (function_exists ('mb_internal_encoding')) { // Set to 1 to do not check for installer or config file (for development!). // Activate gives more error information, not useful for production sites -$develop_bypass = 0; +$develop_bypass = 1; if ($develop_bypass != 1) { // If no config file, automatically try to install diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 0ae2bba906..79a679c6ca 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -73,6 +73,9 @@ if (check_acl ($config['id_user'], 0, "AR")) { $sub["operation/servers/recon_view"]["text"] = __('Recon view'); $sub["operation/servers/recon_view"]["refr"] = 0; + $sub["operation/tree"]["text"] = __('Tree view'); + $sub["operation/tree"]["refr"] = 0; + //SNMP Console $sub["operation/snmpconsole/snmp_view"]["text"] = __('SNMP console'); @@ -115,16 +118,12 @@ if (check_acl ($config['id_user'], 0, "AR")) { // Reporting $menu["reporting"]["text"] = __('Reporting'); - $menu["reporting"]["sec2"] = "godmode/reporting/reporting_builder"; + $menu["reporting"]["sec2"] = "godmode/reporting/map_builder"; $menu["reporting"]["id"] = "oper-reporting"; $menu["reporting"]["refr"] = 60; $sub = array (); - $sub["godmode/reporting/reporting_builder"]["text"] = __('Custom reporting'); - //Set godomode path - $sub["godmode/reporting/reporting_builder"]["subsecs"] = array("godmode/reporting/reporting_builder", - "operation/reporting/reporting_viewer"); //Visual console $sub["godmode/reporting/map_builder"]["text"] = __('Visual console'); //Set godomode path @@ -182,6 +181,11 @@ if (check_acl ($config['id_user'], 0, "AR")) { $sub["godmode/reporting/map_builder"]["sub2"] = $sub2; + $sub["godmode/reporting/reporting_builder"]["text"] = __('Custom reporting'); + //Set godomode path + $sub["godmode/reporting/reporting_builder"]["subsecs"] = array("godmode/reporting/reporting_builder", + "operation/reporting/reporting_viewer"); + $sub["godmode/reporting/graphs"]["text"] = __('Custom graphs'); //Set godomode path $sub["godmode/reporting/graphs"]["subsecs"] = array("operation/reporting/graph_viewer", diff --git a/pandora_console/extensions/tree.php b/pandora_console/operation/tree.php similarity index 79% rename from pandora_console/extensions/tree.php rename to pandora_console/operation/tree.php index 48c3a3bca6..2588ddbf1a 100644 --- a/pandora_console/extensions/tree.php +++ b/pandora_console/operation/tree.php @@ -57,7 +57,7 @@ if (is_ajax ()) echo '
 
'; //Floating div - echo '
'; + echo '
'; if ($config["agentaccess"]){ echo ''.__('Agent access rate (24h)').'
'; @@ -65,9 +65,6 @@ if (is_ajax ()) graphic_agentaccess($id_agente, 280, 110, 86400); } - echo '
 
'; - echo ''.__('Events generated -by module-').'
'; - echo graph_event_module (290, 120, $id_agente); echo '
'; graph_graphic_agentevents ($id_agente, 290, 15, 86400, ''); @@ -106,24 +103,6 @@ if (is_ajax ()) echo ''; - //OS - echo ''.__('OS').''; - echo '' . ui_print_os_icon ($agent["id_os"], true, true); - - // Want to print last 15 characters of OS version, or start from 0 if smaller - $osversion_offset = strlen($agent["os_version"]); - if ($osversion_offset > 15) - $osversion_offset = $osversion_offset - 15; - else - $osversion_offset = 0; - - - echo ' '.substr($agent["os_version"],$osversion_offset,15).' '; - - // Parent - echo ''.__('Parent').''; - echo ''.agents_get_name ($agent["id_parent"]).''; - // Agent Interval echo ''.__('Interval').''; echo ''.human_time_description_raw ($agent["intervalo"]).''; @@ -132,14 +111,6 @@ if (is_ajax ()) echo ''.__('Description').''; echo ''.$agent["comentarios"].''; - // Group - echo ''.__('Group').''; - echo ''; - echo ui_print_group_icon ($agent["id_grupo"], true); - echo ' ('; - echo ui_print_truncate_text(groups_get_name ($agent["id_grupo"])); - echo ')'; - // Agent version echo ''.__('Agent Version'). ''; echo ''.$agent["agent_version"].''; @@ -330,9 +301,9 @@ if (is_ajax ()) echo "
    \n"; echo "
  • "; if ($lessBranchs == 1) - echo html_print_image ("extensions/tree/no_branch.png", true, array ("style" => 'vertical-align: middle;')); + echo html_print_image ("operation/tree/no_branch.png", true, array ("style" => 'vertical-align: middle;')); else - echo html_print_image ("extensions/tree/branch.png", true, array ("style" => 'vertical-align: middle;')); + echo html_print_image ("operation/tree/branch.png", true, array ("style" => 'vertical-align: middle;')); echo "" . __("Empty") . ""; echo "
  • "; echo "
"; @@ -394,19 +365,19 @@ if (is_ajax ()) $less = $lessBranchs; if ($count != $countRows) - $img = html_print_image ("extensions/tree/closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image" . $id . "_agent_" . $type . "_" . $row["id_agente"], "pos_tree" => "2")); + $img = html_print_image ("operation/tree/closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image" . $id . "_agent_" . $type . "_" . $row["id_agente"], "pos_tree" => "2")); else { $less = $less + 2; // $less = $less or 0b10 - $img = html_print_image ("extensions/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image" . $id . "_agent_" . $row["id_agente"], "pos_tree" => "3")); + $img = html_print_image ("operation/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image" . $id . "_agent_" . $row["id_agente"], "pos_tree" => "3")); } echo "
  • "; echo ""; if ($lessBranchs == 1) - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); else - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); echo $img; ui_print_group_icon ($row["id_grupo"], false, "groups_small", "vertical-align: middle; width: 16px; height: 16px;", false); @@ -520,20 +491,20 @@ if (is_ajax ()) echo "
  • "; switch ($lessBranchs) { case 0: - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 1: - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 2: - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 3: - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); break; } echo "" . __("Empty") . ""; @@ -552,27 +523,27 @@ if (is_ajax ()) switch ($lessBranchs) { case 0: - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 1: - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 2: - html_print_image ("extensions/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); break; case 3: - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); - html_print_image ("extensions/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); + html_print_image ("operation/tree/no_branch.png", false, array ("style" => 'vertical-align: middle;')); break; } if ($countRows != $count) - html_print_image ("extensions/tree/leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "1" )); + html_print_image ("operation/tree/leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "1" )); else - html_print_image ("extensions/tree/last_leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "2" )); + html_print_image ("operation/tree/last_leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "2" )); // This line checks for (non-initialized) asyncronous modules if ($row["estado"] == 0 AND $row["utimestamp"] == 0 AND ($row["id_tipo_modulo"] >= 21 AND $row["id_tipo_modulo"] <= 23)){ @@ -627,9 +598,7 @@ if (is_ajax ()) echo ""; echo $data; if ($row['utimestamp'] != '') { - echo " ("; - ui_print_timestamp ($row["utimestamp"], true); - echo ")"; + ui_print_help_tip ($row["timestamp"], '', 'images/clock2.png'); } echo "
  • "; } @@ -931,21 +900,21 @@ function printTree_($type) { $lessBranchs = 0; if ($first) { if ($item != end($list)) { - $img = html_print_image ("extensions/tree/first_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "0")); + $img = html_print_image ("operation/tree/first_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "0")); $first = false; } else { $lessBranchs = 1; - $img = html_print_image ("extensions/tree/one_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "1")); + $img = html_print_image ("operation/tree/one_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "1")); } } else { if ($item != end($list)) - $img = html_print_image ("extensions/tree/closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "2")); + $img = html_print_image ("operation/tree/closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "2")); else { $lessBranchs = 1; - $img = html_print_image ("extensions/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "3")); + $img = html_print_image ("operation/tree/last_closed.png", true, array ("style" => 'vertical-align: middle;', "id" => "tree_image_" . $type . "_" . $id, "pos_tree" => "3")); } } @@ -973,15 +942,77 @@ function printTree_($type) { } -function printJS_() { - global $config; - - ?> - - -function mainTreeView_() { - - global $config; - - $enterpriseEnable = false; - if (enterprise_include_once('include/functions_policies.php') !== ENTERPRISE_NOT_HOOK) { - $enterpriseEnable = true; - } - - ///////// INI MENU AND TABS ///////////// - $img_style = array ("class" => "top", "width" => 16); - $activeTab = get_parameter('sort_by','group'); - - $os_tab = array('text' => "" - . html_print_image ("images/computer.png", true, array ("title" => __('OS'))) . "", 'active' => $activeTab == "os"); - - $group_tab = array('text' => "" - . html_print_image ("images/group.png", true, array ("title" => __('Groups'))) . "", 'active' => $activeTab == "group"); - - $module_group_tab = array('text' => "" - . html_print_image ("images/agents_group.png", true, array ("title" => __('Module groups'))) . "", 'active' => $activeTab == "module_group"); - - if ($enterpriseEnable) { - $policies_tab = array('text' => "" - . html_print_image ("images/policies.png", true, array ("title" => __('Policies'))) . "", 'active' => $activeTab == "policies"); - } else { - $policies_tab = ''; - } - - $module_tab = array('text' => "" - . html_print_image ("images/brick.png", true, array ("title" => __('Modules'))) . "", 'active' => $activeTab == "module"); - - $onheader = array('os' => $os_tab, 'group' => $group_tab, 'module_group' => $module_group_tab, 'policies' => $policies_tab, 'module' => $module_tab); - - ui_print_page_header (__('Tree view')." - ".__('Sort the agents by'), "images/extensions.png", false, "", false, $onheader); - - - echo "
    "; - echo '"; - echo "
    "; - echo "
    "; - echo "
    "; - ///////// END MENU AND TABS ///////////// - printTree_($activeTab); - printJS_(); - -} - -extensions_add_operation_menu_option('Tree view','estado'); -extensions_add_main_function('mainTreeView_'); -?> diff --git a/pandora_console/operation/tree/branch.png b/pandora_console/operation/tree/branch.png new file mode 100644 index 0000000000..dac28141c7 Binary files /dev/null and b/pandora_console/operation/tree/branch.png differ diff --git a/pandora_console/operation/tree/closed.png b/pandora_console/operation/tree/closed.png new file mode 100644 index 0000000000..a0beb9bfd9 Binary files /dev/null and b/pandora_console/operation/tree/closed.png differ diff --git a/pandora_console/operation/tree/expanded.png b/pandora_console/operation/tree/expanded.png new file mode 100644 index 0000000000..a5249e42b4 Binary files /dev/null and b/pandora_console/operation/tree/expanded.png differ diff --git a/pandora_console/operation/tree/first_closed.png b/pandora_console/operation/tree/first_closed.png new file mode 100644 index 0000000000..7a3673c7c2 Binary files /dev/null and b/pandora_console/operation/tree/first_closed.png differ diff --git a/pandora_console/operation/tree/first_expanded.png b/pandora_console/operation/tree/first_expanded.png new file mode 100644 index 0000000000..ef8d30aaa0 Binary files /dev/null and b/pandora_console/operation/tree/first_expanded.png differ diff --git a/pandora_console/operation/tree/last_closed.png b/pandora_console/operation/tree/last_closed.png new file mode 100644 index 0000000000..4e07936700 Binary files /dev/null and b/pandora_console/operation/tree/last_closed.png differ diff --git a/pandora_console/operation/tree/last_expanded.png b/pandora_console/operation/tree/last_expanded.png new file mode 100644 index 0000000000..8411630167 Binary files /dev/null and b/pandora_console/operation/tree/last_expanded.png differ diff --git a/pandora_console/operation/tree/last_leaf.png b/pandora_console/operation/tree/last_leaf.png new file mode 100644 index 0000000000..5e75cc5343 Binary files /dev/null and b/pandora_console/operation/tree/last_leaf.png differ diff --git a/pandora_console/operation/tree/leaf.png b/pandora_console/operation/tree/leaf.png new file mode 100644 index 0000000000..52ffb066cb Binary files /dev/null and b/pandora_console/operation/tree/leaf.png differ diff --git a/pandora_console/operation/tree/no_branch.png b/pandora_console/operation/tree/no_branch.png new file mode 100644 index 0000000000..8e97d8b10a Binary files /dev/null and b/pandora_console/operation/tree/no_branch.png differ diff --git a/pandora_console/operation/tree/one_closed.png b/pandora_console/operation/tree/one_closed.png new file mode 100755 index 0000000000..db9d336b17 Binary files /dev/null and b/pandora_console/operation/tree/one_closed.png differ diff --git a/pandora_console/operation/tree/one_expanded.png b/pandora_console/operation/tree/one_expanded.png new file mode 100755 index 0000000000..577c4bf6ce Binary files /dev/null and b/pandora_console/operation/tree/one_expanded.png differ