diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ce165fde19..2f579d46f1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.740-191029 +Version: 7.0NG.740-191113 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 a4a8dce448..f28fdab114 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.0NG.740-191029" +pandora_version="7.0NG.740-191113" 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 4bbac522b1..a3c40e50f0 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.740'; -use constant AGENT_BUILD => '191029'; +use constant AGENT_BUILD => '191113'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 79f2310c11..f5ed96e5d9 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.0NG.740 -%define release 191029 +%define release 191113 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 392fa174ce..ea8efb582c 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.0NG.740 -%define release 191029 +%define release 191113 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 cc4b78b51c..316e2a03c2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.740" -PI_BUILD="191029" +PI_BUILD="191113" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 730edbe5de..be5a498d11 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{191029} +{191113} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 823b486b0e..b268f7f436 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.0NG.740(Build 191029)") +#define PANDORA_VERSION ("7.0NG.740(Build 191113)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d714543482..e2707bff53 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.0NG.740(Build 191029))" + VALUE "ProductVersion", "(7.0NG.740(Build 191113))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index cab514f37e..45e4ec20f1 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.740-191029 +Version: 7.0NG.740-191113 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 64140d02ad..cf617bb4e3 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.0NG.740-191029" +pandora_version="7.0NG.740-191113" package_pear=0 package_pandora=1 diff --git a/pandora_console/DEBIAN/postinst b/pandora_console/DEBIAN/postinst index eb8e4872f3..a899c6bf0a 100755 --- a/pandora_console/DEBIAN/postinst +++ b/pandora_console/DEBIAN/postinst @@ -11,4 +11,11 @@ echo Restart the apache. /etc/init.d/apache2 restart fi +# Install pandora_websocket_engine service. +cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ +chmod +x /etc/init.d/pandora_websocket_engine + +echo "You can now start the Pandora FMS Websocket service by executing" +echo " /etc/init.d/pandora_websocket_engine start" + echo "Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it." diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 8c87577abc..13924f56e2 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -298,70 +298,86 @@ function quickShellSettings() ui_require_css_file('wizard'); ui_require_css_file('discovery'); - // Parser. // Gotty settings. Internal communication (WS). - $gotty = get_parameter( - 'gotty', - $config['gotty'] - ); - $gotty_host = get_parameter( - 'gotty_host', - $config['gotty_host'] - ); - $gotty_ssh_port = get_parameter( - 'gotty_ssh_port', - $config['gotty_ssh_port'] - ); - $gotty_telnet_port = get_parameter( - 'gotty_telnet_port', - $config['gotty_telnet_port'] - ); - - $gotty_user = get_parameter( - 'gotty_user', - $config['gotty_user'] - ); - - $gotty_pass = get_parameter( - 'gotty_pass', - io_output_password($config['gotty_pass']) - ); - - $gotty_pass = io_input_password($gotty_pass); - - $changes = 0; - $critical = 0; - if ($config['gotty'] != $gotty) { - config_update_value('gotty', $gotty); - $changes++; - $critical++; + if (isset($config['gotty_host']) === false) { + config_update_value('gotty_host', '127.0.0.1'); } - if ($config['gotty_host'] != $gotty_host) { - config_update_value('gotty_host', $gotty_host); - $changes++; + if (isset($config['gotty_telnet_port']) === false) { + config_update_value('gotty_telnet_port', 8082); } - if ($config['gotty_telnet_port'] != $gotty_telnet_port) { - config_update_value('gotty_telnet_port', $gotty_telnet_port); - $changes++; + if (isset($config['gotty_ssh_port']) === false) { + config_update_value('gotty_ssh_port', 8081); } - if ($config['gotty_ssh_port'] != $gotty_ssh_port) { - config_update_value('gotty_ssh_port', $gotty_ssh_port); - $changes++; - } + // Parser. + if (get_parameter('qs_update', false) !== false) { + // Gotty settings. Internal communication (WS). + $gotty = get_parameter( + 'gotty', + '' + ); + $gotty_host = get_parameter( + 'gotty_host', + $config['gotty_host'] + ); + $gotty_ssh_port = get_parameter( + 'gotty_ssh_port', + $config['gotty_ssh_port'] + ); + $gotty_telnet_port = get_parameter( + 'gotty_telnet_port', + $config['gotty_telnet_port'] + ); - if ($config['gotty_user'] != $gotty_user) { - config_update_value('gotty_user', $gotty_user); - $changes++; - $critical++; - } + $gotty_user = get_parameter( + 'gotty_user', + '' + ); - if ($config['gotty_pass'] != $gotty_pass) { - config_update_value('gotty_pass', $gotty_pass); - $changes++; - $critical++; + $gotty_pass = get_parameter( + 'gotty_pass', + '' + ); + + $gotty_pass = io_input_password($gotty_pass); + + $changes = 0; + $critical = 0; + if ($config['gotty'] != $gotty) { + config_update_value('gotty', $gotty); + $changes++; + $critical++; + } + + if ($config['gotty_host'] != $gotty_host) { + config_update_value('gotty_host', $gotty_host); + $changes++; + } + + if ($config['gotty_telnet_port'] != $gotty_telnet_port) { + config_update_value('gotty_telnet_port', $gotty_telnet_port); + $changes++; + } + + if ($config['gotty_ssh_port'] != $gotty_ssh_port) { + config_update_value('gotty_ssh_port', $gotty_ssh_port); + $changes++; + } + + if ($config['gotty_user'] != $gotty_user) { + config_update_value('gotty_user', $gotty_user); + $changes++; + $critical++; + } + + if ($config['gotty_pass'] != $gotty_pass) { + $gotty_pass = io_input_password($gotty_pass); + config_update_value('gotty_pass', $gotty_pass); + $changes++; + $critical++; + } } // Interface. @@ -392,7 +408,8 @@ function quickShellSettings() 'inputs' => [ [ 'label' => __('Gotty path').ui_print_help_tip( - __('Leave blank if using an external Gotty service') + __('Leave blank if using an external Gotty service'), + true ), 'arguments' => [ 'type' => 'text', @@ -426,7 +443,8 @@ function quickShellSettings() ], [ 'label' => __('Gotty user').ui_print_help_tip( - __('Optional, set a user to access gotty service') + __('Optional, set a user to access gotty service'), + true ), 'arguments' => [ 'type' => 'text', @@ -436,7 +454,8 @@ function quickShellSettings() ], [ 'label' => __('Gotty password').ui_print_help_tip( - __('Optional, set a password to access gotty service') + __('Optional, set a password to access gotty service'), + true ), 'arguments' => [ 'type' => 'password', @@ -444,6 +463,13 @@ function quickShellSettings() 'value' => io_output_password($config['gotty_pass']), ], ], + [ + 'arguments' => [ + 'type' => 'hidden', + 'name' => 'qs_update', + 'value' => 1, + ], + ], [ 'arguments' => [ 'type' => 'submit', diff --git a/pandora_console/general/alert_enterprise.php b/pandora_console/general/alert_enterprise.php index 69a09d2998..4cb4a29740 100644 --- a/pandora_console/general/alert_enterprise.php +++ b/pandora_console/general/alert_enterprise.php @@ -105,7 +105,7 @@ if (check_login()) { echo __( "This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.

- Download the official documentation", + Download the official documentation", get_product_name(), get_product_name(), get_product_name(), diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 157388a43e..3a355a8f69 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -349,19 +349,19 @@ if ($config['menu_type'] == 'classic') { // Support. if (enterprise_installed()) { - $header_support_link = 'https://support.artica.es/'; + $header_support_link = $config['custom_support_url']; } else { $header_support_link = 'https://pandorafms.com/forums/'; } $header_support = '
'; - $header_support .= ''; + $header_support .= ''; $header_support .= html_print_image('/images/header_support.png', true, ['title' => __('Go to support'), 'class' => 'bot', 'alt' => 'user']); $header_support .= '
'; // Documentation. $header_docu = '
'; - $header_docu .= ''; + $header_docu .= ''; $header_docu .= html_print_image('/images/header_docu.png', true, ['title' => __('Go to documentation'), 'class' => 'bot', 'alt' => 'user']); $header_docu .= '
'; @@ -635,12 +635,6 @@ if ($config['menu_type'] == 'classic') { * Loads modal from AJAX to add feedback. */ function show_feedback() { - var btn_ok_text = ''; var btn_cancel_text = ''; var title = ''; @@ -719,13 +713,15 @@ if ($config['menu_type'] == 'classic') { $("#agent_access").css("display",""); }); - // Feedback. - $("#feedback-header").click(function () { - // Clean DOM. - $("#feedback-header").empty(); - // Function charge Modal. - show_feedback(); - }); + + // Feedback. + $("#feedback-header").click(function () { + // Clean DOM. + $("#feedback-header").empty(); + // Function charge Modal. + show_feedback(); + }); + function blinkpubli(){ $(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli); diff --git a/pandora_console/general/login_help_dialog.php b/pandora_console/general/login_help_dialog.php index 323b465d5a..b02c47cea9 100644 --- a/pandora_console/general/login_help_dialog.php +++ b/pandora_console/general/login_help_dialog.php @@ -87,7 +87,7 @@ echo '
'; - echo ''.html_print_image( + echo ''.html_print_image( 'images/documentation.png', true, [ @@ -96,7 +96,7 @@ echo '
'; - echo ''.__('Documentation').''; + echo ''.__('Documentation').''; echo ''; echo ''; echo ''; diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 5aecfcc92c..7d4ebe7e04 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -88,6 +88,24 @@ if (!empty($config['login_background'])) { $login_body_style = "style=\"background:linear-gradient(74deg, #02020255 36%, transparent 36%), url('".$background_url."');\""; } +// Get alternative custom in case of db fail. +$custom_fields = [ + 'custom_logo_login', + 'custom_splash_login', + 'custom_title1_login', + 'custom_title2_login', + 'rb_product_name', +]; + +foreach ($custom_fields as $field) { + if (!isset($config[$field])) { + if (isset($config[$field.'_alt'])) { + $config[$field] = $config[$field.'_alt']; + $custom_conf_enabled = true; + } + } +} + // Get the custom icons. $docs_logo = ui_get_docs_logo(); $support_logo = ui_get_support_logo(); @@ -102,7 +120,7 @@ if ($docs_logo !== false) { echo '
  • '.__('Docs').'
  • '; if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) { if ($support_logo !== false) { - echo '
  • support
  • '; + echo '
  • support
  • '; } echo '
  • '.__('Support').'
  • '; @@ -133,7 +151,7 @@ if (defined('METACONSOLE')) { html_print_image('enterprise/images/custom_logo_login/'.$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); } } else { - if (!isset($config['custom_logo_login']) || $config['custom_logo_login'] == 0) { + if (!isset($config['custom_logo_login']) || $config['custom_logo_login'] === 0) { html_print_image('images/custom_logo_login/pandora_logo.png', false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); } else { html_print_image('images/custom_logo_login/'.$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true); @@ -423,9 +441,14 @@ if ($login_screen == 'logout') { } switch ($login_screen) { - case 'error_authconfig': case 'error_dbconfig': - $title = __('Problem with %s database', get_product_name()); + case 'error_authconfig': + if (!isset($config['rb_product_name_alt'])) { + $title = __('Problem with %s database', get_product_name()); + } else { + $title = __('Problem with %s database', $config['rb_product_name_alt']); + } + $message = __( 'Cannot connect to the database, please check your database setup in the include/config.php file.

    Probably your database, hostname, user or password values are incorrect or diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php index 40da530386..9abd62691f 100644 --- a/pandora_console/general/mysqlerr.php +++ b/pandora_console/general/mysqlerr.php @@ -83,7 +83,6 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%; -
    @@ -100,10 +99,29 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%; ?>
    -
    -
    - -
    + $value) { + if (preg_match('/._alt/i', $key)) { + $custom_conf_enabled = true; + break; + } + } + + if (!$custom_conf_enabled) { + echo ' +
    +
    + '.__('Documentation').' + +
    +
    + '; + } + + ?> + +
    diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index d6b9448576..2516e0c5f8 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -275,7 +275,7 @@ if ($new_agent) { $table_alias = '

    '.__('Alias').': '.ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'

    '; $table_alias .= '
    '; -$table_alias .= '
    '.html_print_input_text('alias', $alias, '', 50, 100, true).'
    '; +$table_alias .= '
    '.html_print_input_text('alias', $alias, '', 50, 100, true, false, true).'
    '; if ($new_agent) { $table_alias .= '
    '.html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name').'
    '; } diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index a383de35c4..3d2db9994a 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -14,7 +14,7 @@ // Load global vars check_login(); -// Take some parameters (GET) +// Take some parameters (GET). $offset = (int) get_parameter('offset'); $group_id = (int) get_parameter('group_id'); $ag_group = get_parameter('ag_group_refresh', -1); @@ -47,10 +47,10 @@ require_once 'include/functions_users.php'; $search = get_parameter('search', ''); -// Prepare the tab system to the future +// Prepare the tab system to the future. $tab = 'view'; -// Setup tab +// Setup tab. $viewtab['text'] = ''.html_print_image('images/operation.png', true, ['title' => __('View')]).''; $viewtab['operation'] = true; @@ -59,10 +59,10 @@ $viewtab['active'] = false; $onheader = ['view' => $viewtab]; -// Header +// Header. ui_print_page_header(__('Agents defined in %s', get_product_name()), 'images/agent_mc.png', false, '', true, $onheader); -// Perform actions +// Perform actions. $agent_to_delete = (int) get_parameter('borrar_agente'); $enable_agent = (int) get_parameter('enable_agent'); $disable_agent = (int) get_parameter('disable_agent'); @@ -99,7 +99,7 @@ if ($agent_to_delete) { ui_print_result_message($result, __('Success deleted agent.'), __('Could not be deleted.')); if (enterprise_installed()) { - // Check if the remote config file still exist + // Check if the remote config file still exist. if (isset($config['remote_config'])) { enterprise_include_once('include/functions_config_agents.php'); if (enterprise_hook('config_agents_has_remote_configuration', [$id_agente])) { @@ -114,7 +114,7 @@ if ($enable_agent) { $alias = agents_get_alias($enable_agent); if ($result) { - // Update the agent from the metaconsole cache + // Update the agent from the metaconsole cache. enterprise_include_once('include/functions_agents.php'); $values = ['disabled' => 0]; enterprise_hook('agent_update_from_cache', [$enable_agent, $values, $server_name]); @@ -136,7 +136,7 @@ if ($disable_agent) { $alias = agents_get_alias($disable_agent); if ($result) { - // Update the agent from the metaconsole cache + // Update the agent from the metaconsole cache. enterprise_include_once('include/functions_agents.php'); $values = ['disabled' => 1]; enterprise_hook('agent_update_from_cache', [$disable_agent, $values, $server_name]); @@ -223,6 +223,10 @@ switch ($config['dbtype']) { case 'oracle': $order_collation = ''; break; + + default: + // Default. + break; } $selected = true; @@ -252,6 +256,10 @@ switch ($sortField) { 'order' => 'DESC', ]; break; + + default: + // Default. + break; } break; @@ -274,6 +282,10 @@ switch ($sortField) { 'order' => 'DESC', ]; break; + + default: + // Default. + break; } break; @@ -296,6 +308,10 @@ switch ($sortField) { 'order' => 'DESC', ]; break; + + default: + // Default. + break; } break; @@ -318,6 +334,10 @@ switch ($sortField) { 'order' => 'DESC', ]; break; + + default: + // Default. + break; } break; @@ -378,7 +398,7 @@ if ($os != 0) { } $user_groups_to_sql = ''; -// Show only selected groups +// Show only selected groups. if ($ag_group > 0) { $ag_groups = []; $ag_groups = (array) $ag_group; @@ -388,7 +408,7 @@ if ($ag_group > 0) { $user_groups_to_sql = implode(',', $ag_groups); } else { - // Concatenate AW and AD permisions to get all the possible groups where the user can manage + // Concatenate AW and AD permisions to get all the possible groups where the user can manage. $user_groupsAW = users_get_groups($config['id_user'], 'AW'); $user_groupsAD = users_get_groups($config['id_user'], 'AD'); @@ -431,24 +451,25 @@ $sql = sprintf( $agents = db_get_all_rows_sql($sql); -// Delete rnum row generated by oracle_recode_query() function +// Delete rnum row generated by oracle_recode_query() function. if (($config['dbtype'] == 'oracle') && ($agents !== false)) { for ($i = 0; $i < count($agents); $i++) { unset($agents[$i]['rnum']); } } -// Prepare pagination +// Prepare pagination. ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&recursion=$recursion&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset); if ($agents !== false) { // Urls to sort the table. - // Agent name size and description for Chinese and Japanese languages ​​are adjusted - $agent_font_size = '7'; - $description_font_size = '6.5'; - if ($config['language'] == 'ja' || $config['language'] == 'zh_CN' || $own_info['language'] == 'ja' || $own_info['language'] == 'zh_CN') { - $agent_font_size = '15'; - $description_font_size = '11'; + if ($config['language'] == 'ja' + || $config['language'] == 'zh_CN' + || $own_info['language'] == 'ja' + || $own_info['language'] == 'zh_CN' + ) { + // Adds a custom font size for Japanese and Chinese language. + $custom_font_size = 'custom_font_size'; } $url_up_agente = 'index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search.'&os='.$os.'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled'; @@ -476,21 +497,21 @@ if ($agents !== false) { $rowPair = true; $iterator = 0; foreach ($agents as $agent) { - // Begin Update tagente.remote 0/1 with remote agent function return + // Begin Update tagente.remote 0/1 with remote agent function return. if (enterprise_hook('config_agents_has_remote_configuration', [$agent['id_agente']])) { db_process_sql_update('tagente', ['remote' => 1], 'id_agente = '.$agent['id_agente'].''); } else { db_process_sql_update('tagente', ['remote' => 0], 'id_agente = '.$agent['id_agente'].''); } - // End Update tagente.remote 0/1 with remote agent function return + // End Update tagente.remote 0/1 with remote agent function return. $all_groups = agents_get_all_groups_agent($agent['id_agente'], $agent['id_grupo']); $check_aw = check_acl_one_of_groups($config['id_user'], $all_groups, 'AW'); $check_ad = check_acl_one_of_groups($config['id_user'], $all_groups, 'AD'); $cluster = db_get_row_sql('select id from tcluster where id_agent = '.$agent['id_agente']); - // Do not show the agent if there is not enough permissions + // Do not show the agent if there is not enough permissions. if (!$check_aw && !$check_ad) { continue; } @@ -512,7 +533,7 @@ if ($agents !== false) { $rowPair = !$rowPair; $iterator++; - // Agent name + // Agent name. echo ""; if ($agent['disabled']) { echo ''; @@ -537,7 +558,7 @@ if ($agents !== false) { } else { echo '".''.$agent['alias'].''.''; + id_agente=".$agent['id_agente']."'>".''.$agent['alias'].''.''; } echo ''; @@ -617,12 +638,12 @@ if ($agents !== false) { echo ''; - // Operating System icon + // Operating System icon. echo ""; ui_print_os_icon($agent['id_os'], false); echo ''; - // Type agent (Networt, Software or Satellite) + // Type agent (Networt, Software or Satellite). echo ""; echo ui_print_type_agent_icon( $agent['id_os'], @@ -634,10 +655,12 @@ if ($agents !== false) { echo ''; - // Group icon and name + // Group icon and name. echo "".ui_print_group_icon($agent['id_grupo'], true).''; - // Description - echo "".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[…]', 'font-size: '.$description_font_size.'pt;').''; + + // Description. + echo "".ui_print_truncate_text($agent['comentarios'], 'description', true, true, true, '[…]').''; + // Action // When there is only one element in page it's necesary go back page. if ((count($agents) == 1) && ($offset >= $config['block_size'])) { @@ -695,7 +718,7 @@ if ($agents !== false) { } if (check_acl($config['id_user'], 0, 'AW')) { - // Create agent button + // Create agent button. echo '
    '; echo '
    '; html_print_input_hidden('new_agent', 1); diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index c97fe2feff..545ceefa35 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -184,9 +184,11 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { } ui_require_css_file('cluetip', 'include/styles/js/'); + ui_require_jquery_file('validate'); ui_require_jquery_file('cluetip'); ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('bgiframe'); + ?>