diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c3fabd1a35..5570e25e2c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.770-230411 +Version: 7.0NG.770-230412 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 b7fe20c0f4..1edee92725 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.770-230411" +pandora_version="7.0NG.770-230412" 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 85023e76f8..b164b69d5a 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.770'; -use constant AGENT_BUILD => '230411'; +use constant AGENT_BUILD => '230412'; # 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 d541b28c16..8efb003cf0 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230411 +%define release 230412 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 44020453ef..503342fb30 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230411 +%define release 230412 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 eff3784e25..72156e0aa2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230411" +PI_BUILD="230412" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4e10bb519b..73e35fd598 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230411} +{230412} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b1b2ed4f6d..a82756542c 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.770 Build 230411") +#define PANDORA_VERSION ("7.0NG.770 Build 230412") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4a1b832993..36f74189f3 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.770(Build 230411))" + VALUE "ProductVersion", "(7.0NG.770(Build 230412))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6863b260b6..5f17b71e4d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.770-230411 +Version: 7.0NG.770-230412 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 6162c7ce85..f04a8894df 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.770-230411" +pandora_version="7.0NG.770-230412" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 02dbd4c600..3cb5ce9787 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -1184,6 +1184,11 @@ html_print_div( } }); + var show_dialog_create = ""; + if (show_dialog_create !== '0'){ + $('#button-create_module').click(); + } + }); diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 9b22483f5c..425bcbf6b7 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -227,7 +227,7 @@ if (is_ajax()) { 'field'.$i.'_value', 'text/plain', '', - $content_type == 'text/plain', + '', $is_management_allowed, '', '', @@ -239,7 +239,7 @@ if (is_ajax()) { 'field'.$i.'_value', 'text/html', '', - $content_type == 'text/html', + 'text/html', $is_management_allowed, '', '', diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index de5d93a082..0ef5392798 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -712,7 +712,6 @@ $(document).ready (function () { old_recovery_value = $("[name=field" + i + "_recovery_value]").val(); } - // Replace the old column with the new $table_macros_field.replaceWith(field_row); if (old_value != '' || old_recovery_value != '') { @@ -720,12 +719,14 @@ $(document).ready (function () { if (inputType == 'radio') { if(old_value == 'text/plain'){ if ($("[name=field" + i + "_value]").val() == 'text/plain') { - $("[name=field" + i + "_value]").attr('checked','checked'); + $("[name=field" + i + "_value][value='text/plain']").attr('checked','checked'); + $("[name=field" + i + "_value][value='text/html']").removeAttr("checked") } } else{ - if($("[name=field" + i + "_value]").val() == 'text/html') { - $("[name=field" + i + "_value]").attr('checked','checked'); + $("[name=field" + i + "_value]").val() + if ($("[name=field" + i + "_value]").val() == 'text/html') { + $("[name=field" + i + "_value][value='text/html']").attr('checked','checked'); } } if(old_recovery_value == 'text/plain'){ diff --git a/pandora_console/godmode/groups/configure_group.php b/pandora_console/godmode/groups/configure_group.php index 8d81d44540..88966378de 100644 --- a/pandora_console/godmode/groups/configure_group.php +++ b/pandora_console/godmode/groups/configure_group.php @@ -120,6 +120,16 @@ if (is_metaconsole() === true) { // Data before table. $files = list_files(((is_metaconsole() === true) ? '../../' : '').'images/', '@groups.svg', 1, 0); +$files_old = list_files('images/groups_small/', 'png', 1, 0); +foreach ($files_old as $key => $f) { + // Remove from the list the non-desired .png files. + if (strpos($f, '.bad.png') !== false || strpos($f, '.default.png') !== false || strpos($f, '.ok.png') !== false || strpos($f, '.warning.png') !== false) { + unset($files_old[$key]); + } +} + +$files = array_merge($files, $files_old); + $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filter-table-adv'; @@ -133,10 +143,19 @@ $table->data[0][0] = html_print_label_input_block( html_print_input_text('name', $name, '', 35, 100, true) ); +$extension = pathinfo($icon, PATHINFO_EXTENSION); +if (empty($extension) === true) { + $icon .= '.png'; +} + $input_icon = html_print_select($files, 'icon', $icon, '', 'None', '', true, false, true, '', false, 'width: 100%;'); $input_icon .= ' '; if (empty($icon) === false) { - $input_icon .= html_print_image('images/'.$icon, true); + if (empty($extension) === true || $extension === 'png') { + $input_icon .= html_print_image('images/groups_small/'.$icon, true); + } else { + $input_icon .= html_print_image('images/'.$icon, true); + } } $input_icon .= ''; @@ -304,12 +323,17 @@ echo ''; function icon_changed () { var inputs = []; var data = this.value; + var extension = data.split('.').pop(); $('#icon_preview').fadeOut ('normal', function () { $('#icon_preview').empty (); if (data != "") { var params = []; params.push("get_image_path=1"); - params.push("img_src=images/" + data); + if (extension === 'png') { + params.push("img_src=images/groups_small/" + data); + } else { + params.push("img_src=images/" + data); + } params.push("page=include/ajax/skins.ajax"); params.push("only_src=1"); jQuery.ajax ({ diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index cbe9cf51f0..4647231927 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -920,8 +920,19 @@ if ($tab == 'tree') { } if ($group['icon'] != '') { + $extension = pathinfo($group['icon'], PATHINFO_EXTENSION); + if (empty($extension) === true) { + $group['icon'] .= '.png'; + } + + if (empty($extension) === true || $extension === 'png') { + $path = 'images/groups_small/'.$group['icon']; + } else { + $path = 'images/'.$group['icon']; + } + $table->data[$key][2] = html_print_image( - 'images/'.$group['icon'], + $path, true, [ 'style' => '', diff --git a/pandora_console/godmode/setup/os.builder.php b/pandora_console/godmode/setup/os.builder.php index 4c79ae4c07..5f394b9fbe 100644 --- a/pandora_console/godmode/setup/os.builder.php +++ b/pandora_console/godmode/setup/os.builder.php @@ -116,6 +116,22 @@ function get_list_os_icons_dir() } } + $items2 = scandir($config['homedir'].'/images/os_icons'); + + foreach ($items2 as $item2) { + if (strstr($item2, '_small.png') || strstr($item2, '_small.gif') + || strstr($item2, '_small.jpg') + ) { + continue; + } + + if (strstr($item2, '.png') || strstr($item2, '.gif') + || strstr($item2, '.jpg') + ) { + $return[$item2] = $item2; + } + } + return $return; } @@ -124,10 +140,15 @@ function get_list_os_icons_dir()