2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
* godmode/setup/setup.php index.php pandora_db.sql pandoradb_data.sql: Changed timezone setup. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6031 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
39fc3636f5
commit
7b8a15e7f2
|
@ -1,3 +1,10 @@
|
|||
2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/setup/setup.php
|
||||
index.php
|
||||
pandora_db.sql
|
||||
pandoradb_data.sql: Changed timezone setup.
|
||||
|
||||
2012-04-18 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_config.php, extensions/update_manager.php,
|
||||
|
|
|
@ -20,6 +20,7 @@ check_login ();
|
|||
|
||||
if (is_ajax ()) {
|
||||
$get_os_icon = (bool) get_parameter ('get_os_icon');
|
||||
$select_timezone = get_parameter ('select_timezone', 0);
|
||||
|
||||
if ($get_os_icon) {
|
||||
$id_os = (int) get_parameter ('id_os');
|
||||
|
@ -27,6 +28,21 @@ if (is_ajax ()) {
|
|||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
echo json_encode($timezone_name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -186,8 +202,30 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
$timezones = db_get_all_rows_sql ("SELECT timezone FROM ttimezone WHERE zone='Africa'");
|
||||
foreach ($timezones as $timezone) {
|
||||
foreach ($timezone as $key=>$name_tz) {
|
||||
if ($key == 'timezone')
|
||||
$timezone_n[$name_tz] = $name_tz;
|
||||
}
|
||||
}
|
||||
|
||||
$table->data[23][0] = __('Timezone setup');
|
||||
$table->data[23][1] = html_print_input_text ('timezone', $config["timezone"], '', 25, 25, true);
|
||||
$table->data[23][1] = html_print_input_text_extended ('timezone_text', $config["timezone"], 'text-timezone_text', '', 25, 25, false, '', 'readonly', true);
|
||||
$table->data[23][1] .= '<a id="change_timezone">'.html_print_image ('images/pencil.png', true, array ('title' => __('Change timezone'))).'</a>';
|
||||
$table->data[23][1] .= " ". html_print_select($zone_name, 'zone', 'None', 'show_timezone();', '', '', true);
|
||||
$table->data[23][1] .= " ". html_print_select($timezone_n, 'timezone', $config["timezone"], '', '', '', true);
|
||||
|
||||
|
||||
$sounds = get_sounds();
|
||||
$table->data[24][0] = __('Sound for Alert fired');
|
||||
|
@ -233,14 +271,40 @@ function replaySound(type) {
|
|||
}
|
||||
}
|
||||
|
||||
function show_timezone () {
|
||||
zone = $("#zone").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
data: "page=<?php echo $_GET['sec2']; ?>&select_timezone=1&zone=" + zone,
|
||||
dataType: "json",
|
||||
success: function(data){
|
||||
$("#timezone").empty();
|
||||
jQuery.each (data, function (id, value) {
|
||||
timezone = value;
|
||||
$("select[name='timezone']").append($("<option>").val(timezone).html(timezone));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready (function () {
|
||||
|
||||
$("#zone").attr("disabled", true);
|
||||
$("#timezone").attr("disabled", true);
|
||||
|
||||
$("#radiobtn0011").click(function(){
|
||||
flag = $("#radiobtn0011").is(':checked');
|
||||
if (flag == true){
|
||||
<?php echo "if (! confirm ('" . __('If Enterprise ACL System is enabled without rules you will lose access to Pandora FMS Console (even admin). Do you want to continue?') . "')) return false" ?>
|
||||
}
|
||||
});
|
||||
|
||||
$("#change_timezone").click(function () {
|
||||
$("#zone").attr("disabled", false);
|
||||
$("#timezone").attr("disabled", false);
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?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 = 1;
|
||||
$develop_bypass = 0;
|
||||
|
||||
if ($develop_bypass != 1) {
|
||||
// If no config file, automatically try to install
|
||||
|
|
|
@ -1387,3 +1387,13 @@ 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;
|
||||
|
|
|
@ -432,4 +432,239 @@ INSERT INTO `trecon_script` VALUES
|
|||
|
||||
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `net_dst_opt`, `net_port_opt`, `user_opt`, `pass_opt`, `plugin_type`) VALUES (1,'IPMI Plugin','Plugin to get IPMI monitors from a IPMI Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl','-h','','-u','-p',0),(2,'DNS Plugin','This plugin is used to check if a specific domain return a specific IP address, and to check how time (milisecs) takes the DNS to answer. Use IP address parameter to specify the IP of your domain. Use these custom parameters for the other parameters:

-d domain to check (for example pandorafms.com)
-s DNS Server to check  (for example 8.8.8.8)

Optional parameters:

-t Do a DNS time response check instead DNS resolve test

',15,'/usr/share/pandora_server/util/plugin/dns_plugin.sh','-i','','','',0),(3,'UDP port check','Check a remote UDP port (by using NMAP). Use IP address and Port options.',5,'/usr/share/pandora_server/util/plugin/udp_nmap_plugin.sh','-t','-p','','',0),(4,'SMTP Check','This plugin is used to send a mail to a SMTP server and check if works. Parameters in the plugin 
IP Addres - SMTP Server IP address
User - AUTH login  
Pass - AUTH password
Port - SMTP port (optional)

Optional parameters 

 -d Destination email
 -f Email of the sender
 -a Autentication system, could be LOGIN, PLAIN, CRAM-MD5 or DIGEST-MD


',10,'/usr/share/pandora_server/util/plugin/SMTP_check.pl','-h','-o','-u','-p',0);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- 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');
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue