From 288a4789f79c7ff06b1574094f09f859628e9a4a Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 8 May 2014 07:54:51 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9888 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 20 ++++++++++++++++++ .../pandoradb_migrate_5.0.x_to_5.1.mysql.sql | 2 +- .../pandoradb_migrate_5.0.x_to_5.1.oracle.sql | 1 + ...doradb_migrate_5.0.x_to_5.1.postgreSQL.sql | 1 + .../godmode/massive/massive_operations.php | 20 ++++++++++++++++++ pandora_console/godmode/menu.php | 1 + .../images/networkmap/satellite.png | Bin 0 -> 1169 bytes pandora_console/images/op_satellite.png | Bin 0 -> 1428 bytes pandora_console/images/os_icons/satellite.png | Bin 0 -> 1444 bytes .../images/os_icons/satellite_small.png | Bin 0 -> 1307 bytes pandora_console/include/javascript/pandora.js | 2 +- .../operation/agentes/ver_agente.php | 4 ++++ pandora_console/pandoradb.data.oracle.sql | 4 ++++ pandora_console/pandoradb.data.postgreSQL.sql | 6 +++++- pandora_console/pandoradb_data.sql | 2 +- 15 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 pandora_console/images/networkmap/satellite.png create mode 100644 pandora_console/images/op_satellite.png create mode 100644 pandora_console/images/os_icons/satellite.png create mode 100644 pandora_console/images/os_icons/satellite_small.png 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 0000000000000000000000000000000000000000..b7aea1117243048bdbb4d76b9cf0e8c1e252fd1e GIT binary patch literal 1169 zcmV;C1aA9@P)C3<00009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1RhC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