diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d0ee4c1555..ae780117a8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,23 @@ +2014-05-08 Sergio Martin + + * operation/agentes/ver_agente.php + godmode/menu.php + godmode/massive/massive_operations.php + include/javascript/pandora.js: Add massive operation for + satellite agents threshold edition. This is the part on the + open side that hooks with enterprise code. + + * extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql + extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql + extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql + pandoradb_data.sql + pandoradb.data.postgreSQL.sql + pandoradb.data.oracle.sql: + images/networkmap/satellite.png + images/os_icons/satellite_small.png + images/os_icons/satellite.png + images/op_satellite.png: Add icon to satellite OS + 2014-05-08 Junichi Satoh * godmode/servers/manage_recontask.php, diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql index 5caceb6e28..79cdd431a5 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql @@ -42,7 +42,7 @@ ALTER TABLE tgraph_source MODIFY COLUMN `weight` float(8,3) NOT NULL DEFAULT 0; -- --------------------------------------------------------------------- INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Router', 'Generic router', 'so_router.png'); INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Switch', 'Generic switch', 'so_switch.png'); -INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Satellite', 'Satellite agent', 'so_other.png'); +INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Satellite', 'Satellite agent', 'satellite.png'); -- --------------------------------------------------------------------- diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql index 082c67a1fc..541f974c3f 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql @@ -36,6 +36,7 @@ UPDATE tconfig SET value='#FF6600' WHERE token='graph_color3'; -- --------------------------------------------------------------------- INSERT INTO tconfig_os VALUES (17, 'Router', 'Generic router', 'so_router.png'); INSERT INTO tconfig_os VALUES (18, 'Switch', 'Generic switch', 'so_switch.png'); +INSERT INTO tconfig_os VALUES (19, 'Satellite', 'Satellite agent', 'satellite.png'); /* 2014/03/18 */ -- ---------------------------------------------------------------------- diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql index ac3346854a..a02c6c0e7d 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql @@ -37,6 +37,7 @@ UPDATE "tconfig" SET "value"='#FF6600' WHERE "token"='graph_color3'; -- --------------------------------------------------------------------- INSERT INTO "tconfig_os" VALUES (17, 'Router', 'Generic router', 'so_router.png'); INSERT INTO "tconfig_os" VALUES (18, 'Switch', 'Generic switch', 'so_switch.png'); +INSERT INTO "tconfig_os" VALUES (19, 'Satellite', 'Satellite agent', 'satellite.png'); /* 2014/03/18 */ -- ---------------------------------------------------------------------- diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index df53425068..5659a59abd 100644 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -78,6 +78,14 @@ if ($snmp_options != ENTERPRISE_NOT_HOOK) { array_merge($options_snmp, $snmp_options); } +$options_satellite = array(); +$satellite_options = enterprise_hook('massive_satellite_options'); + +if ($satellite_options != ENTERPRISE_NOT_HOOK) { + $options_satellite = + array_merge($options_satellite, $satellite_options); +} + if (in_array($option, array_keys($options_alerts))) { $tab = 'massive_alerts'; } @@ -96,6 +104,9 @@ elseif (in_array($option, array_keys($options_policies))) { elseif (in_array($option, array_keys($options_snmp))) { $tab = 'massive_snmp'; } +elseif (in_array($option, array_keys($options_satellite))) { + $tab = 'massive_satellite'; +} else { $option = ''; } @@ -119,6 +130,9 @@ switch ($tab) { case 'massive_snmp': $options = $options_snmp; break; + case 'massive_satellite': + $options = $options_satellite; + break; } // Set the default option of the category @@ -153,6 +167,11 @@ $snmptab = enterprise_hook('massive_snmp_tab'); if ($snmptab == ENTERPRISE_NOT_HOOK) $snmptab = ""; + +$satellitetab = enterprise_hook('massive_satellite_tab'); + +if ($satellitetab == ENTERPRISE_NOT_HOOK) + $satellitetab = ""; $onheader = array(); @@ -164,6 +183,7 @@ if (check_acl ($config['id_user'], 0, "PM")) { $onheader['massive_alerts'] = $alertstab; $onheader['policies'] = $policiestab; $onheader['snmp'] = $snmptab; +$onheader['satellite'] = $satellitetab; ui_print_page_header( __('Massive operations') . ' » '. $options[$option], diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 7967c2c4c7..724dc37cc4 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -66,6 +66,7 @@ if (check_acl ($config['id_user'], 0, "AW")) { $sub["godmode/massive/massive_operations&tab=massive_alerts"]["text"] = __('Alerts operations'); enterprise_hook('massivepolicies_submenu'); enterprise_hook('massivesnmp_submenu'); + enterprise_hook('massivesatellite_submenu'); $menu_godmode["gmassive"]["sub"] = $sub; } diff --git a/pandora_console/images/networkmap/satellite.png b/pandora_console/images/networkmap/satellite.png new file mode 100644 index 0000000000..b7aea11172 Binary files /dev/null and b/pandora_console/images/networkmap/satellite.png differ diff --git a/pandora_console/images/op_satellite.png b/pandora_console/images/op_satellite.png new file mode 100644 index 0000000000..83242e9019 Binary files /dev/null and b/pandora_console/images/op_satellite.png differ diff --git a/pandora_console/images/os_icons/satellite.png b/pandora_console/images/os_icons/satellite.png new file mode 100644 index 0000000000..bc585e076f Binary files /dev/null and b/pandora_console/images/os_icons/satellite.png differ diff --git a/pandora_console/images/os_icons/satellite_small.png b/pandora_console/images/os_icons/satellite_small.png new file mode 100644 index 0000000000..df993f4192 Binary files /dev/null and b/pandora_console/images/os_icons/satellite_small.png differ diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index c7d58f18fd..c36ff9532a 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -271,7 +271,7 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) { }); if (selected != undefined) $('#module').attr ('value', selected); - $('#module').css ("width", "auto"); + $('#module').css ("max-width", ""); diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 63d181f71e..a8d90bb220 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -46,6 +46,8 @@ if (is_ajax ()) { if ($get_agents_group_json) { $id_group = (int) get_parameter('id_group'); $recursion = (int) get_parameter ('recursion', 0); + $custom_condition = get_parameter('custom_condition', ''); + // Is is possible add keys prefix to avoid auto sorting in js object conversion $keys_prefix = (string) get_parameter ('keys_prefix', ''); $status_agents = (int)get_parameter('status_agents', AGENT_STATUS_ALL); @@ -65,6 +67,8 @@ if (is_ajax ()) { $filter = " WHERE id_grupo IN (" . implode(',', $groups) . ") "; + $filter .= io_safe_output($custom_condition); + switch ($status_agents) { case AGENT_STATUS_NORMAL: $filter .= diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql index d8b50ac9e2..d66b8ae29d 100644 --- a/pandora_console/pandoradb.data.oracle.sql +++ b/pandora_console/pandoradb.data.oracle.sql @@ -146,6 +146,10 @@ INSERT INTO tconfig_os VALUES (12,'Web Server','Web Server/Application','network INSERT INTO tconfig_os VALUES (13,'Octopods','Octopods Pandora FMS Hardware Agent','network.png'); INSERT INTO tconfig_os VALUES (14,'Embedded','Embedded device running a Pandora FMS agent','embedded.png'); INSERT INTO tconfig_os VALUES (15,'Android','Android agent','android.png'); +INSERT INTO tconfig_os VALUES (16, 'VMware', 'VMware Architecture', 'so_vmware.png'); +INSERT INTO tconfig_os VALUES (17, 'Router', 'Generic router', 'so_router.png'); +INSERT INTO tconfig_os VALUES (18, 'Switch', 'Generic switch', 'so_switch.png'); +INSERT INTO tconfig_os VALUES (19, 'Satellite', 'Satellite agent', 'satellite.png'); COMMIT; END;; diff --git a/pandora_console/pandoradb.data.postgreSQL.sql b/pandora_console/pandoradb.data.postgreSQL.sql index c1004bad5e..b60feb0d9c 100644 --- a/pandora_console/pandoradb.data.postgreSQL.sql +++ b/pandora_console/pandoradb.data.postgreSQL.sql @@ -143,7 +143,11 @@ INSERT INTO "tconfig_os" VALUES (12,'Web Server','Web Server/Application','network.png'), (13,'Octopods','Octopods Pandora FMS Hardware Agent','network.png'), (14,'Embedded','Embedded device running a Pandora FMS agent','embedded.png'), -(15,'Android','Android agent','android.png'); +(15,'Android','Android agent','android.png'), +(16, 'VMware', 'VMware Architecture', 'so_vmware.png'), +(17, 'Router', 'Generic router', 'so_router.png'), +(18, 'Switch', 'Generic switch', 'so_switch.png'), +(19, 'Satellite', 'Satellite agent', 'satellite.png'); COMMIT WORK; SELECT setval('tconfig_os_id_os_seq', (SELECT (SELECT MAX(id_os) FROM tconfig_os))); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 1c9d0d5882..2c1e2a2a0c 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -133,7 +133,7 @@ INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (16, 'VMware', 'VMware Architecture', 'so_vmware.png'), (17, 'Router', 'Generic router', 'so_router.png'), (18, 'Switch', 'Generic switch', 'so_switch.png'), -(19, 'Satellite', 'Satellite agent', 'so_other.png'); +(19, 'Satellite', 'Satellite agent', 'satellite.png'); UNLOCK TABLES;