diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bf87ecfac8..b1da43b1b4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.756-210823 +Version: 7.0NG.756-210824 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 1e7aec2cfb..a504951e4c 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.756-210823" +pandora_version="7.0NG.756-210824" 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 73a8e61765..34e6f710b4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.756'; -use constant AGENT_BUILD => '210823'; +use constant AGENT_BUILD => '210824'; # 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 04bdfb6b85..cf8ed4daec 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.756 -%define release 210823 +%define release 210824 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 52efdc12ae..991d233fc5 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.756 -%define release 210823 +%define release 210824 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 bb0123a937..2c737c0853 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.756" -PI_BUILD="210823" +PI_BUILD="210824" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fed2593095..c33636d06b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{210823} +{210824} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 46a5d9f947..cdab56e860 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.756 Build 210823") +#define PANDORA_VERSION ("7.0NG.756 Build 210824") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e4d8fc69f0..5eba58c33e 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.756(Build 210823))" + VALUE "ProductVersion", "(7.0NG.756(Build 210824))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6cfbe81712..c66e4e577f 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.756-210823 +Version: 7.0NG.756-210824 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 a1e0a5c0f9..0a0b4d87a4 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.756-210823" +pandora_version="7.0NG.756-210824" package_pear=0 package_pandora=1 diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 057f9f4b8a..1462c717d7 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -38,7 +38,7 @@ if (isset($config['id_user']) === false) { $(document).ready(function(){ var menuType_value = ""; - if (menuType_value === 'classic') { + if (menuType_value === '' || menuType_value === 'classic') { $('ul.submenu').css('left', '214px'); } else{ diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index bffe894931..433a2c45e3 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -5159,7 +5159,6 @@ function addSLARow() { $("input[name=id_agent_failover]").val(''); $("input[name=id_server]").val(''); $("input[name=agent_sla]").val(''); - $("input[name=agent_sla]").css("background","url('') right center no-repeat") $("input[name=agent_failover]").val(''); $("#id_agent_module_sla").empty(); $("#id_agent_module_sla").attr('disabled', 'true'); diff --git a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php index 7030d60189..a3eca5e9a7 100644 --- a/pandora_console/godmode/um_client/lib/UpdateManager/Client.php +++ b/pandora_console/godmode/um_client/lib/UpdateManager/Client.php @@ -666,6 +666,7 @@ class Client $target = __('console update %d', $request['version']); } + // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.Found curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, diff --git a/pandora_console/godmode/users/profile_list.php b/pandora_console/godmode/users/profile_list.php index f21c38b561..c85ec25a27 100644 --- a/pandora_console/godmode/users/profile_list.php +++ b/pandora_console/godmode/users/profile_list.php @@ -100,7 +100,7 @@ $update_profile = (bool) get_parameter('update_profile'); $id_profile = (int) get_parameter('id'); $is_management_allowed = true; -if (is_management_allowed() === false) { +if (is_metaconsole() === false && is_management_allowed() === false) { $is_management_allowed = false; ui_print_warning_message( __( diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index fadb9f13f4..fc4564e0e8 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -129,7 +129,7 @@ switch ($sortField) { break; default: - // Not possible. + // Nothing to do. break; } break; @@ -153,7 +153,7 @@ switch ($sortField) { break; default: - // Not possible. + // Nothing to do. break; } break; @@ -177,7 +177,7 @@ switch ($sortField) { break; default: - // Not possible. + // Nothing to do. break; } break; @@ -395,7 +395,7 @@ $table->data[0][4] = html_print_submit_button( ); $is_management_allowed = true; -if (is_management_allowed() === false) { +if (is_metaconsole() === false && is_management_allowed() === false) { $is_management_allowed = false; ui_print_warning_message( __( @@ -585,11 +585,11 @@ foreach ($info as $user_id => $user_info) { $cont++; // Manual pagination due the complicated process of the ACL data. - if ($cont <= $offset) { + if ($cont <= $offset && $search !== true) { continue; } - if ($cont > ($limit + $offset)) { + if ($cont > ($limit + $offset) && $search !== true) { break; } @@ -820,6 +820,9 @@ foreach ($info as $user_id => $user_info) { $data[6] .= ''; // Delete button not in this mode. } + } else { + $data[6] .= ''; + // Delete button not in this mode. } } diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index 6e9f30c07b..e099df93a4 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -2359,12 +2359,17 @@ class ConsoleSupervisor $message_conf_cron .= __('Please, make sure process is not locked.'); } + $url = '__url__/index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist'; + if (is_metaconsole() === true) { + $url = '__url__index.php?sec=extensions&sec2=enterprise/extensions/cron'; + } + $this->notify( [ 'type' => 'NOTIF.CRON.CONFIGURED', 'title' => __('DiscoveryConsoleTasks is not configured.'), 'message' => __($message_conf_cron), - 'url' => '__url__/index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist', + 'url' => $url, ] ); } else { diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3768f897ba..5fb64b6fa7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC210823'; +$build_version = 'PC210824'; $pandora_version = 'v7.0NG.756'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 30d562aa71..28c52a9fd4 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -2559,12 +2559,19 @@ function reporting_html_last_value($table, $item, $pdf=0) 'Y-m-d H:i:s', $item['data']['utimestamp'] ); - $table_data->data[1][2] = remove_right_zeros( - number_format( - $item['data']['datos'], - $config['graph_precision'] - ) - ); + + if (is_numeric($item['data']['datos']) === true) { + $dataDatos = remove_right_zeros( + number_format( + $item['data']['datos'], + $config['graph_precision'] + ) + ); + } else { + $dataDatos = trim($item['data']['datos']); + } + + $table_data->data[1][2] = $dataDatos; switch ($item['data']['estado']) { case AGENT_MODULE_STATUS_CRITICAL_BAD: diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index db1b5f9c33..7ae033dca7 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4438,19 +4438,27 @@ function ui_print_standard_header( true ); // Create the header. - $output = ui_print_page_header( - $title, - $icon, - true, - $help, - $godmode, - $options, - false, - '', - GENERIC_SIZE_TEXT, - '', - $headerInformation->printHeader(true) - ); + if (is_metaconsole() === true) { + $output = ui_meta_print_header( + $title, + false, + $options + ); + } else { + $output = ui_print_page_header( + $title, + $icon, + true, + $help, + $godmode, + $options, + false, + '', + GENERIC_SIZE_TEXT, + '', + $headerInformation->printHeader(true) + ); + } if ($return !== true) { echo $output; diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_value.php b/pandora_console/include/lib/Dashboard/Widgets/module_value.php index 3f280129fe..b005863b24 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/module_value.php +++ b/pandora_console/include/lib/Dashboard/Widgets/module_value.php @@ -396,9 +396,20 @@ class ModuleValueWidget extends Widget $output .= '
'; // Div value. $output .= '
'; - $output .= remove_right_zeros( - number_format($data_module, $config['graph_precision']) - ); + + if (is_numeric($data_module) === true) { + $dataDatos = remove_right_zeros( + number_format( + $data_module, + $config['graph_precision'] + ) + ); + } else { + $dataDatos = trim($data_module); + } + + $output .= $dataDatos; + $output .= '
'; if (empty($label) === false) { diff --git a/pandora_console/include/styles/notifications.css b/pandora_console/include/styles/notifications.css new file mode 100644 index 0000000000..3eb2e0534a --- /dev/null +++ b/pandora_console/include/styles/notifications.css @@ -0,0 +1,178 @@ +/* + * --------------------------------------------------------------------- + * - Notifications + * --------------------------------------------------------------------- + */ + +#meta_total_container #header_discovery { + padding-left: 10px; +} + +.notification-ball { + border-radius: 50%; + width: 24px; + height: 24px; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + color: #fff; + font-weight: bold; +} + +.notification-ball.notification-ball-new-messages:hover { + box-shadow: 0 0 3px #888; +} + +.notification-ball-no-messages { + background-color: #82b92e; + cursor: pointer; +} +.notification-ball-new-messages { + background-color: #e63c52; +} + +#notification-wrapper { + background: white; + border: #a5a5a5 solid 1px; + z-index: 900000; + position: absolute; + width: 550px; + margin-top: -5px; + border-radius: 5px; +} +#notification-wrapper::before { + content: ""; + display: block; + position: absolute; + width: 0px; + height: 0; + border-color: transparent; + border-width: 12px; + border-style: solid; + bottom: 100%; + left: calc(58% - 7px); + margin-left: -12px; + border-bottom-color: white; +} +#notification-wrapper-inner { + max-height: 400px; + overflow: auto; +} +#notification-wrapper-shadow { + height: 100%; + width: 100%; + background: #111; + position: fixed; + z-index: 9009; + top: 0; + opacity: 0.3; +} +.notification-item { + background: whitesmoke; + height: 100px; + margin: 7px; + border: #e4e4e4 solid 1px; + display: flex; + flex-flow: row nowrap; + align-items: center; + padding: 5px; +} +.notification-item:hover { + border: #ccc solid 1px; + text-decoration: none; +} +.notification-item > * { + padding-left: 15px; + pointer-events: none; +} +.notification-item > img { + width: 75px; +} + +.notification-info { + width: 87%; + display: flex; + flex-flow: column nowrap; + overflow: hidden; + max-height: 83px; + line-height: 1.4em; +} +.notification-item img { + max-width: 100%; + max-height: 100%; +} +.notification-title { + margin: 0; +} + +h4.notification-title { + font-size: 13px; + color: #3f3f3f; + text-transform: none; +} + +.notification-subtitle, +.color-black-grey { + color: #373737; +} + +.global-config-notification-title { + display: flex; + flex-direction: row; + align-items: center; +} + +.global-config-notification-title h2 { + margin-left: 10px; +} + +.global-config-notification-checkboxes :first-child { + font-weight: bold; +} + +.global-config-notification-selectors { + display: flex; + flex-direction: row; + margin-bottom: 10px; +} + +.global-config-notification-selectors h4 { + margin: 0; +} + +.global-config-notification-single-selector, +.global_config_notifications_dialog_add select { + display: flex; + width: 100%; + padding: 0 10px; +} + +.global-config-notification-single-selector :first-child, +.global-config-notification-single-selector :first-child select { + width: 99%; +} + +.global-config-notification-single-selector :last-child, +.global_config_notifications_dialog_add_wrapper { + flex-direction: column; + display: flex; + justify-content: flex-end; +} + +.global_config_notifications_dialog_add { + display: flex; + flex-direction: row; + margin: 8px; +} + +.global_config_notifications_two_ways_form_arrows { + display: flex; + flex-flow: column; + justify-content: center; + margin: 0 5px; +} + +.global_config_notifications_two_ways_form_arrows img { + margin: 15px 0; +} diff --git a/pandora_console/install.php b/pandora_console/install.php index e585680891..d381a1be53 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
'; echo $jsOutput; +if (is_metaconsole() === true) { + enterprise_hook('close_meta_frame'); +} diff --git a/pandora_console/operation/messages/message_list.php b/pandora_console/operation/messages/message_list.php index fe96a811a5..a55dd28d87 100644 --- a/pandora_console/operation/messages/message_list.php +++ b/pandora_console/operation/messages/message_list.php @@ -27,10 +27,10 @@ */ // Begin. -require_once 'include/functions_messages.php'; - global $config; +require_once $config['homedir'].'/include/functions_messages.php'; + $delete_msg = get_parameter('delete_message', 0); $multiple_delete = get_parameter('multiple_delete', 0); $show_sent = (bool) get_parameter('show_sent', false); @@ -68,6 +68,10 @@ $buttons['create_message'] = [ ]; if (is_ajax() === false) { + if (is_metaconsole() === true) { + enterprise_hook('open_meta_frame'); + } + // Header. ui_print_standard_header( $tabSelectedMessage, @@ -300,6 +304,10 @@ echo "
"; html_print_submit_button(__('Create message'), 'create', false, 'class="sub next mrgn_right_5px"'); echo ''; echo '
'; + +if (is_ajax() !== true && is_metaconsole() === true) { + enterprise_hook('close_meta_frame'); +} ?>