> $LOGFILE
+
+# Configure websocket to be started at start.
+systemctl enable pandora_websocket_engine &>> $LOGFILE
+
+# Enable pandora ha service
+systemctl enable pandora_server --now &>> $LOGFILE
+execute_cmd "systemctl start pandora_server" "Starting Pandora FMS Server"
+
+# starting tentacle server
+systemctl enable tentacle_serverd &>> $LOGFILE
+execute_cmd "service tentacle_serverd start" "Starting Tentacle Server"
+
+# Enabling condole cron
+execute_cmd "echo \"* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log\" >> /etc/crontab" "Enabling Pandora FMS Console cron"
+echo "* * * * * root wget -q -O - --no-check-certificate http://127.0.0.1/pandora_console/enterprise/cron.php >> $PANDORA_CONSOLE/log/cron.log" >> /etc/crontab
+## Enabling agent
+systemctl enable pandora_agent_daemon &>> $LOGFILE
+execute_cmd "systemctl start pandora_agent_daemon" "starting Pandora FMS Agent"
+
+execute_cmd "echo done" "Pandora FMS Community installed"
+cd
+execute_cmd "rm -rf $HOME/pandora_deploy_tmp" "Removing temporary files"
+
+GREEN='\033[01;32m'
+NONE='\033[0m'
+
+[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)
+printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server"
+ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use this credentials to login in the console "g"[ User: admin / Password: pandora ]"n" \n"}'
\ No newline at end of file
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index facda2ea16..4184fa468b 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.752-210127
+Version: 7.0NG.752-210128
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 c1d6de00af..e0a33a305b 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.752-210127"
+pandora_version="7.0NG.752-210128"
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 639cb8ce72..0b11f9a048 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.752';
-use constant AGENT_BUILD => '210127';
+use constant AGENT_BUILD => '210128';
# 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 4fc92c76c6..68c3eb64b9 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.752
-%define release 210127
+%define release 210128
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 feab1f5747..6c68ea6850 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.752
-%define release 210127
+%define release 210128
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 7f990b0b0e..09b1c04fa4 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.752"
-PI_BUILD="210127"
+PI_BUILD="210128"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 9bb75c8323..d342954307 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{210127}
+{210128}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 6d765916c4..b66e7ca954 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.752(Build 210127)")
+#define PANDORA_VERSION ("7.0NG.752(Build 210128)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 1dea94f568..e1fdffe78f 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.752(Build 210127))"
+ VALUE "ProductVersion", "(7.0NG.752(Build 210128))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 38a661ab1a..18e827f7fc 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.752-210127
+Version: 7.0NG.752-210128
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 77701707b9..4cd781a928 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.752-210127"
+pandora_version="7.0NG.752-210128"
package_pear=0
package_pandora=1
diff --git a/pandora_console/extras/delete_files/delete_files.txt b/pandora_console/extras/delete_files/delete_files.txt
index d18163093d..32cc7ab12e 100644
--- a/pandora_console/extras/delete_files/delete_files.txt
+++ b/pandora_console/extras/delete_files/delete_files.txt
@@ -1,5 +1,6 @@
operation/servers/recon_view.php
operation/users/webchat.php
+operation/events/event_statistics.php
include/javascript/webchat.js
attachment/pandora_chat.log.json.txt
attachment/pandora_chat.user_list.json.txt
@@ -69,6 +70,8 @@ enterprise/extensions/ipam/include/javascript/IpamMapController.js
enterprise/extensions/ipam/ipam_action.php
enterprise/extensions/ipam.php
enterprise/extensions/ipam
+enterprise/extensions/disabled/visual_console_manager.php
+enterprise/extensions/visual_console_manager.php
include/lib/WSManager.php
include/lib/WebSocketServer.php
-include/lib/WebSocketUser.php
\ No newline at end of file
+include/lib/WebSocketUser.php
diff --git a/pandora_console/extras/mr/44.sql b/pandora_console/extras/mr/44.sql
index c2f7676195..aaa2202e56 100644
--- a/pandora_console/extras/mr/44.sql
+++ b/pandora_console/extras/mr/44.sql
@@ -135,6 +135,21 @@ UPDATE `trecon_script` SET `description`='Specific Pandora FMS In
ALTER TABLE `trecon_task` MODIFY COLUMN `review_mode` TINYINT(1) UNSIGNED DEFAULT 1;
+DELETE FROM `tuser_task` WHERE id = 6;
+
+UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in path
";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3;
+
+UPDATE `tuser_task_scheduled` SET
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"PDF";s:15:"first_execution"')
+ WHERE `id_user_task` = 3;
+
+UPDATE `tuser_task_scheduled` SET
+ `id_user_task` = 3,
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"')
+ WHERE `id_user_task` = 6;
+
ALTER TABLE `ttag` MODIFY COLUMN `name` text NOT NULL default '';
COMMIT;
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 8c204943db..2131b619a4 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
@@ -2526,6 +2526,20 @@ ALTER TABLE `tnetflow_filter` MODIFY COLUMN `router_ip` text NOT NULL;
-- ----------------------------------------------------------------------
UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report";
INSERT IGNORE INTO tuser_task VALUES (8, 'cron_task_generate_csv_log', 'a:1:{i:0;a:2:{s:11:"description";s:14:"Send to e-mail";s:4:"type";s:4:"text";}}', 'Send csv log');
+UPDATE `tuser_task` SET `parameters`='a:4:{i:0;a:6:{s:11:"description";s:28:"Report pending to be created";s:5:"table";s:7:"treport";s:8:"field_id";s:9:"id_report";s:10:"field_name";s:4:"name";s:4:"type";s:3:"int";s:9:"acl_group";s:8:"id_group";}i:1;a:2:{s:11:"description";s:426:"Save to disk in path
";s:4:"type";s:6:"string";}i:2;a:2:{s:11:"description";s:16:"File nane prefix";s:4:"type";s:6:"string";}i:3;a:2:{s:11:"description";s:11:"Report Type";s:4:"type";s:11:"report_type";}}' WHERE `id`=3;
+DELETE FROM `tuser_task` WHERE id = 6;
+
+-- Migrate old tasks
+UPDATE `tuser_task_scheduled` SET
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"PDF";s:15:"first_execution"')
+ WHERE `id_user_task` = 3;
+
+UPDATE `tuser_task_scheduled` SET
+ `id_user_task` = 3,
+ `args` = REPLACE (`args`, 'a:3', 'a:5'),
+ `args`= REPLACE(`args`, 's:15:"first_execution"', 'i:2;s:0:"";i:3;s:3:"XML";s:15:"first_execution"')
+ WHERE `id_user_task` = 6;
-- ----------------------------------------------------------------------
-- ADD message in table 'tnews'
@@ -3969,4 +3983,5 @@ SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM
DELETE FROM `tconfig` WHERE `token` = 'ipam_installed';
-DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';
\ No newline at end of file
+DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';
+
diff --git a/pandora_console/godmode/reporting/map_builder.php b/pandora_console/godmode/reporting/map_builder.php
index 93f809c21b..f93bfc825d 100644
--- a/pandora_console/godmode/reporting/map_builder.php
+++ b/pandora_console/godmode/reporting/map_builder.php
@@ -42,7 +42,6 @@ if (!$is_metaconsole) {
$url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
$url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
$url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
- $url_visual_console_manager = 'index.php?sec=screen&sec2=enterprise/extensions/visual_console_manager';
}
$pure = (int) get_parameter('pure', 0);
diff --git a/pandora_console/godmode/reporting/visual_console_favorite.php b/pandora_console/godmode/reporting/visual_console_favorite.php
index 1dcd7636c5..76e14e5195 100644
--- a/pandora_console/godmode/reporting/visual_console_favorite.php
+++ b/pandora_console/godmode/reporting/visual_console_favorite.php
@@ -41,7 +41,6 @@ if (!$is_metaconsole) {
$url_visual_console_favorite = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_favorite';
$url_visual_console_template = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_template';
$url_visual_console_template_wizard = 'index.php?sec=screen&sec2=screens/screens&action=visualmap_wizard';
- $url_visual_console_manager = 'index.php?sec=screen&sec2=enterprise/extensions/visual_console_manager';
}
$buttons['visual_console'] = [
diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
index 1dfc7063e7..a37a04d6d5 100644
--- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
+++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php
@@ -409,7 +409,7 @@ class DiscoveryTaskList extends HTML
// Status.
$table->headstyle[5] .= 'min-width: 50px; width: 100px;';
// Task type.
- $table->headstyle[6] .= 'min-width: 150px; width: 150px;';
+ $table->headstyle[6] .= 'min-width: 200px; width: 200px;';
// Progress.
$table->headstyle[7] .= 'min-width: 50px; width: 150px;';
// Updated at.
@@ -552,16 +552,26 @@ class DiscoveryTaskList extends HTML
true
);
} else if ($task['review_mode'] == DISCOVERY_STANDARD) {
- if ($task['status'] <= 0
- && empty($task['summary']) === false
- ) {
- $data[5] = __('Done');
- } else if ($task['utimestamp'] == 0
- && empty($task['summary'])
- ) {
- $data[5] = __('Not started');
+ if ($task['type'] == DISCOVERY_APP_VMWARE) {
+ if ($task['status'] <= 0 && $task['utimestamp'] != 0) {
+ $data[5] = __('Done');
+ } else if ($task['status'] > 0) {
+ $data[5] = __('Pending');
+ } else {
+ $data[5] = __('Not started');
+ }
} else {
- $data[5] = __('Pending');
+ if ($task['status'] <= 0
+ && empty($task['summary']) === false
+ ) {
+ $data[5] = __('Done');
+ } else if ($task['utimestamp'] == 0
+ && empty($task['summary'])
+ ) {
+ $data[5] = __('Not started');
+ } else {
+ $data[5] = __('Pending');
+ }
}
} else {
if ($task['status'] <= 0
@@ -1207,12 +1217,15 @@ class DiscoveryTaskList extends HTML
$output = '';
// Header information.
- if ((int) $task['status'] <= 0
- && empty($summary)
- && $task['id_recon_script'] == 0
- ) {
+ if ((int) $task['status'] <= 0 && empty($summary)) {
+ if ($task['type'] == DISCOVERY_APP_VMWARE && $task['utimestamp'] != 0) {
+ $outputMessage = __('Task completed.');
+ } else {
+ $outputMessage = __('This task has never executed');
+ }
+
$output .= ui_print_info_message(
- __('This task has never executed'),
+ $outputMessage,
'',
true
);
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 093cfa0286..dc2ae5fbbe 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 = 'PC210127';
+$build_version = 'PC210128';
$pandora_version = 'v7.0NG.752';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index 97cb856511..55a78f16da 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -1557,23 +1557,14 @@ function config_update_config()
}
if (Config::set(
- 'days_compact',
- get_parameter('history_dbh_days_compact'),
+ 'history_partitions_auto',
+ get_parameter_switch('history_partitions_auto'),
true
) !== true
) {
$error_update[] = __('Historical database days compact');
}
- if (Config::set(
- 'step_compact',
- get_parameter('history_dbh_step_compact'),
- true
- ) !== true
- ) {
- $error_update[] = __('Historical database step compact');
- }
-
if (Config::set(
'event_purge',
get_parameter('history_dbh_events_purge'),
diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php
index abc7d45984..dd51e10cb3 100644
--- a/pandora_console/include/functions_cron.php
+++ b/pandora_console/include/functions_cron.php
@@ -600,42 +600,6 @@ function cron_list_table()
$data[0] = '';
}
- $data[1] = $task['id_usuario'];
- $data[2] = db_get_value(
- 'name',
- 'tuser_task',
- 'id',
- $task['id_user_task']
- );
-
- $args = unserialize($task['args']);
- $report = reports_get_report($args[0]);
-
- // Check ACL in reports_get_report return false.
- if ($report === false) {
- continue;
- }
-
- $path = $args[1];
- $data[2] .= '
- '.__('Report').": ".$report['name'].'';
- $data[2] .= '
- '.__('Path').': '.$path.'';
- break;
-
- case 'cron_task_save_xml_report_to_disk':
- if ($write_perms || $manage_pandora) {
- $data[0] = '';
- $data[0] .= html_print_image(
- 'images/target.png',
- true,
- ['title' => __('Force run')]
- );
- $data[0] .= '';
- } else {
- $data[0] = '';
- }
-
$data[1] = $task['id_usuario'];
$data[2] = db_get_value('name', 'tuser_task', 'id', $task['id_user_task']);
$args = unserialize($task['args']);
@@ -647,9 +611,12 @@ function cron_list_table()
}
$path = $args[1];
+ $report_type = $args[3];
$data[2] .= '
- '.__('Report').": ".$report['name'].'';
$data[2] .= '
- '.__('Path').': '.$path.'';
+ $data[2] .= '
- '.__('Report type').': '.$report_type;
+
break;
case 'cron_task_do_backup':
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 5b57d81870..f02dd8c6ce 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -4127,13 +4127,17 @@ function ui_get_url_refresh($params=false, $relative=true, $add_post=true)
function ui_forced_public_url()
{
global $config;
- $exclusions = preg_split("/[\n\s,]+/", io_safe_output($config['public_url_exclusions']));
+
+ $exclusions = [];
+ if (empty($config['public_url_exclusions']) === false) {
+ $exclusions = preg_split("/[\n\s,]+/", io_safe_output($config['public_url_exclusions']));
+ }
if (in_array($_SERVER['REMOTE_ADDR'], $exclusions)) {
return false;
}
- return (bool) $config['force_public_url'];
+ return isset($config['force_public_url']) && (bool) $config['force_public_url'];
}
diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js
index 392635d370..2e2e29397a 100644
--- a/pandora_console/include/javascript/pandora_ui.js
+++ b/pandora_console/include/javascript/pandora_ui.js
@@ -187,8 +187,7 @@ function load_modal(settings) {
var formdata = new FormData();
if (settings.extradata) {
settings.extradata.forEach(function(item) {
- if (item.value != undefined)
- formdata.append(item.name, item.value);
+ if (item.value != undefined) formdata.append(item.name, item.value);
});
}
formdata.append("page", settings.onsubmit.page);
@@ -215,7 +214,7 @@ function load_modal(settings) {
}
});
$(this).tooltip("open");
-
+
var element = $(this);
setTimeout(
function(element) {
@@ -282,8 +281,8 @@ function load_modal(settings) {
data: formdata,
dataType: settings.onsubmit.dataType,
success: function(data) {
- console.log("successsssssssssssss");
- console.log(data);
+ console.log("successsssssssssssss");
+ console.log(data);
if (settings.ajax_callback != undefined) {
if (settings.idMsgCallback != undefined) {
settings.ajax_callback(data, settings.idMsgCallback);
@@ -304,17 +303,20 @@ function load_modal(settings) {
document.getElementById(settings.form).submit();
}
}
- }
+ };
required_buttons.push({
class:
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
text: settings.modal.ok,
click: function() {
- if (settings.onsubmit != undefined && settings.onsubmit.onConfirmSubmit != undefined) {
- settings.onsubmit.onConfirmSubmit(btnClickHandler, $(this));
+ if (
+ settings.onsubmit != undefined &&
+ settings.onsubmit.onConfirmSubmit != undefined
+ ) {
+ settings.onsubmit.onConfirmSubmit(btnClickHandler, $(this));
} else {
- btnClickHandler($(this));
+ btnClickHandler($(this));
}
},
error: function(data) {
diff --git a/pandora_console/include/lib/Entity.php b/pandora_console/include/lib/Entity.php
index 8ef3354bb8..ead8d8fe14 100644
--- a/pandora_console/include/lib/Entity.php
+++ b/pandora_console/include/lib/Entity.php
@@ -61,12 +61,12 @@ abstract class Entity
/**
* Instances a new object using array definition.
*
- * @param string $class_str Class name.
* @param array $data Fields data.
+ * @param string $class_str Class name.
*
* @return object With current definition.
*/
- public static function build(string $class_str, array $data=[])
+ public static function build(array $data=[], string $class_str=__CLASS__)
{
$obj = new $class_str();
// Set values.
diff --git a/pandora_console/include/lib/Module.php b/pandora_console/include/lib/Module.php
index 9a59ccd296..7c26e352e0 100644
--- a/pandora_console/include/lib/Module.php
+++ b/pandora_console/include/lib/Module.php
@@ -136,13 +136,16 @@ class Module extends Entity
/**
* Creates a module object from given data. Avoid query duplication.
*
- * @param array $data Module information.
+ * @param array $data Module information.
+ * @param string $class_str Class type.
*
* @return PandoraFMS\Module Object.
*/
- public static function build(array $data=[])
- {
- $obj = new Module();
+ public static function build(
+ array $data=[],
+ string $class_str='\PandoraFMS\Module'
+ ) {
+ $obj = new $class_str();
// Set values.
foreach ($data as $k => $v) {
diff --git a/pandora_console/include/styles/setup.css b/pandora_console/include/styles/setup.css
index b67de7e036..5c7b304772 100644
--- a/pandora_console/include/styles/setup.css
+++ b/pandora_console/include/styles/setup.css
@@ -13,3 +13,8 @@ span.subtitle-2 {
.no-borders {
border: 0 !important;
}
+
+input[type="text"],
+input[type="number"] {
+ width: 220px;
+}
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 50ecd0df0f..884f217623 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -129,7 +129,7 @@
';
-
- echo '
';
- echo "";
- echo ''.__('Event graph').'';
- echo ' | ';
-
- echo "";
- echo ''.__('Event graph by user').'';
- echo ' | ';
- echo '
';
-
- echo '';
- echo "";
- echo grafico_eventos_total();
- echo ' | ';
-
- echo "";
- echo grafico_eventos_usuario(320, 280);
- echo ' | ';
- echo '
';
-
- echo '';
- echo "";
- echo ''.__('Event graph by agent').'';
- echo ' | ';
-
- echo "";
- echo ''.__('Amount events validated').'';
- echo ' | ';
- echo '
';
-
- $where = '';
-if (!users_is_admin()) {
- $where = 'AND event_type NOT IN (\'recon_host_detected\', \'system\',\'error\', \'new_agent\', \'configuration_change\')';
-}
-
- echo '';
- echo "";
- echo grafico_eventos_grupo(300, 250, $where);
- echo ' | ';
-
- echo "";
- $extra_filter = [];
-if (!users_is_admin()) {
- $extra_filter['event_type'] = [
- 'unknown',
- 'alert_fired',
- 'alert_recovered',
- 'alert_ceased',
- 'alert_manual_validation',
- 'critical',
- 'warning',
- 'normal',
- ];
-}
-
- echo graph_events_validated(320, 250, $extra_filter);
- echo ' | ';
- echo '
';
-
-echo '';
diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php
index 87a3da3af1..ade1325f6f 100644
--- a/pandora_console/operation/menu.php
+++ b/pandora_console/operation/menu.php
@@ -393,8 +393,6 @@ if (check_acl($config['id_user'], 0, 'ER')
$sub['operation/events/events']['text'] = __('View events');
$sub['operation/events/events']['id'] = 'View events';
$sub['operation/events/events']['pages'] = ['godmode/events/events'];
- $sub['operation/events/event_statistics']['text'] = __('Statistics');
- $sub['operation/events/event_statistics']['id'] = 'Statistics';
// If ip doesn't is in list of allowed IP, isn't show this options.
include_once 'include/functions_api.php';
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index be8e0f51ed..60861cc7af 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.752
-%define release 210127
+%define release 210128
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec
index 939114d6e1..e35da6f377 100644
--- a/pandora_console/pandora_console.rhel7.spec
+++ b/pandora_console/pandora_console.rhel7.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.752
-%define release 210127
+%define release 210128
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 44e6564ed1..f07efc5463 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.752
-%define release 210127
+%define release 210128
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 518773d81d..578f414296 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-server
-Version: 7.0NG.752-210127
+Version: 7.0NG.752-210128
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 054e36adad..657cba32c0 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/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.752-210127"
+pandora_version="7.0NG.752-210128"
package_cpan=0
package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index f82ce04447..8abefbce62 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.752";
-my $pandora_build = "210127";
+my $pandora_build = "210128";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index e0ca983551..6afb74d4ab 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.752";
-my $pandora_build = "210127";
+my $pandora_build = "210128";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 985181c6e8..7ff4a34cdc 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.752
-%define release 210127
+%define release 210128
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index f1353b18ac..bf2c4883f4 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.752
-%define release 210127
+%define release 210128
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index 1742edca8d..01556b69eb 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.752"
-PI_BUILD="210127"
+PI_BUILD="210128"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index e2631ee780..874c8bd758 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.752 PS210127";
+my $version = "7.0NG.752 PS210128";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 1098ac7a14..ff37a3d13d 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.752 PS210127";
+my $version = "7.0NG.752 PS210128";
# save program name for logging
my $progname = basename($0);