diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7bf00004e8..830b9642ef 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0dev-161204 +Version: 7.0dev-161213 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 23b0e94b8f..1d8c373ef0 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0dev-161204" +pandora_version="7.0dev-161213" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index de47fd422f..c9cc4a3099 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0dev'; -use constant AGENT_BUILD => '161204'; +use constant AGENT_BUILD => '161213'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; @@ -131,6 +131,7 @@ my %DefaultConf = ( 'temporal' => '/var/spool/pandora', 'interval' => 300, 'debug' => 0, + 'ehorus_conf' => undef, 'agent_name' => hostname (), 'agent_name_cmd' => '', 'description' => '', @@ -2194,6 +2195,39 @@ sub init_module ($) { $module->{'alert_template'} = undef; } +################################################################################ +# Get the eHorus key from the eHorus agent configuration file. +################################################################################ +sub get_ehkey { + my $fh; + + return '' unless defined($Conf{'ehorus_conf'}); + + # Open the eHorus configuration file. + if (!open($fh, '<', $Conf{'ehorus_conf'})) { + # Do not write to the log, since ehorus_conf points to the default eHorus configuration file by default. + return ''; + } + + # Look for the eHorus key. + while (my $line = <$fh>) { + + # Skip comments. + next if ($line =~ m/^\s*#/); + + if ($line =~ m/\s*eh_key\s+(\S+)/) { + my $eh_key = $1; + close($fh); + + return $eh_key; + } + } + + # Not found. + close($fh); + return ''; +} + ################################################################################ # Main. ################################################################################ @@ -2373,11 +2407,14 @@ while (1) { # Clear the XML $Xml = ""; + # Get the eHorus key. + my $eh_key = get_ehkey(); + # Custom fields - my @customfieldskeys = keys(%Customfields); - if ($#customfieldskeys > -1) { + if ($#customfieldskeys > -1 || $eh_key ne '') { $Xml .= "\n"; + foreach my $customfieldkey (@customfieldskeys) { if($customfieldkey =~ m/^(custom_field\d+_)name/) { if(defined($Customfields{$1."value"})) { @@ -2388,6 +2425,15 @@ while (1) { } } } + + # Add the eHorus key as a custom field. + if ($eh_key ne '') { + $Xml .= " \n"; + $Xml .= " eHorusID\n"; + $Xml .= " \n"; + $Xml .= " \n"; + } + $Xml .= "\n"; } @@ -2475,6 +2521,7 @@ while (1) { $xml_header .= "' position_description='" .$Conf{'position_description'}; } } + $xml_header .= "'>\n"; $Xml = $xml_header . $Xml . ""; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 616945866c..2a1afdd36a 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0dev -%define release 161204 +%define release 161213 Summary: Pandora FMS Linux agent, PERL version Name: %{name} @@ -24,7 +24,7 @@ Requires(preun): chkconfig /bin/rm /usr/sbin/userdel Requires: fileutils textutils unzip Requires: util-linux procps grep Requires: /sbin/ip /bin/awk -Requires: perl perl(Sys::Syslog) +Requires: perl perl(Sys::Syslog) perl(IO::Socket::SSL) # Required by plugins #Requires: sh-utils sed passwd net-tools rpm AutoReq: 0 diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7b92e80bb4..89fc66acf4 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0dev -%define release 161204 +%define release 161213 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 61ffba3e71..5399495cd5 100644 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0dev" -PI_BUILD="161204" +PI_BUILD="161213" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index e854d52539..ac19cf0bca 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{161204} +{161213} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d71191ea7c..fc83f2c276 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0dev(Build 161204)") +#define PANDORA_VERSION ("7.0dev(Build 161213)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index c7777b8b78..198a843074 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -385,7 +385,7 @@ Pandora_Windows_Service::getXmlHeader () { char timestamp[20]; string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name, agent_name_cmd; string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result, agent_mode; - string group_password; + string group_password, ehorus_conf; time_t ctime; struct tm *ctime_tm = NULL; int pos; @@ -479,13 +479,12 @@ Pandora_Windows_Service::getXmlHeader () { xml += url_address; } - // Get Url Address + // Get group password group_password = conf->getValue ("group_password"); if (group_password != "") { xml += "\" group_password=\""; xml += group_password; } - // Get Coordinates gis_exec = conf->getValue ("gis_exec"); @@ -1634,6 +1633,7 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) { string xml_filename, random_integer; string tmp_filename, tmp_filepath; string encoding; + string ehorus_conf, eh_key; static HANDLE mutex = 0; ULARGE_INTEGER free_bytes; double min_free_bytes = 0; @@ -1653,6 +1653,12 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) { data_xml = getXmlHeader (); + /* Get the eHorus key. */ + ehorus_conf = conf->getValue ("ehorus_conf"); + if (ehorus_conf != "") { + eh_key = getEHKey(ehorus_conf); + } + /* Write custom fields */ int c = 1; @@ -1662,8 +1668,8 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) { sprintf(token_value_token, "custom_field%d_value", c); string token_name = conf->getValue (token_name_token); string token_value = conf->getValue (token_value_token); - - if(token_name != "" && token_value != "") { + + if((token_name != "" && token_value != "") || eh_key != "") { data_xml += "\n"; while(token_name != "" && token_value != "") { data_xml += " \n"; @@ -1677,6 +1683,15 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) { token_name = conf->getValue (token_name_token); token_value = conf->getValue (token_value_token); } + + /* Add the eHorus key as a custom field. */ + if (eh_key != "") { + data_xml += " \n"; + data_xml += " eHorusID\n"; + data_xml += " \n"; + data_xml += " \n"; + } + data_xml += "\n"; } @@ -2034,6 +2049,37 @@ Pandora_Windows_Service::getConf () { return this->conf; } +string +Pandora_Windows_Service::getEHKey (string ehorus_conf) { + string buffer, eh_key; + std::ifstream ifs(ehorus_conf.c_str()); + int pos; + + if (! ifs.is_open ()) { + pandoraDebug ("Error opening eHorus configuration file %s", ehorus_conf.c_str ()); + return eh_key; + } + + /* Look for the eHorus key. */ + while (ifs.good ()) { + getline (ifs, buffer); + + /* Skip comments. */ + if (buffer.empty() || buffer.at(0) == '#') { + continue; + } + + pos = buffer.find("eh_key"); + if (pos != string::npos){ + eh_key = buffer.substr(pos + 7); /* pos + strlen("eh_key ") */ + eh_key = trim(eh_key); + return eh_key; + } + } + + return eh_key; +} + long Pandora_Windows_Service::getInterval () { return this->interval; diff --git a/pandora_agents/win32/pandora_windows_service.h b/pandora_agents/win32/pandora_windows_service.h index c0b6b2f9a9..ecce0d501e 100644 --- a/pandora_agents/win32/pandora_windows_service.h +++ b/pandora_agents/win32/pandora_windows_service.h @@ -114,6 +114,7 @@ namespace Pandora { int sendXml (Pandora_Module_List *modules); void sendBufferedXml (string path); Pandora_Agent_Conf *getConf (); + string getEHKey (string ehorus_conf); long getInterval (); long getIntensiveInterval (); diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 037eae2b36..d11898a7ee 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0dev(Build 161204))" + VALUE "ProductVersion", "(7.0dev(Build 161213))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b7b0dfbf44..85698fc12e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0dev-161204 +Version: 7.0dev-161213 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index b2b48053e5..2552488be3 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0dev-161204" +pandora_version="7.0dev-161213" package_pear=0 package_pandora=1 diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql index 12b92d8a26..02a88c4d61 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql @@ -123,3 +123,8 @@ ALTER TABLE tlayout ADD `background_color` varchar(50) NOT NULL default '#FFF'; -- Table `tlayout_data` -- --------------------------------------------------------------------- ALTER TABLE tlayout_data ADD `type_graph` varchar(50) NOT NULL default 'area'; + +-- --------------------------------------------------------------------- +-- Table `tagent_custom_fields` +-- --------------------------------------------------------------------- +INSERT INTO `tagent_custom_fields` (`name`) VALUES ('eHorusID'); diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql index 9f8ddf1823..ceb6b8a414 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql @@ -101,3 +101,8 @@ ALTER TABLE tlayout ADD COLUMN background_color varchar(50) NOT NULL default '#F -- Table `tlayout_data` -- --------------------------------------------------------------------- ALTER TABLE tlayout_data ADD COLUMN type_graph varchar(50) NOT NULL default 'area'; + +-- --------------------------------------------------------------------- +-- Table `tagent_custom_fields` +-- --------------------------------------------------------------------- +INSERT INTO tagent_custom_fields (name) VALUES ('eHorusID'); diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index dcbc9b55ee..c3a8c9d0b0 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -299,7 +299,7 @@ html_print_table ($table); echo '
'; echo '' . + '>' . html_print_button (__('Export to CSV '), 'export_csv', false, '', 'class=sub upd', true, false). ''; echo '
'; diff --git a/pandora_console/images/icono_test.png b/pandora_console/images/icono_test.png new file mode 100644 index 0000000000..5641196294 Binary files /dev/null and b/pandora_console/images/icono_test.png differ diff --git a/pandora_console/images/icono_test_active.png b/pandora_console/images/icono_test_active.png new file mode 100644 index 0000000000..67ebb945b6 Binary files /dev/null and b/pandora_console/images/icono_test_active.png differ diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 89b4bf5838..dfc5661e7b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC161204'; +$build_version = 'PC161213'; $pandora_version = 'v7.0dev'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index b4eee468b9..86cf8387d4 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -28,8 +28,12 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, if ($port === null) $port = $config["dbport"]; - if ($config["mysqli"] === null && extension_loaded(mysqli)) + if ($config["mysqli"] === null && extension_loaded(mysqli)) { $config["mysqli"] = true; + } + else { + $config["mysqli"] = false; + } // Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems // If you want persistent connections change it to mysql_pconnect(). diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 0b0ceb11d7..3f1ebd44f9 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -2293,6 +2293,11 @@ function print_audit_csv ($data) { global $config; global $graphic_type; + if (!$data) { + echo __('No data found to export'); + return 0; + } + $config['ignore_callback'] = true; while (@ob_end_clean ()); @@ -2300,20 +2305,20 @@ function print_audit_csv ($data) { header("Content-Disposition: attachment; filename=audit_log".date("Y-m-d_His").".csv"); header("Pragma: no-cache"); header("Expires: 0"); + + // BOM + print pack('C*',0xEF,0xBB,0xBF); - if ($data) { - echo __('User') . ';' . - __('Action') . ';' . - __('Date') . ';' . - __('Source ID') . ';' . - __('Comments') ."\n"; - foreach ($data as $line) { - echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n"; - } - } - else { - echo __('No data found to export'); + echo __('User') . ';' . + __('Action') . ';' . + __('Date') . ';' . + __('Source ID') . ';' . + __('Comments') ."\n"; + foreach ($data as $line) { + echo io_safe_output($line['id_usuario']) . ';' . io_safe_output($line['accion']) . ';' . $line['fecha'] . ';' . $line['ip_origen'] . ';'. io_safe_output($line['descripcion']). "\n"; } + + exit; } /** diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 3f47d58352..305a0cb089 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -132,7 +132,7 @@ function alerts_get_alerts($id_group = 0, $free_search = "", $status = "all", $s * * @return mixed Return id if the group have any alert is fired or false is not. */ -function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = 'AND 1=1') { +function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = 'AND 1=1', $agents = null) { global $config; $return = false; @@ -151,9 +151,14 @@ function alerts_get_event_status_group($idGroup, $type = "alert_fired", $query = $typeWhere = ' AND event_type IN (' . implode(',', $temp) . ')'; } - $agents = agents_get_group_agents($idGroup, false, "lower", false); - - $idAgents = array_keys($agents); + if ($agents == null) { + $agents = agents_get_group_agents($idGroup, false, "lower", false); + + $idAgents = array_keys($agents); + } + else { + $idAgents = array_values($agents); + } $result = db_get_all_rows_sql('SELECT id_evento FROM tevento diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 2a275102f3..8627cccee2 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1339,6 +1339,8 @@ function reporting_event_report_group($report, $content, metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -1383,6 +1385,8 @@ function reporting_event_report_module($report, $content) { metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -2201,6 +2205,8 @@ function reporting_event_report_agent($report, $content, metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 8a2dd9db6e..e697330b90 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -130,10 +130,8 @@ function reporting_html_print_report($report, $mini = false) { $item['date']['to'], $label); - if ($item["description"] != "") { - $table->data['description_row']['description'] = $item["description"]; + $table->data['description_row']['description'] = $item["description"]." - Total events: ".$item["total_events"]; $table->colspan['description_row']['description'] = 3; - } switch ($item['type']) { case 'availability': diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index f0fd393824..f2387cc26d 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -247,6 +247,42 @@ function treeview_printModuleTable($id_module, $server_data = false, $no_head = $last_data_str .= " "; $last_data_str .= html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px')); + + $is_snapshot = is_snapshot_data ( $last_data["datos"] ); + + if (($config['command_snapshot']) && ($is_snapshot)) { + $handle = 'snapshot_' . $module['id_agente_modulo']; + $url = 'include/procesos.php?agente=' . $row['id_agente_modulo']; + $win_handle = dechex(crc32($handle)); + if (! defined ('METACONSOLE')) { + $link = "winopeng_var('operation/agentes/snapshot_view.php?" . + "id=" . $module['id_agente_modulo'] . + "&refr=" . $module['current_interval'] . + "&label=" . rawurlencode(urlencode(io_safe_output($module['module_name']))) . "','" . $win_handle . "', 700,480)"; + } + else{ + $link = "winopeng_var('$last_data[datos]','',700,480)"; + + } + + if(!is_image_data($last_data["datos"])){ + $salida = '' . + html_print_image('images/default_list.png', true, + array('border' => '0', + 'alt' => '', + 'title' => __('Snapshot view'))) . '   '; + } + else { + $salida = '' . + html_print_image('images/photo.png', true, + array('border' => '0', + 'alt' => '', + 'title' => __('Snapshot view'))) . '   '; + } + } + + + $last_data_str .= $salida; } else { $last_data_str = '' . __('No data') . ''; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 40ad4f71a1..55c8e6a54c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3509,6 +3509,17 @@ div.simple_value > a > span.text p font-size:13pt; top:8px; } +.modalheaderh1{ + text-align:center; + width:100%; + height:37px; + left:0px; + background-color:#82b92e; + color:white; + position:relative; + font-family:Nunito; + font-size:13pt; +} .modalclosex{ cursor:pointer; display:inline; diff --git a/pandora_console/install.php b/pandora_console/install.php index a2ac0975a9..20281dcbfd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
"; + echo "

"; echo __("Current data at"); echo " "; echo $row["timestamp"]; echo "

"; $datos = io_safe_output($row["datos"]); if (is_image_data($datos)) { - echo 'image'; + echo '
image
'; } else { $datos = preg_replace ('/ ' . $id; $type = array(); $alert = get_parameter('alert_fired'); if ($alert == 'true') { $resultAlert = alerts_get_event_status_group($idGroup, - 'alert_fired', $query); + 'alert_fired', $query, $agents); } $critical = get_parameter('critical'); if ($critical == 'true') { $resultCritical = alerts_get_event_status_group($idGroup, - 'going_up_critical', $query); + 'going_up_critical', $query, $agents); } $warning = get_parameter('warning'); if ($warning == 'true') { $resultWarning = alerts_get_event_status_group($idGroup, - 'going_up_warning', $query); + 'going_up_warning', $query, $agents); + } + $unknown = get_parameter('unknown'); + if ($unknown == 'true') { + $resultUnknown = alerts_get_event_status_group($idGroup, + 'going_unknown', $query, $agents); } if ($resultAlert) { @@ -165,6 +171,10 @@ if (is_ajax ()) { $return = array('fired' => $resultWarning, 'sound' => $config['sound_warning']); } + else if ($resultUnknown) { + $return = array('fired' => $resultWarning, + 'sound' => $config['sound_alert']); + } else { $return = array('fired' => 0); } @@ -427,7 +437,7 @@ if ($config["pure"] == 0 || $meta) { echo ui_get_full_url('operation/events/sound_events.php'); ?>'; - window.open(url, '','width=300, height=300, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=yes'); + window.open(url, '','width=400, height=380, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no'); } "; echo ""; echo "" . __("Sound Events") . ""; @@ -62,32 +64,40 @@ echo "" . __("Sound Events") . ""; echo ''; echo ''; echo ""; -echo ""; -echo html_print_image('images/pandora_logo_head.png', true); -echo "

" . __("Sound console"). "

"; +echo ""; +echo "

" . __("Sound console"). "

"; $table = null; $table->width = '100%'; $table->size[0] = '10%'; -$table->size[1] = '90%'; $table->style[0] = 'font-weight: bold; vertical-align: top;'; +$table->style[1] = 'font-weight: bold; vertical-align: top;'; $table->data[0][0] = __('Group'); -$table->data[0][1] = html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true); -$table->data[1][0] = __('Type'); -$table->data[1][1] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . +$table->data[0][0] .= html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true) . '
' . '
'; +$table->data[0][0] .= __('Agent'); +$table->data[0][0] .= html_print_select($agents, 'id_agents[]', true, false, '', '', true, true); +$table->data[0][1] = __('Type'); +$table->data[0][1] .= '
' . html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . html_print_checkbox('critical', 'critical', true, true, false, 'changeType();') . __('Monitor critical') . '
' . - html_print_checkbox('warning', 'warning', true, true, false, 'changeType();') . __('Monitor warning') . '
' . -$table->data[2][0] = ''; -$table->data[2][1] = '' . - html_print_image("images/play.button.png", true, array("id" => "button")) . - ''; -$table->data[2][1] .= '' . - html_print_image("images/ok.button.png", true, - array("style" => "margin-left: 10px;")) . ''; + html_print_checkbox('unknown', 'unknown', true, true, false, 'changeType();') . __('Monitor unknown') . '
' . + html_print_checkbox('warning', 'warning', true, true, false, 'changeType();') . __('Monitor warning') . '
'; html_print_table($table); + +echo '
'; + +echo '' . + html_print_image("images/icono_play.png", true, array("id" => "button")) . + ''; +echo '' . + html_print_image("images/icono_ok.png", true, array("style" => "margin-left: 15px;")) . + ''; +echo '' . + html_print_image("images/icono_test.png", true, array("id" => "button_try", "style" => "margin-left: 15px;")) . + ''; + ?>