Date: Tue, 6 Apr 2021 01:02:48 +0200
Subject: [PATCH 32/44] Auto-updated build strings.
---
pandora_agents/unix/DEBIAN/control | 2 +-
pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +-
pandora_agents/unix/pandora_agent | 2 +-
pandora_agents/unix/pandora_agent.redhat.spec | 2 +-
pandora_agents/unix/pandora_agent.spec | 2 +-
pandora_agents/unix/pandora_agent_installer | 2 +-
pandora_agents/win32/installer/pandora.mpi | 2 +-
pandora_agents/win32/pandora.cc | 2 +-
pandora_agents/win32/versioninfo.rc | 2 +-
pandora_console/DEBIAN/control | 2 +-
pandora_console/DEBIAN/make_deb_package.sh | 2 +-
pandora_console/include/config_process.php | 2 +-
pandora_console/install.php | 2 +-
pandora_console/pandora_console.redhat.spec | 2 +-
pandora_console/pandora_console.rhel7.spec | 2 +-
pandora_console/pandora_console.spec | 2 +-
pandora_server/DEBIAN/control | 2 +-
pandora_server/DEBIAN/make_deb_package.sh | 2 +-
pandora_server/lib/PandoraFMS/Config.pm | 2 +-
pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +-
pandora_server/pandora_server.redhat.spec | 2 +-
pandora_server/pandora_server.spec | 2 +-
pandora_server/pandora_server_installer | 2 +-
pandora_server/util/pandora_db.pl | 2 +-
pandora_server/util/pandora_manage.pl | 2 +-
25 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 7fd2f37789..dcf79622a6 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.753-210405
+Version: 7.0NG.753-210406
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 668f5c79aa..26417b0bf5 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.753-210405"
+pandora_version="7.0NG.753-210406"
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 7243f885b8..f5afa49715 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1016,7 +1016,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.753';
-use constant AGENT_BUILD => '210405';
+use constant AGENT_BUILD => '210406';
# 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 b2d350599a..c0eeaae6f1 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.753
-%define release 210405
+%define release 210406
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 a7f7f7528f..182a3d23a9 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.753
-%define release 210405
+%define release 210406
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 6283609ee8..f24a1c4b8b 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.753"
-PI_BUILD="210405"
+PI_BUILD="210406"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 3c2bbefbf5..a915f9e388 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{210405}
+{210406}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index e2fb7366a1..3ae4fb5ac7 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.753(Build 210405)")
+#define PANDORA_VERSION ("7.0NG.753(Build 210406)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 218fd291d6..8b68d53ead 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.753(Build 210405))"
+ VALUE "ProductVersion", "(7.0NG.753(Build 210406))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 29642e88f2..833854a2ee 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.753-210405
+Version: 7.0NG.753-210406
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 ca32bd2475..261acf026b 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.753-210405"
+pandora_version="7.0NG.753-210406"
package_pear=0
package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 1f92250e35..a94ffa0fbd 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 = 'PC210405';
+$build_version = 'PC210406';
$pandora_version = 'v7.0NG.753';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index a91597bef7..f91e264aaa 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
[ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index f3f107491f..3817169e79 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.753
-%define release 210405
+%define release 210406
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 74a7062fed..23dfa0fdf4 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.753
-%define release 210405
+%define release 210406
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 4883322442..524ca97c04 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.753"
-PI_BUILD="210405"
+PI_BUILD="210406"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 3eed49b947..af71f3b955 100755
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
-my $version = "7.0NG.753 PS210405";
+my $version = "7.0NG.753 PS210406";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index d8da44b218..1eefa0ad02 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
-my $version = "7.0NG.753 PS210405";
+my $version = "7.0NG.753 PS210406";
# save program name for logging
my $progname = basename($0);
From 4b9f8ce2026ccae9f1599073a1571a644b330a7f Mon Sep 17 00:00:00 2001
From: Luis
Date: Tue, 6 Apr 2021 16:51:14 +0000
Subject: [PATCH 33/44] Added custom fields combo larger params
---
pandora_console/extras/mr/46.sql | 6 +
.../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +-
.../godmode/agentes/agent_manager.php | 31 ++--
.../godmode/agentes/configure_field.php | 12 +-
.../godmode/massive/massive_edit_agents.php | 29 ++-
pandora_console/include/functions_html.php | 166 ++++++++++++++++++
pandora_console/pandoradb.sql | 2 +-
7 files changed, 204 insertions(+), 44 deletions(-)
create mode 100644 pandora_console/extras/mr/46.sql
diff --git a/pandora_console/extras/mr/46.sql b/pandora_console/extras/mr/46.sql
new file mode 100644
index 0000000000..63e0bf5843
--- /dev/null
+++ b/pandora_console/extras/mr/46.sql
@@ -0,0 +1,6 @@
+START TRANSACTION;
+
+ALTER TABLE `tagent_custom_fields` MODIFY COLUMN `combo_values` TEXT NOT NULL DEFAULT '';
+
+
+COMMIT;
\ No newline at end of file
diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
index a72fffdc53..7945e60204 100644
--- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
+++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql
@@ -2519,7 +2519,7 @@ INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Di
-- ----------------------------------------------------------------------
-- Add column in table `tagent_custom_fields`
-- ----------------------------------------------------------------------
-ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT '';
+ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` TEXT NOT NULL DEFAULT '';
-- ----------------------------------------------------------------------
-- Add column in table `tnetflow_filter`
diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php
index 326dde3207..bc8d247994 100644
--- a/pandora_console/godmode/agentes/agent_manager.php
+++ b/pandora_console/godmode/agentes/agent_manager.php
@@ -931,24 +931,19 @@ foreach ($fields as $field) {
}
if ($field['combo_values'] !== '') {
- $data_field[1] = html_print_select(
- $combo_values,
- 'customvalue_'.$field['id_field'],
- $custom_value,
- '',
- __('None'),
- '',
- true,
- false,
- false,
- '',
- false,
- false,
- false,
- false,
- false,
- '',
- false
+ $data_field[1] = html_print_input(
+ [
+ 'type' => 'select_search',
+ 'fields' => $combo_values,
+ 'name' => 'customvalue_'.$field['id_field'],
+ 'selected' => $custom_value,
+ 'nothing' => __('None'),
+ 'nothing_value' => '',
+ 'return' => true,
+ 'sort' => false,
+ 'size' => '400px',
+ 'dropdownAutoWidth' => true,
+ ]
);
};
diff --git a/pandora_console/godmode/agentes/configure_field.php b/pandora_console/godmode/agentes/configure_field.php
index 4a6b086d63..0f7a42820a 100755
--- a/pandora_console/godmode/agentes/configure_field.php
+++ b/pandora_console/godmode/agentes/configure_field.php
@@ -33,7 +33,7 @@ if ($id_field) {
$name = $field['name'];
$display_on_front = $field['display_on_front'];
$is_password_type = $field['is_password_type'];
- $combo_values = $field['combo_values'];
+ $combo_values = $field['combo_values'] ? $field['combo_values'] : '';
$is_combo_enable = $config['is_combo_enable'];
ui_print_page_header(__('Update agent custom field'), 'images/custom_field.png', false, '', true, '');
} else {
@@ -116,12 +116,12 @@ $table->data[4][0] = __('Combo values').ui_print_help_tip(
__('Set values separated by comma'),
true
);
-$table->data[4][1] = html_print_input_text(
+$table->data[4][1] = html_print_textarea(
'combo_values',
+ 3,
+ 65,
io_safe_output($combo_values),
'',
- 35,
- 200,
true
);
@@ -144,7 +144,7 @@ echo '';
+
+
Date: Tue, 6 Apr 2021 16:58:05 +0000
Subject: [PATCH 34/44] remove entities when add comment
---
pandora_console/include/functions_events.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php
index e7f9c993b1..68e23b2a63 100644
--- a/pandora_console/include/functions_events.php
+++ b/pandora_console/include/functions_events.php
@@ -5152,7 +5152,8 @@ function events_page_comments($event, $ajax=false)
$childrens_ids
))) && $config['show_events_in_local'] == false || $config['event_replication'] == false
) {
- $comments_form = '