diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 799b2bb8c9..84c220a198 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.747-200710
+Version: 7.0NG.747-200713
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 3437330ef9..1a49f60823 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.747-200710"
+pandora_version="7.0NG.747-200713"
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 64ce2248b4..2b7cdb9192 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -55,7 +55,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.747';
-use constant AGENT_BUILD => '200710';
+use constant AGENT_BUILD => '200713';
# 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 513e302e15..9489a8a8e7 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.747
-%define release 200710
+%define release 200713
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 4dd166c66d..a9d6d34408 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.747
-%define release 200710
+%define release 200713
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 45d5d0574f..baab89854a 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.747"
-PI_BUILD="200710"
+PI_BUILD="200713"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 4500b02a3f..cf2d5e0755 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{200710}
+{200713}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 4ec5410610..d776a76693 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.747(Build 200710)")
+#define PANDORA_VERSION ("7.0NG.747(Build 200713)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 8536573beb..225da7799d 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.747(Build 200710))"
+ VALUE "ProductVersion", "(7.0NG.747(Build 200713))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 1361fc7177..0bfda896c5 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.747-200710
+Version: 7.0NG.747-200713
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 6146d7d4e2..9bf5796be0 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.747-200710"
+pandora_version="7.0NG.747-200713"
package_pear=0
package_pandora=1
diff --git a/pandora_console/general/mysqlerr.php b/pandora_console/general/mysqlerr.php
index 67d38c56f8..79e6372c33 100644
--- a/pandora_console/general/mysqlerr.php
+++ b/pandora_console/general/mysqlerr.php
@@ -106,7 +106,7 @@ img.modalclose {
- images/icono_cerrar.png'>
+ /images/icono_cerrar.png'>
diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php
index 672470397a..f4502c1413 100644
--- a/pandora_console/godmode/alerts/alert_actions.php
+++ b/pandora_console/godmode/alerts/alert_actions.php
@@ -171,6 +171,11 @@ if ($delete_action) {
);
}
+if (is_central_policies_on_node() === true) {
+ ui_print_warning_message(
+ __('This node is configured with centralized mode. All alerts templates information is read only. Go to metaconsole to manage it.')
+ );
+}
$search_string = (string) get_parameter('search_string', '');
$group = (int) get_parameter('group', 0);
@@ -224,8 +229,11 @@ $table->data = [];
$table->head = [];
$table->head[0] = __('Name');
$table->head[1] = __('Group');
-$table->head[2] = __('Copy');
-$table->head[3] = __('Delete');
+if (is_central_policies_on_node() === false) {
+ $table->head[2] = __('Copy');
+ $table->head[3] = __('Delete');
+}
+
$table->style = [];
$table->style[0] = 'font-weight: bold';
$table->size = [];
@@ -292,7 +300,9 @@ foreach ($actions as $action) {
);
}
- if (check_acl($config['id_user'], $action['id_group'], 'LM')) {
+ if (is_central_policies_on_node() === false
+ && check_acl($config['id_user'], $action['id_group'], 'LM')
+ ) {
$table->cellclass[] = [
2 => 'action_buttons',
3 => 'action_buttons',
@@ -318,12 +328,14 @@ if (isset($data)) {
ui_print_info_message(['no_close' => true, 'message' => __('No alert actions configured') ]);
}
-echo '
';
-echo '';
-echo '
';
+if (is_central_policies_on_node() === false) {
+ echo '
';
+ echo '';
+ echo '
';
+}
enterprise_hook('close_meta_frame');
?>
diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php
index f14cc37902..5df94f29c3 100644
--- a/pandora_console/godmode/alerts/alert_commands.php
+++ b/pandora_console/godmode/alerts/alert_commands.php
@@ -46,6 +46,8 @@ if (is_ajax()) {
$id = (int) get_parameter('id', 0);
$get_recovery_fields = (int) get_parameter('get_recovery_fields', 1);
+ $is_central_policies_on_node = is_central_policies_on_node();
+
// If command ID is not provided, check for action id.
if ($id == 0) {
$id_action = (int) get_parameter('id_action');
@@ -124,40 +126,142 @@ if (is_ajax()) {
// HTML type.
if (preg_match('/^_html_editor_$/i', $field_value)) {
$editor_type_chkbx = '
';
- $editor_type_chkbx .= __('Basic').ui_print_help_tip(__('For sending emails, text must be HTML format, if you want to use plain text, type it between the following labels: '), true);
- $editor_type_chkbx .= html_print_radio_button_extended('editor_type_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."_value')", '', true);
+ $editor_type_chkbx .= __('Basic');
+ $editor_type_chkbx .= ui_print_help_tip(
+ __('For sending emails, text must be HTML format, if you want to use plain text, type it between the following labels: '),
+ true
+ );
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'editor_type_value_'.$i,
+ 0,
+ '',
+ false,
+ $is_central_policies_on_node,
+ "removeTinyMCE('textarea_field".$i."_value')",
+ '',
+ true
+ );
$editor_type_chkbx .= ' ';
$editor_type_chkbx .= __('Advanced').' ';
- $editor_type_chkbx .= html_print_radio_button_extended('editor_type_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."_value')", '', true);
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'editor_type_value_'.$i,
+ 0,
+ '',
+ true,
+ $is_central_policies_on_node,
+ "addTinyMCE('textarea_field".$i."_value')",
+ '',
+ true
+ );
$editor_type_chkbx .= ' ';
$ffield = $editor_type_chkbx;
- $ffield .= html_print_textarea('field'.$i.'_value', 1, 1, '', 'class="fields"', true);
+ $ffield .= html_print_textarea(
+ 'field'.$i.'_value',
+ 1,
+ 1,
+ '',
+ 'class="fields"',
+ true,
+ '',
+ $is_central_policies_on_node
+ );
$editor_type_chkbx = '
';
$editor_type_chkbx .= __('Basic').' ';
- $editor_type_chkbx .= html_print_radio_button_extended('editor_type_recovery_value_'.$i, 0, '', false, false, "removeTinyMCE('textarea_field".$i."_recovery_value')", '', true);
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'editor_type_recovery_value_'.$i,
+ 0,
+ '',
+ false,
+ $is_central_policies_on_node,
+ "removeTinyMCE('textarea_field".$i."_recovery_value')",
+ '',
+ true
+ );
$editor_type_chkbx .= ' ';
$editor_type_chkbx .= __('Advanced').' ';
- $editor_type_chkbx .= html_print_radio_button_extended('editor_type_recovery_value_'.$i, 0, '', true, false, "addTinyMCE('textarea_field".$i."_recovery_value')", '', true);
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'editor_type_recovery_value_'.$i,
+ 0,
+ '',
+ true,
+ $is_central_policies_on_node,
+ "addTinyMCE('textarea_field".$i."_recovery_value')",
+ '',
+ true
+ );
$editor_type_chkbx .= '
';
$rfield = $editor_type_chkbx;
- $rfield .= html_print_textarea('field'.$i.'_recovery_value', 1, 1, '', 'class="fields_recovery"', true);
+ $rfield .= html_print_textarea(
+ 'field'.$i.'_recovery_value',
+ 1,
+ 1,
+ '',
+ 'class="fields_recovery"',
+ true,
+ '',
+ $is_central_policies_on_node
+ );
} else if (preg_match('/^_content_type_$/i', $field_value)) {
$editor_type_chkbx = '
';
- $editor_type_chkbx .= __('Text/plain').ui_print_help_tip(__('For sending emails only text plain'), true);
- $editor_type_chkbx .= html_print_radio_button_extended('field'.$i.'_value', 'text/plain', '', '', false, '', '', true);
+ $editor_type_chkbx .= __('Text/plain');
+ $editor_type_chkbx .= ui_print_help_tip(
+ __('For sending emails only text plain'),
+ true
+ );
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'field'.$i.'_value',
+ 'text/plain',
+ '',
+ '',
+ $is_central_policies_on_node,
+ '',
+ '',
+ true
+ );
$editor_type_chkbx .= ' ';
$editor_type_chkbx .= __('Text/html').' ';
- $editor_type_chkbx .= html_print_radio_button_extended('field'.$i.'_value', 'text/html', '', 'text/html', false, '', '', true);
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'field'.$i.'_value',
+ 'text/html',
+ '',
+ 'text/html',
+ $is_central_policies_on_node,
+ '',
+ '',
+ true
+ );
$editor_type_chkbx .= '
';
$ffield = $editor_type_chkbx;
$editor_type_chkbx = '
';
- $editor_type_chkbx .= __('Text/plain').ui_print_help_tip(__('For sending emails only text plain'), true);
- $editor_type_chkbx .= html_print_radio_button_extended('field'.$i.'_recovery_value', 'text/plain', '', '', false, '', '', true);
+ $editor_type_chkbx .= __('Text/plain');
+ $editor_type_chkbx .= ui_print_help_tip(
+ __('For sending emails only text plain'),
+ true
+ );
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'field'.$i.'_recovery_value',
+ 'text/plain',
+ '',
+ '',
+ $is_central_policies_on_node,
+ '',
+ '',
+ true
+ );
$editor_type_chkbx .= ' ';
$editor_type_chkbx .= __('Text/html').' ';
- $editor_type_chkbx .= html_print_radio_button_extended('field'.$i.'_recovery_value', 'text/html', '', 'text/html', false, '', '', true);
+ $editor_type_chkbx .= html_print_radio_button_extended(
+ 'field'.$i.'_recovery_value',
+ 'text/html',
+ '',
+ 'text/html',
+ $is_central_policies_on_node,
+ '',
+ '',
+ true
+ );
$editor_type_chkbx .= '
';
$rfield = $editor_type_chkbx;
// Select type.
@@ -192,7 +296,8 @@ if (is_ajax()) {
true,
false,
false,
- 'fields'
+ 'fields',
+ $is_central_policies_on_node
);
$rfield = html_print_select(
$fields_value_select,
@@ -204,7 +309,8 @@ if (is_ajax()) {
true,
false,
false,
- 'fields_recovery'
+ 'fields_recovery',
+ $is_central_policies_on_node
);
} else {
$ffield = html_print_textarea(
@@ -213,7 +319,9 @@ if (is_ajax()) {
1,
$fv[0],
'style="min-height:40px; '.$style.'" class="fields"',
- true
+ true,
+ '',
+ $is_central_policies_on_node
);
$rfield = html_print_textarea(
'field'.$i.'_recovery_value',
@@ -221,7 +329,9 @@ if (is_ajax()) {
1,
$fv[0],
'style="min-height:40px; '.$style.'" class="fields_recovery',
- true
+ true,
+ '',
+ $is_central_policies_on_node
);
}
}
@@ -232,7 +342,9 @@ if (is_ajax()) {
1,
'',
'style="min-height:40px; '.$style.'" class="fields"',
- true
+ true,
+ '',
+ $is_central_policies_on_node
);
$rfield = html_print_textarea(
'field'.$i.'_recovery_value',
@@ -240,7 +352,9 @@ if (is_ajax()) {
1,
'',
'style="min-height:40px; '.$style.'" class="fields_recovery"',
- true
+ true,
+ '',
+ $is_central_policies_on_node
);
}
@@ -404,6 +518,15 @@ if ($copy_command) {
}
}
+$is_central_policies_on_node = is_central_policies_on_node();
+
+if ($is_central_policies_on_node === true) {
+ ui_print_warning_message(
+ __('This node is configured with centralized mode. All alerts templates information is read only. Go to metaconsole to manage it.')
+ );
+}
+
+$table = new stdClass;
$table->width = '100%';
$table->class = 'info_table';
@@ -457,7 +580,7 @@ foreach ($commands as $command) {
);
$data['action'] = '';
$table->cellclass[]['action'] = 'action_buttons';
- if (! $command['internal']) {
+ if ($is_central_policies_on_node === false && !$command['internal']) {
$data['action'] = '
';
$data['action'] .= ''.html_print_image('images/copy.png', true).'';
@@ -475,11 +598,13 @@ if (count($table->data) > 0) {
ui_print_info_message(['no_close' => true, 'message' => __('No alert commands configured') ]);
}
-echo '';
-echo '';
-echo '
';
+if ($is_central_policies_on_node === false) {
+ echo '';
+ echo '';
+ echo '
';
+}
enterprise_hook('close_meta_frame');
diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php
index 4147367379..150245acaf 100644
--- a/pandora_console/godmode/alerts/alert_templates.php
+++ b/pandora_console/godmode/alerts/alert_templates.php
@@ -125,13 +125,13 @@ if (defined('METACONSOLE')) {
$sec = 'galertas';
}
-// This prevents to duplicate the header in case delete_templete action is performed
+// This prevents to duplicate the header in
+// case delete_templete action is performed.
if (!$delete_template) {
- // Header
+ // Header.
if (defined('METACONSOLE')) {
alerts_meta_print_header();
} else {
- // ~ ui_print_page_header (__('Alerts')." » ". __('Alert templates'), "images/gm_alerts.png", false, "alerts_config", true);
ui_print_page_header(
__('Alerts').' » '.__('Alert templates'),
'images/gm_alerts.png',
@@ -142,7 +142,6 @@ if (!$delete_template) {
}
}
-
if ($update_template) {
$id = (int) get_parameter('id');
@@ -151,7 +150,7 @@ if ($update_template) {
$fields_recovery = [];
for ($i = 1; $i <= 10; $i++) {
$values['field'.$i] = (string) get_parameter('field'.$i);
- $values['field'.$i.'_recovery'] = $recovery_notify ? (string) get_parameter('field'.$i.'_recovery') : '';
+ $values['field'.$i.'_recovery'] = ($recovery_notify) ? (string) get_parameter('field'.$i.'_recovery') : '';
}
$values['recovery_notify'] = $recovery_notify;
@@ -164,13 +163,15 @@ if ($update_template) {
);
}
-// If user tries to delete a template with group=ALL then must have "PM" access privileges
+// If user tries to delete a template with group=ALL
+// then must have "PM" access privileges.
if ($delete_template) {
$id = get_parameter('id');
$al_template = alerts_get_alert_template($id);
if ($al_template !== false) {
- // If user tries to delete a template with group=ALL then must have "PM" access privileges
+ // If user tries to delete a template with group=ALL
+ // then must have "PM" access privileges.
if ($al_template['id_group'] == 0) {
if (! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
@@ -192,8 +193,7 @@ if ($delete_template) {
);
}
}
- } //end if
- else {
+ } else {
$own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
$own_groups = array_keys(users_get_groups($config['id_user'], 'LM'));
@@ -202,7 +202,7 @@ if ($delete_template) {
}
$is_in_group = in_array($al_template['id_group'], $own_groups);
- // Then template group have to be is his own groups
+ // Then template group have to be is his own groups.
if ($is_in_group) {
if (defined('METACONSOLE')) {
alerts_meta_print_header();
@@ -241,9 +241,15 @@ if ($delete_template) {
$result = alerts_delete_alert_template($id);
if ($result) {
- db_pandora_audit('Template alert management', 'Delete alert template #'.$id);
+ db_pandora_audit(
+ 'Template alert management',
+ 'Delete alert template #'.$id
+ );
} else {
- db_pandora_audit('Template alert management', 'Fail try to delete alert template #'.$id);
+ db_pandora_audit(
+ 'Template alert management',
+ 'Fail try to delete alert template #'.$id
+ );
}
ui_print_result_message(
@@ -253,6 +259,11 @@ if ($delete_template) {
);
}
+if (is_central_policies_on_node() === true) {
+ ui_print_warning_message(
+ __('This node is configured with centralized mode. All alerts templates information is read only. Go to metaconsole to manage it.')
+ );
+}
$search_string = (string) get_parameter('search_string');
$search_type = (string) get_parameter('search_type');
@@ -269,7 +280,7 @@ $url = ui_get_url_refresh(
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
-if (defined('METACONSOLE')) {
+if (is_metaconsole() === true) {
$table->cellspacing = 0;
$table->cellpadding = 0;
}
@@ -313,7 +324,7 @@ $table->data[0][4] .= html_print_submit_button(
);
$table->data[0][4] .= ' ';
-if (defined('METACONSOLE')) {
+if (is_metaconsole() === true) {
$filter = '