diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1817a49a05..1b609d0d22 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,19 @@ +2012-07-27 Junichi Satoh + + * godmode/setup/setup.php: Changed to use DateTimeZone instead of + 'ttimezone' table for timezone setting. + + * include/function_config.php: Fixed that timezone is changed to + default (Europe/Berlin) when update button is clicked without any + changes in setup window. + + * pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql, + pandoradb_data.sql, pandoradb.data.postgreSQL.sql, + pandoradb.data.oracle.sql, pandoradb_migrate_4.0.x_to_5.0.mysql.sql, + pandoradb_migrate_4.0.x_to_5.0.oracle.sql, + pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql: Removed 'ttimezone' + table and its data. + 2012-07-26 Juan Manuel Ramon * operation/agentes/stat_win.php: Fixed bug when popup is updated diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql index 92516c92c7..1a49a5e499 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql @@ -205,17 +205,6 @@ ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL; ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0'; --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE IF NOT EXISTS `ttimezone` ( - `id_tz` int(10) unsigned NOT NULL auto_increment, - `zone` varchar(60) NOT NULL, - `timezone` varchar(60) NOT NULL, -PRIMARY KEY (`id_tz`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- ----------------------------------------------------- -- Table `tusuario` -- ----------------------------------------------------- diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql index 70296d344a..94da955ef1 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql @@ -200,19 +200,6 @@ ALTER TABLE tmensajes MODIFY mensaje VARCHAR2(255) NOT NULL DEFAULT ''; alter table talert_compound add (special_day NUMBER(5,0) default 0); --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE IF NOT EXISTS ttimezone ( - id_tz NUMBER(10,0) NOT NULL PRIMARY KEY, - zone VARCHAR2(60) NOT NULL, - timezone VARCHAR2(60) NOT NULL -); - -CREATE SEQUENCE ttimezone_s INCREMENT BY 1 START WITH 1; -CREATE OR REPLACE TRIGGER ttimezone_inc BEFORE INSERT ON ttimezone REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttimezone_s.nextval INTO :NEW.ID_TZ FROM dual; END ttimezone_inc;; - -- ----------------------------------------------------- -- Table `tnetwork_component` -- ----------------------------------------------------- diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql index 71d9034482..7f9305b60f 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql @@ -192,16 +192,6 @@ ALTER TABLE "tmensajes" ALTER COLUMN "mensaje" TYPE TEXT; ALTER TABLE "talert_compound" ADD COLUMN "special_day" SMALLINT default 0; --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE "ttimezone" ( - "id_tz" INTEGER NOT NULL PRIMARY KEY, - "zone" varchar(60) NOT NULL, - "timezone" varchar(60) NOT NULL -); - -- ----------------------------------------------------- -- Table `tnetwork_component` -- ----------------------------------------------------- diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index 1e3986c931..fa0e20888c 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -31,17 +31,45 @@ if (is_ajax ()) { if ($select_timezone) { $zone = get_parameter('zone'); - $timezones = db_get_all_rows_sql ("SELECT timezone FROM ttimezone WHERE zone='$zone'"); - if ($timezones === false) - $timezones = array(); - - foreach ($timezones as $timezone) { - foreach ($timezone as $key=>$name_tz) { - if ($key == 'timezone') - $timezone_name[$name_tz] = $name_tz; - } + switch ($zone) { + case 'Africa': + $timezones = timezone_identifiers_list(DateTimeZone::AFRICA); + break; + case 'America': + $timezones = timezone_identifiers_list(DateTimeZone::AMERICA); + break; + case 'Antarctica': + $timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); + break; + case 'Arctic': + $timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); + break; + case 'Asia': + $timezones = timezone_identifiers_list(DateTimeZone::ASIA); + break; + case 'Atlantic': + $timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); + break; + case 'Australia': + $timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); + break; + case 'Europe': + $timezones = timezone_identifiers_list(DateTimeZone::EUROPE); + break; + case 'Indian': + $timezones = timezone_identifiers_list(DateTimeZone::INDIAN); + break; + case 'Pacific': + $timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); + break; + case 'UTC': + $timezones = timezone_identifiers_list(DateTimeZone::UTC); + break; + default: + $timezones = array(); + break; } - echo json_encode($timezone_name); + echo json_encode($timezones); } return; } @@ -71,8 +99,8 @@ ui_print_page_header (__('General configuration'), "", false, "", true); $table->width = '100%'; $table->data = array (); $table->size = array(); -$table->size[0] = '45%'; -$table->size[1] = '55%'; +$table->size[0] = '30%'; +$table->size[1] = '70%'; // Current config["language"] could be set by user, not taken from global setup ! @@ -207,22 +235,59 @@ if ($config["integria_enabled"]) { $table->data[22][1] = html_print_select($inventories, 'integria_inventory', $config["integria_inventory"], '', '', '', true); } -$zones = db_get_all_rows_sql("SELECT DISTINCT(zone) FROM ttimezone"); -if ($zones === false) { - $zones = array(); -} -foreach ($zones as $zone) { - foreach ($zone as $key=>$name) { - $zone_name[$name] = $name; +$zone_name = array('Africa' => __('Africa'), 'America' => __('America'), 'Antarctica' => __('Antarctica'), 'Arctic' => __('Arctic'), 'Asia' => __('Asia'), 'Atlantic' => __('Atlantic'), 'Australia' => __('Australia'), 'Europe' => __('Europe'), 'Indian' => __('Indian'), 'Pacific' => __('Pacific'), 'UTC' => __('UTC')); + +$zone_selected = get_parameter('zone'); +if ($zone_selected == "") { + if ($config["timezone"] != "") { + list($zone) = split("/", $config["timezone"]); + $zone_selected = $zone; + } + else { + $zone_selected = 'Europe'; } } -$zone_selected = get_parameter('zone', 'Europe'); -$timezones = db_get_all_rows_sql ("SELECT timezone FROM ttimezone WHERE zone='$zone_selected'"); + +switch ($zone_selected) { + case 'Africa': + $timezones = timezone_identifiers_list(DateTimeZone::AFRICA); + break; + case 'America': + $timezones = timezone_identifiers_list(DateTimeZone::AMERICA); + break; + case 'Antarctica': + $timezones = timezone_identifiers_list(DateTimeZone::ANTARCTICA); + break; + case 'Arctic': + $timezones = timezone_identifiers_list(DateTimeZone::ARCTIC); + break; + case 'Asia': + $timezones = timezone_identifiers_list(DateTimeZone::ASIA); + break; + case 'Atlantic': + $timezones = timezone_identifiers_list(DateTimeZone::ATLANTIC); + break; + case 'Australia': + $timezones = timezone_identifiers_list(DateTimeZone::AUSTRALIA); + break; + case 'Europe': + $timezones = timezone_identifiers_list(DateTimeZone::EUROPE); + break; + case 'Indian': + $timezones = timezone_identifiers_list(DateTimeZone::INDIAN); + break; + case 'Pacific': + $timezones = timezone_identifiers_list(DateTimeZone::PACIFIC); + break; + case 'UTC': + $timezones = timezone_identifiers_list(DateTimeZone::UTC); + break; + default: + $timezones = array(); + break; +} foreach ($timezones as $timezone) { - foreach ($timezone as $key=>$name_tz) { - if ($key == 'timezone') - $timezone_n[$name_tz] = $name_tz; - } + $timezone_n[$timezone] = $timezone; } $table->data[23][0] = __('Timezone setup'); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 9af3a865ea..4f62cc259d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -103,7 +103,10 @@ function config_update_config () { config_update_value ('integria_inventory', get_parameter ('integria_inventory')); config_update_value ('integria_api_password', get_parameter ('integria_api_password')); config_update_value ('integria_url', get_parameter ('integria_url')); - config_update_value ('timezone', (string) get_parameter ('timezone')); + $timezone = (string) get_parameter ('timezone'); + if ($timezone != "") { + config_update_value ('timezone', $timezone); + } config_update_value ('sound_alert', get_parameter('sound_alert')); config_update_value ('sound_critical', get_parameter('sound_critical')); config_update_value ('sound_warning', get_parameter('sound_warning')); diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql index e201f029c9..c611999ac2 100644 --- a/pandora_console/pandoradb.data.oracle.sql +++ b/pandora_console/pandoradb.data.oracle.sql @@ -595,238 +595,3 @@ treport_custom_sql_insert(4, 'Group view','< (select count COMMIT; END;; --- ttimezone Data -BEGIN -LOCK TABLE ttimezone IN EXCLUSIVE MODE; -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Abidjan'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Accra'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Addis_Ababa'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Algiers'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Asmara'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Asmera'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bamako'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bangui'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Banjul'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bissau'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Blantyre'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Brazzaville'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Bujumbura'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Cairo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Casablanca'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ceuta'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Conakry'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Dakar'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Dar_es_Salaam'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Djibouti'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Douala'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/El_Aaiun'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Freetown'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Gaborone'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Harare'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Johannesburg'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Juba'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kampala'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Khartoum'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kigali'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kinshasa'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lagos'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Libreville'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lome'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Luanda'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lubumbashi'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lusaka'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Malabo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Maputo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Maseru'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Mbabane'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Mogadishu'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Monrovia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Nairobi'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ndjamena'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Niamey'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Nouakchott'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ouagadougou'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Porto-Novo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Sao_Tome'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Timbuktu'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Tripoli'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Tunis'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Windhoek'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Adak'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Anchorage'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Anguilla'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Antigua'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Araguaina'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Buenos_Aires'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Catamarca'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/ComodRivadavia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Cordoba'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Jujuy'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/La_Rioja'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Mendoza'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Rio_Gallegos'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Salta'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/San_Juan'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/San_Luis'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Tucuman'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Ushuaia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Aruba'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Asuncion'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Atikokan'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Atka'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bahia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bahia_Banderas'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Barbados'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Belem'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Belize'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Blanc-Sablon'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Boa_Vista'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bogota'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Boise'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Buenos_Aires'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cambridge_Bay'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Campo_Grande'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cancun'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Caracas'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Catamarca'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cayenne'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cayman'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Chicago'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Chihuahua'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Coral_Harbour'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cordoba'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Costa_Rica'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cuiaba'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/New_York'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Vancouver'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Toronto'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Phoenix'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Monterrey'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Panama'); -INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Puerto_Rico'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Casey'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Davis'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/DumontDUrville'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Macquarie'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Mawson'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/McMurdo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Palmer'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Rothera'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/South_Pole'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Syowa'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Vostok'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Arctic', 'Arctic/Longyearbyen'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aden'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Almaty'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Amman'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Anadyr'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aqtau'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aqtobe'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Ashgabat'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Ashkhabad'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Baghdad'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bahrain'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Baku'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bangkok'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Beirut'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bishkek'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Brunei'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Calcutta'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Choibalsan'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Chongqing'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Chungking'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Colombo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dacca'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Damascus'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dhaka'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dili'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dubai'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dushanbe'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Gaza'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Azores'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Bermuda'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Canary'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Cape_Verde'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Faeroe'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Faroe'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Jan_Mayen'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Madeira'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Reykjavik'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/South_Georgia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/St_Helena'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Stanley'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/ACT'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Adelaide'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Brisbane'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Broken_Hill'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Canberra'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Currie'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Darwin'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Eucla'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Hobart'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/LHI'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Lindeman'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Lord_Howe'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Melbourne'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/North'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/NSW'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Perth'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Queensland'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/South'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Sydney'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Tasmania'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Victoria'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/West'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Yancowinna'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Amsterdam'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Andorra'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Athens'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Belfast'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Belgrade'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Berlin'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Bratislava'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Brussels'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Bucharest'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Budapest'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Chisinau'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Copenhagen'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Dublin'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Gibraltar'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Guernsey'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Helsinki'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Isle_of_Man'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Istanbul'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Jersey'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Kaliningrad'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Kiev'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Lisbon'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Ljubljana'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/London'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Luxembourg'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Madrid'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Malta'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Mariehamn'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Minsk'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Monaco'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Moscow'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Nicosia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Oslo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Paris'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Podgorica'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Prague'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Riga'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Rome'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Antananarivo'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Chagos'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Christmas'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Cocos'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Comoro'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Apia'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Auckland'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Chatham'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Chuuk'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Easter'); -INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Efate'); - -COMMIT; -END;; diff --git a/pandora_console/pandoradb.data.postgreSQL.sql b/pandora_console/pandoradb.data.postgreSQL.sql index 313af0bb07..bd1c895aa8 100644 --- a/pandora_console/pandoradb.data.postgreSQL.sql +++ b/pandora_console/pandoradb.data.postgreSQL.sql @@ -436,237 +436,3 @@ INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (3, 'Monitoring&#x INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (4, 'Group view', 'select t1.nombre, (select count(t3.id_agente) from tagente as t3 where t1.id_grupo = t3.id_grupo) as agents, (SELECT COUNT(t4.id_agente) FROM tagente as t4 WHERE t4.id_grupo = t1.id_grupo AND t4.disabled = 0 AND t4.ultimo_contacto < NOW() - (intervalo / (1/2))) as agent_unknown, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND utimestamp > 0 AND tagente_modulo.id_tipo_modulo NOT IN(21,22,23,24,100) AND (UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) >= (tagente_estado.current_interval / (1/2))) as monitor_unknow, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,24) AND utimestamp = 0) as monitor_no_init, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 0 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND (utimestamp > 0 OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24)))) as monitor_ok, (SELECT COUNT(tagente_estado.id_agente_estado) FROM tagente_estado, tagente, tagente_modulo WHERE tagente.id_grupo = t1.id_grupo AND tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND estado = 1 AND ((UNIX_TIMESTAMP(NOW()) - tagente_estado.utimestamp) < (tagente_estado.current_interval / (1/2)) OR (tagente_modulo.id_tipo_modulo IN(21,22,23,24,100))) AND utimestamp > 0) as monitor_critical, (SELECT COUNT(talert_template_modules.id) FROM talert_template_modules, tagente_modulo, tagente_estado, tagente WHERE tagente.id_grupo = t1.id_grupo AND tagente_modulo.id_agente = tagente.id_agente AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente.disabled = 0 AND talert_template_modules.id_agent_module = tagente_modulo.id_agente_modulo AND times_fired > 0) as monitor_alert_fired from tgrupo as t1 where 0 < (select count(t2.id_agente) from tagente as t2 where t1.id_grupo = t2.id_grupo)'); SELECT setval('treport_custom_sql_id_seq', (SELECT (SELECT MAX(id) FROM treport_custom_sql))); - -BEGIN WORK; -LOCK TABLE "ttimezone"; -INSERT INTO "ttimezone" ("zone", "timezone") VALUES -('Africa','Africa/Abidjan'), -('Africa','Africa/Accra'), -('Africa','Africa/Addis_Ababa'), -('Africa','Africa/Algiers'), -('Africa','Africa/Asmara'), -('Africa','Africa/Asmera'), -('Africa','Africa/Bamako'), -('Africa','Africa/Bangui'), -('Africa','Africa/Banjul'), -('Africa','Africa/Bissau'), -('Africa','Africa/Blantyre'), -('Africa','Africa/Brazzaville'), -('Africa', 'Africa/Bujumbura'), -('Africa', 'Africa/Cairo'), -('Africa', 'Africa/Casablanca'), -('Africa', 'Africa/Ceuta'), -('Africa', 'Africa/Conakry'), -('Africa', 'Africa/Dakar'), -('Africa', 'Africa/Dar_es_Salaam'), -('Africa', 'Africa/Djibouti'), -('Africa', 'Africa/Douala'), -('Africa', 'Africa/El_Aaiun'), -('Africa', 'Africa/Freetown'), -('Africa', 'Africa/Gaborone'), -('Africa', 'Africa/Harare'), -('Africa', 'Africa/Johannesburg'), -('Africa', 'Africa/Juba'), -('Africa', 'Africa/Kampala'), -('Africa', 'Africa/Khartoum'), -('Africa', 'Africa/Kigali'), -('Africa', 'Africa/Kinshasa'), -('Africa', 'Africa/Lagos'), -('Africa', 'Africa/Libreville'), -('Africa', 'Africa/Lome'), -('Africa', 'Africa/Luanda'), -('Africa', 'Africa/Lubumbashi'), -('Africa', 'Africa/Lusaka'), -('Africa', 'Africa/Malabo'), -('Africa', 'Africa/Maputo'), -('Africa', 'Africa/Maseru'), -('Africa', 'Africa/Mbabane'), -('Africa', 'Africa/Mogadishu'), -('Africa', 'Africa/Monrovia'), -('Africa', 'Africa/Nairobi'), -('Africa', 'Africa/Ndjamena'), -('Africa', 'Africa/Niamey'), -('Africa', 'Africa/Nouakchott'), -('Africa', 'Africa/Ouagadougou'), -('Africa', 'Africa/Porto-Novo'), -('Africa', 'Africa/Sao_Tome'), -('Africa', 'Africa/Timbuktu'), -('Africa', 'Africa/Tripoli'), -('Africa', 'Africa/Tunis'), -('Africa', 'Africa/Windhoek'), -('America', 'America/Adak'), -('America', 'America/Anchorage'), -('America', 'America/Anguilla'), -('America', 'America/Antigua'), -('America', 'America/Araguaina'), -('America', 'America/Argentina/Buenos_Aires'), -('America', 'America/Argentina/Catamarca'), -('America', 'America/Argentina/ComodRivadavia'), -('America', 'America/Argentina/Cordoba'), -('America', 'America/Argentina/Jujuy'), -('America', 'America/Argentina/La_Rioja'), -('America', 'America/Argentina/Mendoza'), -('America', 'America/Argentina/Rio_Gallegos'), -('America', 'America/Argentina/Salta'), -('America', 'America/Argentina/San_Juan'), -('America', 'America/Argentina/San_Luis'), -('America', 'America/Argentina/Tucuman'), -('America', 'America/Argentina/Ushuaia'), -('America', 'America/Aruba'), -('America', 'America/Asuncion'), -('America', 'America/Atikokan'), -('America', 'America/Atka'), -('America', 'America/Bahia'), -('America', 'America/Bahia_Banderas'), -('America', 'America/Barbados'), -('America', 'America/Belem'), -('America', 'America/Belize'), -('America', 'America/Blanc-Sablon'), -('America', 'America/Boa_Vista'), -('America', 'America/Bogota'), -('America', 'America/Boise'), -('America', 'America/Buenos_Aires'), -('America', 'America/Cambridge_Bay'), -('America', 'America/Campo_Grande'), -('America', 'America/Cancun'), -('America', 'America/Caracas'), -('America', 'America/Catamarca'), -('America', 'America/Cayenne'), -('America', 'America/Cayman'), -('America', 'America/Chicago'), -('America', 'America/Chihuahua'), -('America', 'America/Coral_Harbour'), -('America', 'America/Cordoba'), -('America', 'America/Costa_Rica'), -('America', 'America/Cuiaba'), -('America', 'America/New_York'), -('America', 'America/Vancouver'), -('America', 'America/Toronto'), -('America', 'America/Phoenix'), -('America', 'America/Monterrey'), -('America', 'America/Panama'), -('America', 'America/Puerto_Rico'), -('Antarctica', 'Antarctica/Casey'), -('Antarctica', 'Antarctica/Davis'), -('Antarctica', 'Antarctica/DumontDUrville'), -('Antarctica', 'Antarctica/Macquarie'), -('Antarctica', 'Antarctica/Mawson'), -('Antarctica', 'Antarctica/McMurdo'), -('Antarctica', 'Antarctica/Palmer'), -('Antarctica', 'Antarctica/Rothera'), -('Antarctica', 'Antarctica/South_Pole'), -('Antarctica', 'Antarctica/Syowa'), -('Antarctica', 'Antarctica/Vostok'), -('Arctic', 'Arctic/Longyearbyen'), -('Asia', 'Asia/Aden'), -('Asia', 'Asia/Almaty'), -('Asia', 'Asia/Amman'), -('Asia', 'Asia/Anadyr'), -('Asia', 'Asia/Aqtau'), -('Asia', 'Asia/Aqtobe'), -('Asia', 'Asia/Ashgabat'), -('Asia', 'Asia/Ashkhabad'), -('Asia', 'Asia/Baghdad'), -('Asia', 'Asia/Bahrain'), -('Asia', 'Asia/Baku'), -('Asia', 'Asia/Bangkok'), -('Asia', 'Asia/Beirut'), -('Asia', 'Asia/Bishkek'), -('Asia', 'Asia/Brunei'), -('Asia', 'Asia/Calcutta'), -('Asia', 'Asia/Choibalsan'), -('Asia', 'Asia/Chongqing'), -('Asia', 'Asia/Chungking'), -('Asia', 'Asia/Colombo'), -('Asia', 'Asia/Dacca'), -('Asia', 'Asia/Damascus'), -('Asia', 'Asia/Dhaka'), -('Asia', 'Asia/Dili'), -('Asia', 'Asia/Dubai'), -('Asia', 'Asia/Dushanbe'), -('Asia', 'Asia/Gaza'), -('Atlantic', 'Atlantic/Azores'), -('Atlantic', 'Atlantic/Bermuda'), -('Atlantic', 'Atlantic/Canary'), -('Atlantic', 'Atlantic/Cape_Verde'), -('Atlantic', 'Atlantic/Faeroe'), -('Atlantic', 'Atlantic/Faroe'), -('Atlantic', 'Atlantic/Jan_Mayen'), -('Atlantic', 'Atlantic/Madeira'), -('Atlantic', 'Atlantic/Reykjavik'), -('Atlantic', 'Atlantic/South_Georgia'), -('Atlantic', 'Atlantic/St_Helena'), -('Atlantic', 'Atlantic/Stanley'), -('Australia', 'Australia/ACT'), -('Australia', 'Australia/Adelaide'), -('Australia', 'Australia/Brisbane'), -('Australia', 'Australia/Broken_Hill'), -('Australia', 'Australia/Canberra'), -('Australia', 'Australia/Currie'), -('Australia', 'Australia/Darwin'), -('Australia', 'Australia/Eucla'), -('Australia', 'Australia/Hobart'), -('Australia', 'Australia/LHI'), -('Australia', 'Australia/Lindeman'), -('Australia', 'Australia/Lord_Howe'), -('Australia', 'Australia/Melbourne'), -('Australia', 'Australia/North'), -('Australia', 'Australia/NSW'), -('Australia', 'Australia/Perth'), -('Australia', 'Australia/Queensland'), -('Australia', 'Australia/South'), -('Australia', 'Australia/Sydney'), -('Australia', 'Australia/Tasmania'), -('Australia', 'Australia/Victoria'), -('Australia', 'Australia/West'), -('Australia', 'Australia/Yancowinna'), -('Europe', 'Europe/Amsterdam'), -('Europe', 'Europe/Andorra'), -('Europe', 'Europe/Athens'), -('Europe', 'Europe/Belfast'), -('Europe', 'Europe/Belgrade'), -('Europe', 'Europe/Berlin'), -('Europe', 'Europe/Bratislava'), -('Europe', 'Europe/Brussels'), -('Europe', 'Europe/Bucharest'), -('Europe', 'Europe/Budapest'), -('Europe', 'Europe/Chisinau'), -('Europe', 'Europe/Copenhagen'), -('Europe', 'Europe/Dublin'), -('Europe', 'Europe/Gibraltar'), -('Europe', 'Europe/Guernsey'), -('Europe', 'Europe/Helsinki'), -('Europe', 'Europe/Isle_of_Man'), -('Europe', 'Europe/Istanbul'), -('Europe', 'Europe/Jersey'), -('Europe', 'Europe/Kaliningrad'), -('Europe', 'Europe/Kiev'), -('Europe', 'Europe/Lisbon'), -('Europe', 'Europe/Ljubljana'), -('Europe', 'Europe/London'), -('Europe', 'Europe/Luxembourg'), -('Europe', 'Europe/Madrid'), -('Europe', 'Europe/Malta'), -('Europe', 'Europe/Mariehamn'), -('Europe', 'Europe/Minsk'), -('Europe', 'Europe/Monaco'), -('Europe', 'Europe/Moscow'), -('Europe', 'Europe/Nicosia'), -('Europe', 'Europe/Oslo'), -('Europe', 'Europe/Paris'), -('Europe', 'Europe/Podgorica'), -('Europe', 'Europe/Prague'), -('Europe', 'Europe/Riga'), -('Europe', 'Europe/Rome'), -('Indian', 'Indian/Antananarivo'), -('Indian', 'Indian/Chagos'), -('Indian', 'Indian/Christmas'), -('Indian', 'Indian/Cocos'), -('Indian', 'Indian/Comoro'), -('Pacific', 'Pacific/Apia'), -('Pacific', 'Pacific/Auckland'), -('Pacific', 'Pacific/Chatham'), -('Pacific', 'Pacific/Chuuk'), -('Pacific', 'Pacific/Easter'), -('Pacific', 'Pacific/Efate'); -COMMIT WORK; diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index 71a9fef796..3f7e12520f 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -1599,19 +1599,6 @@ CREATE TABLE tevent_filter ( filter_only_alert NUMBER(10, 0) default -1 NOT NULL ); --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE IF NOT EXISTS ttimezone ( - id_tz NUMBER(10,0) NOT NULL PRIMARY KEY, - zone VARCHAR2(60) NOT NULL, - timezone VARCHAR2(60) NOT NULL -); - -CREATE SEQUENCE ttimezone_s INCREMENT BY 1 START WITH 1; -CREATE OR REPLACE TRIGGER ttimezone_inc BEFORE INSERT ON ttimezone REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttimezone_s.nextval INTO :NEW.ID_TZ FROM dual; END ttimezone_inc;; - -- ----------------------------------------------------- -- Table `tpassword_history` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index 7e25003099..63e95092da 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -1297,16 +1297,6 @@ CREATE TABLE "tevent_filter" ( "filter_only_alert" INTEGER NOT NULL default -1 ); --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE "ttimezone" ( - "id_tz" INTEGER NOT NULL PRIMARY KEY, - "zone" varchar(60) NOT NULL, - "timezone" varchar(60) NOT NULL -); - -- ----------------------------------------------------- -- Table `tpassword_history` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 7a0ee31922..c0faaf23e1 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1399,17 +1399,6 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` ( PRIMARY KEY (`id_filter`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -CREATE TABLE IF NOT EXISTS `ttimezone` ( - `id_tz` int(10) unsigned NOT NULL auto_increment, - `zone` varchar(60) NOT NULL, - `timezone` varchar(60) NOT NULL, -PRIMARY KEY (`id_tz`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- ----------------------------------------------------- -- Table `tpassword_history` -- ----------------------------------------------------- diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index c599f7221e..1e833aecad 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -437,239 +437,3 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0),(2,'Departm INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es'),(2,'critical','Critical modules',''),(3,'dmz','DMZ Network Zone',''),(4,'performance','Performance anda capacity modules',''),(5,'configuration','',''); --- ----------------------------------------------------- --- Table `ttimezone` --- ----------------------------------------------------- - -INSERT INTO `ttimezone` (`zone`, `timezone`) VALUES -('Africa','Africa/Abidjan'), -('Africa','Africa/Accra'), -('Africa','Africa/Addis_Ababa'), -('Africa','Africa/Algiers'), -('Africa','Africa/Asmara'), -('Africa','Africa/Asmera'), -('Africa','Africa/Bamako'), -('Africa','Africa/Bangui'), -('Africa','Africa/Banjul'), -('Africa','Africa/Bissau'), -('Africa','Africa/Blantyre'), -('Africa','Africa/Brazzaville'), -('Africa', 'Africa/Bujumbura'), -('Africa', 'Africa/Cairo'), -('Africa', 'Africa/Casablanca'), -('Africa', 'Africa/Ceuta'), -('Africa', 'Africa/Conakry'), -('Africa', 'Africa/Dakar'), -('Africa', 'Africa/Dar_es_Salaam'), -('Africa', 'Africa/Djibouti'), -('Africa', 'Africa/Douala'), -('Africa', 'Africa/El_Aaiun'), -('Africa', 'Africa/Freetown'), -('Africa', 'Africa/Gaborone'), -('Africa', 'Africa/Harare'), -('Africa', 'Africa/Johannesburg'), -('Africa', 'Africa/Juba'), -('Africa', 'Africa/Kampala'), -('Africa', 'Africa/Khartoum'), -('Africa', 'Africa/Kigali'), -('Africa', 'Africa/Kinshasa'), -('Africa', 'Africa/Lagos'), -('Africa', 'Africa/Libreville'), -('Africa', 'Africa/Lome'), -('Africa', 'Africa/Luanda'), -('Africa', 'Africa/Lubumbashi'), -('Africa', 'Africa/Lusaka'), -('Africa', 'Africa/Malabo'), -('Africa', 'Africa/Maputo'), -('Africa', 'Africa/Maseru'), -('Africa', 'Africa/Mbabane'), -('Africa', 'Africa/Mogadishu'), -('Africa', 'Africa/Monrovia'), -('Africa', 'Africa/Nairobi'), -('Africa', 'Africa/Ndjamena'), -('Africa', 'Africa/Niamey'), -('Africa', 'Africa/Nouakchott'), -('Africa', 'Africa/Ouagadougou'), -('Africa', 'Africa/Porto-Novo'), -('Africa', 'Africa/Sao_Tome'), -('Africa', 'Africa/Timbuktu'), -('Africa', 'Africa/Tripoli'), -('Africa', 'Africa/Tunis'), -('Africa', 'Africa/Windhoek'), -('America', 'America/Adak'), -('America', 'America/Anchorage'), -('America', 'America/Anguilla'), -('America', 'America/Antigua'), -('America', 'America/Araguaina'), -('America', 'America/Argentina/Buenos_Aires'), -('America', 'America/Argentina/Catamarca'), -('America', 'America/Argentina/ComodRivadavia'), -('America', 'America/Argentina/Cordoba'), -('America', 'America/Argentina/Jujuy'), -('America', 'America/Argentina/La_Rioja'), -('America', 'America/Argentina/Mendoza'), -('America', 'America/Argentina/Rio_Gallegos'), -('America', 'America/Argentina/Salta'), -('America', 'America/Argentina/San_Juan'), -('America', 'America/Argentina/San_Luis'), -('America', 'America/Argentina/Tucuman'), -('America', 'America/Argentina/Ushuaia'), -('America', 'America/Aruba'), -('America', 'America/Asuncion'), -('America', 'America/Atikokan'), -('America', 'America/Atka'), -('America', 'America/Bahia'), -('America', 'America/Bahia_Banderas'), -('America', 'America/Barbados'), -('America', 'America/Belem'), -('America', 'America/Belize'), -('America', 'America/Blanc-Sablon'), -('America', 'America/Boa_Vista'), -('America', 'America/Bogota'), -('America', 'America/Boise'), -('America', 'America/Buenos_Aires'), -('America', 'America/Cambridge_Bay'), -('America', 'America/Campo_Grande'), -('America', 'America/Cancun'), -('America', 'America/Caracas'), -('America', 'America/Catamarca'), -('America', 'America/Cayenne'), -('America', 'America/Cayman'), -('America', 'America/Chicago'), -('America', 'America/Chihuahua'), -('America', 'America/Coral_Harbour'), -('America', 'America/Cordoba'), -('America', 'America/Costa_Rica'), -('America', 'America/Cuiaba'), -('America', 'America/New_York'), -('America', 'America/Vancouver'), -('America', 'America/Toronto'), -('America', 'America/Phoenix'), -('America', 'America/Monterrey'), -('America', 'America/Panama'), -('America', 'America/Puerto_Rico'), -('Antarctica', 'Antarctica/Casey'), -('Antarctica', 'Antarctica/Davis'), -('Antarctica', 'Antarctica/DumontDUrville'), -('Antarctica', 'Antarctica/Macquarie'), -('Antarctica', 'Antarctica/Mawson'), -('Antarctica', 'Antarctica/McMurdo'), -('Antarctica', 'Antarctica/Palmer'), -('Antarctica', 'Antarctica/Rothera'), -('Antarctica', 'Antarctica/South_Pole'), -('Antarctica', 'Antarctica/Syowa'), -('Antarctica', 'Antarctica/Vostok'), -('Arctic', 'Arctic/Longyearbyen'), -('Asia', 'Asia/Aden'), -('Asia', 'Asia/Almaty'), -('Asia', 'Asia/Amman'), -('Asia', 'Asia/Anadyr'), -('Asia', 'Asia/Aqtau'), -('Asia', 'Asia/Aqtobe'), -('Asia', 'Asia/Ashgabat'), -('Asia', 'Asia/Ashkhabad'), -('Asia', 'Asia/Baghdad'), -('Asia', 'Asia/Bahrain'), -('Asia', 'Asia/Baku'), -('Asia', 'Asia/Bangkok'), -('Asia', 'Asia/Beirut'), -('Asia', 'Asia/Bishkek'), -('Asia', 'Asia/Brunei'), -('Asia', 'Asia/Calcutta'), -('Asia', 'Asia/Choibalsan'), -('Asia', 'Asia/Chongqing'), -('Asia', 'Asia/Chungking'), -('Asia', 'Asia/Colombo'), -('Asia', 'Asia/Dacca'), -('Asia', 'Asia/Damascus'), -('Asia', 'Asia/Dhaka'), -('Asia', 'Asia/Dili'), -('Asia', 'Asia/Dubai'), -('Asia', 'Asia/Dushanbe'), -('Asia', 'Asia/Gaza'), -('Atlantic', 'Atlantic/Azores'), -('Atlantic', 'Atlantic/Bermuda'), -('Atlantic', 'Atlantic/Canary'), -('Atlantic', 'Atlantic/Cape_Verde'), -('Atlantic', 'Atlantic/Faeroe'), -('Atlantic', 'Atlantic/Faroe'), -('Atlantic', 'Atlantic/Jan_Mayen'), -('Atlantic', 'Atlantic/Madeira'), -('Atlantic', 'Atlantic/Reykjavik'), -('Atlantic', 'Atlantic/South_Georgia'), -('Atlantic', 'Atlantic/St_Helena'), -('Atlantic', 'Atlantic/Stanley'), -('Australia', 'Australia/ACT'), -('Australia', 'Australia/Adelaide'), -('Australia', 'Australia/Brisbane'), -('Australia', 'Australia/Broken_Hill'), -('Australia', 'Australia/Canberra'), -('Australia', 'Australia/Currie'), -('Australia', 'Australia/Darwin'), -('Australia', 'Australia/Eucla'), -('Australia', 'Australia/Hobart'), -('Australia', 'Australia/LHI'), -('Australia', 'Australia/Lindeman'), -('Australia', 'Australia/Lord_Howe'), -('Australia', 'Australia/Melbourne'), -('Australia', 'Australia/North'), -('Australia', 'Australia/NSW'), -('Australia', 'Australia/Perth'), -('Australia', 'Australia/Queensland'), -('Australia', 'Australia/South'), -('Australia', 'Australia/Sydney'), -('Australia', 'Australia/Tasmania'), -('Australia', 'Australia/Victoria'), -('Australia', 'Australia/West'), -('Australia', 'Australia/Yancowinna'), -('Europe', 'Europe/Amsterdam'), -('Europe', 'Europe/Andorra'), -('Europe', 'Europe/Athens'), -('Europe', 'Europe/Belfast'), -('Europe', 'Europe/Belgrade'), -('Europe', 'Europe/Berlin'), -('Europe', 'Europe/Bratislava'), -('Europe', 'Europe/Brussels'), -('Europe', 'Europe/Bucharest'), -('Europe', 'Europe/Budapest'), -('Europe', 'Europe/Chisinau'), -('Europe', 'Europe/Copenhagen'), -('Europe', 'Europe/Dublin'), -('Europe', 'Europe/Gibraltar'), -('Europe', 'Europe/Guernsey'), -('Europe', 'Europe/Helsinki'), -('Europe', 'Europe/Isle_of_Man'), -('Europe', 'Europe/Istanbul'), -('Europe', 'Europe/Jersey'), -('Europe', 'Europe/Kaliningrad'), -('Europe', 'Europe/Kiev'), -('Europe', 'Europe/Lisbon'), -('Europe', 'Europe/Ljubljana'), -('Europe', 'Europe/London'), -('Europe', 'Europe/Luxembourg'), -('Europe', 'Europe/Madrid'), -('Europe', 'Europe/Malta'), -('Europe', 'Europe/Mariehamn'), -('Europe', 'Europe/Minsk'), -('Europe', 'Europe/Monaco'), -('Europe', 'Europe/Moscow'), -('Europe', 'Europe/Nicosia'), -('Europe', 'Europe/Oslo'), -('Europe', 'Europe/Paris'), -('Europe', 'Europe/Podgorica'), -('Europe', 'Europe/Prague'), -('Europe', 'Europe/Riga'), -('Europe', 'Europe/Rome'), -('Indian', 'Indian/Antananarivo'), -('Indian', 'Indian/Chagos'), -('Indian', 'Indian/Christmas'), -('Indian', 'Indian/Cocos'), -('Indian', 'Indian/Comoro'), -('Pacific', 'Pacific/Apia'), -('Pacific', 'Pacific/Auckland'), -('Pacific', 'Pacific/Chatham'), -('Pacific', 'Pacific/Chuuk'), -('Pacific', 'Pacific/Easter'), -('Pacific', 'Pacific/Efate'); - -