Index: pandoradb_data.sql =================================================================== --- pandoradb_data.sql (revision 10314) +++ pandoradb_data.sql (working copy) @@ -283,7 +283,7 @@ -- Dumping data for table `tnews` -- -INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS 5.0!','This is the new Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW()); +INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (1,'admin','Welcome to Pandora FMS!','This is the Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',NOW()); INSERT INTO `tnews` (`id_news`, `author`, `subject`, `text`, `timestamp`) VALUES (2,'admin','New Pandora FMS Agent Features','Feel free to test our new features for both Windows and Linux agents: Proxy and Broker modes.',NOW()); INSERT INTO tmodule VALUES (1,'Agent module'); Index: include/functions_clippy.php =================================================================== --- include/functions_clippy.php (revision 0) +++ include/functions_clippy.php (revision 10417) @@ -0,0 +1,176 @@ + + + ' . + '' . + html_print_image( + "images/clippy_icon.png", + true) . + '' . + ' + + '; + + + + return $return; +} +?> \ No newline at end of file Index: include/styles/menu.css =================================================================== --- include/styles/menu.css (revision 10314) +++ include/styles/menu.css (working copy) @@ -81,7 +81,6 @@ .submenu { font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif; margin: 0px 10px 0px 0; - width: 173px; } .submenu li a { background-color: #222; @@ -143,10 +142,6 @@ background-position: 4px 8px; } -.menu { - width: 173px; - -} /* Icons specified here */ #icon_oper-networkconsole { background-image: url(../../images/op_network.png); @@ -234,7 +229,6 @@ #menu_container { z-index: 3; position: absolute; - left: -140px; + left: -80px; background-color: #AAA; - height: 100%; } Index: include/styles/pandora.css =================================================================== --- include/styles/pandora.css (revision 10314) +++ include/styles/pandora.css (working copy) @@ -278,7 +278,7 @@ } div#menu { - width: 165px; + width: 175px; float: left; } @@ -291,6 +291,14 @@ background-color: #274C00; } +.fixed_header { + z-index: 9999; + position: fixed; + left: 0; + top: 0; + width: 100%; +} + div#foot { font-size: 6pt !important; border-top: solid 2px #222; @@ -298,7 +306,6 @@ padding-bottom: 5px; text-align: center; background: #333333; - width: 960px; height: 38px; clear: both; width: auto; @@ -901,17 +908,10 @@ padding: 6px 0px; height: 14px; } -.titop { - -moz-border-top-right-radius: 6px; - -webkit-border-top-right-radius: 6px; - border-top-right-radius: 6px; - heigth: 100px; -} .tit, .titb { font-weight: bold; color: #fff; text-align: center; - width: 173px; } .suc * { @@ -1863,12 +1863,10 @@ div#main { width: auto; float: none; - padding-right: 0px; - padding-left: 0px; - padding-top: 0px; - padding-bottom: 20px; - margin-left: 182px; - margin-right: 20px; + margin-top: 10px; + margin-left: 185px; + margin-right: 10px; + padding-bottom: 10px; background: #ECECEC; min-width: 720px; } @@ -2669,7 +2667,7 @@ margin: 0px !important; bottom: 0px; left: 0px; - z-index: 1020; + z-index: 9001; } #shortcut_bar { @@ -2704,3 +2702,12 @@ table#policy_modules td * { display: inline; } + + +.context_help_title { + font-weight: bolder; + text-align: left; +} +.context_help_body { + text-align: left; +} \ No newline at end of file Index: include/functions_update_manager.php =================================================================== --- include/functions_update_manager.php (revision 10314) +++ include/functions_update_manager.php (working copy) @@ -24,11 +24,17 @@ global $build_version; global $pandora_version; - $license = db_get_value('`value`', 'tupdate_settings', '`key`', + $license = db_get_value( + db_encapsule_fields_with_same_name_to_instructions('value'), + 'tupdate_settings', + db_encapsule_fields_with_same_name_to_instructions('key'), 'customer_key'); if (enterprise_installed()) { - $current_update = db_get_value('`value`', 'tupdate_settings', '`key`', + $current_update = db_get_value( + db_encapsule_fields_with_same_name_to_instructions('value'), + 'tupdate_settings', + db_encapsule_fields_with_same_name_to_instructions('key'), 'current_package_enterprise'); $current_update = 0; @@ -36,7 +42,10 @@ $current_update = $config['current_package_enterprise']; } else { - $current_update = db_get_value('`value`', 'tupdate_settings', '`key`', + $current_update = db_get_value( + db_encapsule_fields_with_same_name_to_instructions('value'), + 'tupdate_settings', + db_encapsule_fields_with_same_name_to_instructions('key'), 'current_package'); $current_update = 0; @@ -64,10 +73,12 @@ function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); + foreach ($objects as $object) { if ($object != "." && $object != "..") { - if (filetype($dir."/".$object) == "dir") - rrmdir($dir."/".$object); else unlink($dir."/".$object); + if (filetype($dir . "/" . $object) == "dir") + rrmdir($dir . "/" . $object); + else unlink($dir . "/" . $object); } } reset($objects); @@ -264,11 +275,13 @@ return false; } else { - if ($is_ajax) { - return true; + $result = json_decode($result, true); + + if (empty($result)) { + return false; } else { - return false; + return true; } } } @@ -362,8 +375,10 @@ "/downloads/last_package.tgz"; try { + rrmdir($config['attachment_store'] . + "/downloads/temp_update/pandora_console"); + $phar = new PharData($path_package); - rrmdir($config['attachment_store'] . "/downloads/temp_update/pandora_console"); $phar->extractTo($config['attachment_store'] . "/downloads/temp_update"); } catch (Exception $e) { @@ -384,7 +399,14 @@ array('value' => 50), array('token' => 'progress_update')); - $full_path = $config['attachment_store'] . "/downloads/temp_update/pandora_console"; + $path_array = array('downloads', 'temp_update', 'pandora_console'); + $full_path = $config['attachment_store']; + foreach ($path_array as $directory) { + $full_path = $full_path . '/' . $directory; + if (!is_dir($full_path)) { + mkdir($full_path); + } + } $homedir = $config['homedir']; Index: include/functions_groups.php =================================================================== --- include/functions_groups.php (revision 10314) +++ include/functions_groups.php (working copy) @@ -236,7 +236,7 @@ * @param integer $parent The id_group parent to search the childrens. * @param array $groups The groups, its for optimize the querys to DB. */ -function groups_get_childrens($parent, $groups = null) { +function groups_get_childrens($parent, $groups = null, $onlyPropagate = false) { if (empty($groups)) { $groups = db_get_all_rows_in_table('tgrupo'); } @@ -248,7 +248,7 @@ continue; } - if ($group['propagate']) { + if ($group['propagate'] || $onlyPropagate) { if ($group['parent'] == $parent) { $return = $return + array($group['id_grupo'] => $group) + groups_get_childrens($group['id_grupo'], $groups); } @@ -1531,4 +1531,42 @@ } } } + +/** + * Return an array with the groups hierarchy (Recursive) + * + * @param array Groups array passed by reference + * @param mixed The id of the parent to search or false to begin the search from the first hierarchy level + * + * @return array The groups reordered by its hierarchy + */ +function groups_get_tree(&$groups, $parent = false) { + $return = array(); + + foreach ($groups as $id => $group) { + if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0)) { + $return[$id] = $group; + unset($groups[$id]); + $children = groups_get_tree($groups, $id); + + if (!empty($children)) { + $return[$id]['children'] = $children; + } + } + else if ($parent && isset($group['parent']) && $group['parent'] == $parent) { + $return[$id] = $group; + unset($groups[$id]); + $children = groups_get_tree($groups, $id); + + if (!empty($children)) { + $return[$id]['children'] = $children; + } + } + else { + continue; + } + } + + return $return; +} ?> Index: include/functions_visual_map.php =================================================================== --- include/functions_visual_map.php (revision 10314) +++ include/functions_visual_map.php (working copy) @@ -114,9 +114,11 @@ echo '
'; + + if (! defined ('METACONSOLE')) { + $list = treeview_getData ($type); + } else { - $servers = db_get_all_rows_sql ("SELECT * FROM tmetaconsole_setup WHERE disabled = 0"); + $servers = db_get_all_rows_sql (" + SELECT * + FROM tmetaconsole_setup + WHERE disabled = 0"); + if ($servers === false) { $servers = array(); } @@ -502,6 +510,8 @@ metaconsole_restore_db(); } + + if ($list === false) { ui_print_error_message(__('There aren\'t agents in this agrupation')); echo ' |
' . + __('You have unknown modules in this agent.') . + ' | ' . + '
' . + __('Unknown modules are modules which receive data normally at least in one occassion, but at this time are not receving data. Please check our troubleshoot help page to help you determine why you have unknown modules.') . + ui_print_help_icon ('context_module_unknow', true, '', 'images/help_w.png') . + ' | ' . + '
+You may have unknown modules for many reasons. Unknown module is a special status for a module/monitor which means “I dont have recent data for this monitor and I should have data”. A monitor goes to unknown status when doesnt receive nothing in at least its interval (for example, 300 seconds) multiplied by two, in this case, if you doesn't receive nothing in ten minutes, monitor goes to unknown. +
++These are a few cases where you can get unknown modules: +
++Sometimes UNKNOWN status can be useful to monitor, so you can setup alerts on UNKNOWN status to warn you about that. +
\ No newline at end of file Index: include/help/en/help_snmp_alert_field1.php =================================================================== --- include/help/en/help_snmp_alert_field1.php (revision 10314) +++ include/help/en/help_snmp_alert_field1.php (working copy) @@ -14,10 +14,10 @@
データフィールドがある場合、アラートでそれを利用する必要があります。この目的のために、特別な _snmp_fX_ というマクロを利用できます。これらのマクロは、SNMP トラップアラート以外では無効です。
-
+
メッセージを生成するには、フィールド1に次のような設定をします。
-
-Chassis Alert: _snmp_f2_ in device _snmp_f1_
-
-これらのマクロは、任意のアラートのフィールドX (1 から 10) で利用できます。
+
+ Chassis Alert: _snmp_f2_ in device _snmp_f1_
+
+任意のアラートのフィールドX (1 から 10) で以下のマクロを利用できます。
+
+_data_: トラップ全体
+_agent_: エージェント名
+_address_: IP アドレス
+_timestamp_: トラップのタイムスタンプ
+_snmp_oid_: トラップの OID
+_snmp_value_: トラップ OID の値