Merge branch 'develop' into ent-13286-menu-full-screen-de-eventos-queda-mal
This commit is contained in:
commit
e519f78aba
|
@ -394,8 +394,8 @@ console_dependencies=" \
|
|||
mod_ssl \
|
||||
libzstd \
|
||||
openldap-clients \
|
||||
https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm \
|
||||
|
|
|
@ -386,8 +386,8 @@ console_dependencies=" \
|
|||
mod_ssl \
|
||||
libzstd \
|
||||
openldap-clients \
|
||||
https://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-122.0.6261.128-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/chromium-common-122.0.6261.128-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandora_gotty-1.0-1.el8.x86_64.rpm \
|
||||
https://firefly.pandorafms.com/centos8/pandorafms_made-0.1.0-1.el8.x86_64.rpm "
|
||||
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
|
||||
|
|
|
@ -371,7 +371,7 @@ ln -s /usr/bin/fping /usr/sbin/fping &>> "$LOGFILE"
|
|||
|
||||
# Chrome
|
||||
rm -f /usr/bin/chromium-browser &>> "$LOGFILE"
|
||||
CHROME_VERSION=google-chrome-stable_110.0.5481.177-1_amd64.deb
|
||||
CHROME_VERSION=google-chrome-stable_122.0.6261.128-1_amd64.deb
|
||||
execute_cmd "wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/${CHROME_VERSION}" "Downloading google chrome"
|
||||
execute_cmd "apt install -y ./${CHROME_VERSION}" "Intalling google chrome"
|
||||
execute_cmd "ln -s /usr/bin/google-chrome /usr/bin/chromium-browser" "Creating /usr/bin/chromium-browser Symlink"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.776-240402
|
||||
Version: 7.0NG.776-240404
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240402"
|
||||
pandora_version="7.0NG.776-240404"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -1039,7 +1039,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.776';
|
||||
use constant AGENT_BUILD => '240402';
|
||||
use constant AGENT_BUILD => '240404';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
%define debug_package %{nil}
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%define name pandorafms_agent_linux_bin
|
||||
%define source_name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
Summary: Pandora FMS Linux agent, binary version
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_agent_linux
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240402"
|
||||
PI_BUILD="240404"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{240402}
|
||||
{240404}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240402")
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240404")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Pandora FMS"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240402))"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240404))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.776-240402
|
||||
Version: 7.0NG.776-240404
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240402"
|
||||
pandora_version="7.0NG.776-240404"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -2,6 +2,10 @@ START TRANSACTION;
|
|||
|
||||
DROP TABLE tskin;
|
||||
|
||||
ALTER TABLE tfavmenu_user CONVERT TO CHARACTER SET UTF8MB4;
|
||||
ALTER TABLE tfiles_repo CONVERT TO CHARACTER SET UTF8MB4;
|
||||
ALTER TABLE tfiles_repo_group CONVERT TO CHARACTER SET UTF8MB4;
|
||||
|
||||
ALTER TABLE `tusuario`
|
||||
ADD COLUMN `stop_lts_modal` TINYINT NOT NULL DEFAULT 0 AFTER `session_max_time_expire`;
|
||||
|
||||
|
|
|
@ -936,7 +936,7 @@ $switchButtons[] = html_print_radio_button_extended(
|
|||
);
|
||||
|
||||
$tableAdvancedAgent->data['module_definition'][] = html_print_label_input_block(
|
||||
__('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true),
|
||||
__('Module definition').ui_print_help_tip(__('Three working modes can be selected for module definition. Learning mode: Default mode, if an XML arrives with new modules, they will be created automatically; it is a learning behavior. Normal mode: If an XML arrives with new modules, they will only be created if they are previously declared in the Console. Autodisable mode: It is the same as learning mode, but if all modules go into unknown, the agent will be disabled until information arrives again.'), true).clippy_context_help('modules_not_learning_mode'),
|
||||
html_print_div(
|
||||
[
|
||||
'class' => 'switch_radio_button',
|
||||
|
@ -1297,7 +1297,6 @@ if ($modo == 0) {
|
|||
echo "<span id='modules_not_learning_mode_context_help' class='invisible'>";
|
||||
}
|
||||
|
||||
echo clippy_context_help('modules_not_learning_mode');
|
||||
echo '</span>';
|
||||
|
||||
if ($new_agent === false) {
|
||||
|
@ -1434,15 +1433,15 @@ ui_require_jquery_file('bgiframe');
|
|||
|
||||
function show_modules_not_learning_mode_context_help() {
|
||||
if ($("input[name='modo'][value=0]").is(':checked')) {
|
||||
$("#modules_not_learning_mode_context_help").show().css('padding-right','8px');
|
||||
}
|
||||
else {
|
||||
$("#modules_not_learning_mode_context_help").hide();
|
||||
$(".div-modules_not_learning_mode").show();
|
||||
} else {
|
||||
$(".div-modules_not_learning_mode").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).ready (function() {
|
||||
show_modules_not_learning_mode_context_help();
|
||||
|
||||
var $id_agent = '<?php echo $id_agente; ?>';
|
||||
var previous_primary_group_select;
|
||||
|
|
|
@ -712,9 +712,9 @@ foreach ($simple_alerts as $alert) {
|
|||
WHERE id = '.$alert['id_alert_template']
|
||||
);
|
||||
if ($default_action != '') {
|
||||
$data[3] .= "<tr><td colspan='2'><ul class='action_list'><li>";
|
||||
$data[3] .= "<tr><td colspan='2'>";
|
||||
$data[3] .= db_get_sql("SELECT name FROM talert_actions WHERE id = $default_action").' <em>('.__('Default').')</em>';
|
||||
$data[3] .= '</li></ul></td>';
|
||||
$data[3] .= '</td>';
|
||||
$data[3] .= '</tr>';
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ foreach ($simple_alerts as $alert) {
|
|||
$data[3] .= '<tr class="alert_action_list">';
|
||||
$data[3] .= '<td>';
|
||||
$data[3] .= '<ul class="action_list inline_line">';
|
||||
$data[3] .= '<li class="inline_line">';
|
||||
$data[3] .= '<li class="">';
|
||||
if ($alert['disabled']) {
|
||||
$data[3] .= '<font class="action_name italic_a">';
|
||||
} else {
|
||||
|
@ -758,7 +758,7 @@ foreach ($simple_alerts as $alert) {
|
|||
|
||||
$data[3] .= '</td>';
|
||||
|
||||
$data[3] .= '<td class="flex_center">';
|
||||
$data[3] .= '<td class="flex_center table_action_buttons">';
|
||||
$data[3] .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
|
||||
// Is possible manage actions if have LW permissions in the agent group of the alert module
|
||||
if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW')) {
|
||||
|
@ -786,7 +786,7 @@ foreach ($simple_alerts as $alert) {
|
|||
true,
|
||||
[
|
||||
'title' => __('Update action'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
||||
'onclick' => 'show_display_update_action(\''.$action['id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action_id.'\',\''.$alert['id_agent_module'].'\')',
|
||||
]
|
||||
);
|
||||
|
@ -1333,10 +1333,9 @@ function show_display_update_action(id_module_action, alert_id, alert_id_agent_m
|
|||
},
|
||||
open: function() {
|
||||
$(`#update_action-div-${alert_id}`).css('overflow', 'hidden');
|
||||
//$(`#action_select_ajax-${alert_id}`).select2({
|
||||
// tags: true,
|
||||
// dropdownParent: $(`#update_action-div-${alert_id}`)
|
||||
//});
|
||||
$(`#update_action-div-${alert_id} select`).select2({
|
||||
dropdownParent: $(this).parent()
|
||||
});
|
||||
},
|
||||
width: 600,
|
||||
height: 350
|
||||
|
|
|
@ -350,7 +350,8 @@ function update_template($step)
|
|||
'previous_name' => $previous_name,
|
||||
];
|
||||
|
||||
if ($name_check === false) {
|
||||
$original_name = db_get_value('name', 'talert_templates', 'id', $id);
|
||||
if ($name_check === false || $original_name === $name_check) {
|
||||
$result = alerts_update_alert_template($id, $values);
|
||||
} else {
|
||||
ui_print_warning_message(__('Another template with the same name already exists'));
|
||||
|
|
|
@ -911,7 +911,7 @@ switch ($action) {
|
|||
|
||||
|
||||
// Admin options only for RM flag.
|
||||
if (check_acl($config['id_user'], 0, 'RM')) {
|
||||
if (check_acl($config['id_user'], 0, 'RR')) {
|
||||
$table->head[$next] = __('Private');
|
||||
$table->headstyle[$next] = 'min-width: 40px;text-align: left;';
|
||||
$table->size[$next] = '2%';
|
||||
|
@ -929,7 +929,7 @@ switch ($action) {
|
|||
|
||||
$next++;
|
||||
$op_column = false;
|
||||
if (is_metaconsole() === false) {
|
||||
if (is_metaconsole() === false && check_acl($config['id_user'], 0, 'RM')) {
|
||||
$op_column = true;
|
||||
$table->head[$next] = '<span title="Operations">'.__('Op.').'</span>'.html_print_checkbox(
|
||||
'all_delete',
|
||||
|
@ -1082,7 +1082,7 @@ switch ($action) {
|
|||
}
|
||||
|
||||
// Admin options only for RM flag.
|
||||
if (check_acl($config['id_user'], 0, 'RM')) {
|
||||
if (check_acl($config['id_user'], 0, 'RR')) {
|
||||
if ($report['private'] == 1) {
|
||||
$data[$next] = __('Yes');
|
||||
} else {
|
||||
|
@ -2408,10 +2408,15 @@ switch ($action) {
|
|||
$values['server_name'] = get_parameter('combo_server_sql');
|
||||
|
||||
if ($sql !== '') {
|
||||
// Replaces possible macros to check the validity of the query
|
||||
$macros_sql = $sql;
|
||||
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
||||
$macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql);
|
||||
|
||||
if ($values['server_name'] === 'all') {
|
||||
$servers_connection = metaconsole_get_connections();
|
||||
foreach ($servers_connection as $key => $s) {
|
||||
$good_format = db_validate_sql($sql, $s['server_name']);
|
||||
$good_format = db_validate_sql($macros_sql, $s['server_name']);
|
||||
}
|
||||
|
||||
// Reconnected in nodo if exist.
|
||||
|
@ -2423,9 +2428,9 @@ switch ($action) {
|
|||
}
|
||||
} else if ($server_id === 0) {
|
||||
// Connect with node if not exist conexion.
|
||||
$good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false);
|
||||
$good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false);
|
||||
} else {
|
||||
$good_format = db_validate_sql($sql);
|
||||
$good_format = db_validate_sql($macros_sql);
|
||||
}
|
||||
}
|
||||
} else if ($values['type'] == 'url') {
|
||||
|
@ -3353,10 +3358,15 @@ switch ($action) {
|
|||
|
||||
|
||||
if ($sql !== '') {
|
||||
// Replaces possible macros to check the validity of the query
|
||||
$macros_sql = $sql;
|
||||
$macros_sql = str_replace('_start_date_', '0', $macros_sql);
|
||||
$macros_sql = str_replace('_end_date_', 'NOW()', $macros_sql);
|
||||
|
||||
if ($values['server_name'] === 'all') {
|
||||
$servers_connection = metaconsole_get_connections();
|
||||
foreach ($servers_connection as $key => $s) {
|
||||
$good_format = db_validate_sql($sql, $s['server_name']);
|
||||
$good_format = db_validate_sql($macros_sql, $s['server_name']);
|
||||
}
|
||||
|
||||
// Reconnected in nodo if exist.
|
||||
|
@ -3368,9 +3378,9 @@ switch ($action) {
|
|||
}
|
||||
} else if ($server_id === 0) {
|
||||
// Connect with node if not exist conexion.
|
||||
$good_format = db_validate_sql($sql, (is_metaconsole() === true) ? $values['server_name'] : false);
|
||||
$good_format = db_validate_sql($macros_sql, (is_metaconsole() === true) ? $values['server_name'] : false);
|
||||
} else {
|
||||
$good_format = db_validate_sql($sql);
|
||||
$good_format = db_validate_sql($macros_sql);
|
||||
}
|
||||
}
|
||||
} else if ($values['type'] == 'url') {
|
||||
|
|
|
@ -49,8 +49,8 @@ $date = time();
|
|||
|
||||
$servers = servers_get_info();
|
||||
if ($servers === false) {
|
||||
$server_clippy = clippy_context_help('servers_down');
|
||||
echo "<div class='nf'>".__('There are no servers configured into the database').$server_clippy.'</div>';
|
||||
$no_data_msg = __('There are no servers registered on the database. Please, check the configuration and start the Pandora Server service');
|
||||
ui_print_info_message($no_data_msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ use DI\ContainerBuilder;
|
|||
/*
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC240402';
|
||||
$build_version = 'PC240404';
|
||||
$pandora_version = 'v7.0NG.776';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -317,6 +317,11 @@ function clippy_context_help($help=null)
|
|||
$title = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['title'];
|
||||
$intro = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['intro'];
|
||||
$img = $clippy_data_configuration_module['tours']['data_configuration_module']['steps'][0]['img'];
|
||||
} else if ($help === 'modules_not_learning_mode') {
|
||||
$clippy_modules_not_learning_mode = clippy_modules_not_learning_mode();
|
||||
$title = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['title'];
|
||||
$intro = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['intro'];
|
||||
$img = $clippy_modules_not_learning_mode['tours']['modules_not_learning_mode']['steps'][0]['img'];
|
||||
} else {
|
||||
$img = html_print_image(
|
||||
'images/info-warning.svg',
|
||||
|
@ -325,7 +330,7 @@ function clippy_context_help($help=null)
|
|||
);
|
||||
}
|
||||
|
||||
$return = $code.'<div id="'.$id.'" class="inline"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.$img.'</a></div>
|
||||
$return = $code.'<div id="'.$id.'" class="inline div-'.$help.'"><a onclick="show_'.$id.'();" href="javascript: void(0);" >'.$img.'</a></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
function show_'.$id.'() {
|
||||
|
|
|
@ -90,6 +90,10 @@ function io_safe_input($value)
|
|||
$value = utf8_encode($value);
|
||||
}
|
||||
|
||||
if (preg_match('/<\/?script(.*?)>/', $value)) {
|
||||
$value = preg_replace('/<\/?script(.*?)>/', '', $value);
|
||||
}
|
||||
|
||||
$valueHtmlEncode = htmlentities(($value ?? ''), ENT_QUOTES, 'UTF-8', true);
|
||||
|
||||
// Replace the character '\' for the equivalent html entitie
|
||||
|
|
|
@ -6018,6 +6018,15 @@ function reporting_html_availability_graph($table, $item, $pdf=0)
|
|||
$total_values .= $sla_value;
|
||||
$count_total_charts++;
|
||||
$title = '<b>'.__('Result').'</b>';
|
||||
|
||||
if (isset($chart['agent']) === true) {
|
||||
$title .= '<br />'.$chart['agent'];
|
||||
}
|
||||
|
||||
if (isset($chart['module']) === true) {
|
||||
$title .= '<br />'.$chart['module'];
|
||||
}
|
||||
|
||||
$sla_value_text = "<span style = 'font-weight: bold; font-size: ".$font_size.(($pdf === 0) ? ' !important' : '').'; color: '.$color."'>".$sla_value.'</span>';
|
||||
$checks_resume_text = '<span style = "font-size: '.$font_mini.';">';
|
||||
$checks_resume_text .= $checks_resume;
|
||||
|
|
|
@ -1502,14 +1502,41 @@ function ui_format_alert_row(
|
|||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
if (empty($actions) === false || $actionDefault != '') {
|
||||
$actionText = '<div><ul class="action_list">';
|
||||
$actionText = '';
|
||||
|
||||
if ($actionDefault !== '' && $actionDefault !== false) {
|
||||
$actionDefault_name = db_get_sql(
|
||||
sprintf(
|
||||
'SELECT name FROM talert_actions WHERE id = %d',
|
||||
$actionDefault
|
||||
)
|
||||
);
|
||||
foreach ($actions as $action) {
|
||||
$actionText .= '<div class="mrgn_btn_5px" ><span class="action_name"><li>'.$action['name'];
|
||||
if ($actionDefault_name === $action['name']) {
|
||||
$hide_actionDefault = true;
|
||||
} else {
|
||||
$hide_actionDefault = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($hide_actionDefault !== true) {
|
||||
$actionText .= $actionDefault_name.' <i>('.__('Default').')</i>';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($actions) === false || $actionDefault != '') {
|
||||
$actionText .= '<div><ul class="action_list">';
|
||||
foreach ($actions as $action) {
|
||||
$actionText .= '<div class="mrgn_btn_5px" ><span class="action_name"><li class="">';
|
||||
$actionText .= '<div class="flex_center mrgn_top-22px">';
|
||||
$actionText .= '<div class="mrgn_lft_0px_imp">';
|
||||
$actionText .= $action['name'];
|
||||
if ($action['fires_min'] != $action['fires_max']) {
|
||||
$actionText .= ' ('.$action['fires_min'].' / '.$action['fires_max'].')';
|
||||
}
|
||||
|
||||
$actionText .= '</div>';
|
||||
$actionText .= '<div class="flex_center table_action_buttons mrgn_lft_0px_imp">';
|
||||
$actionText .= ui_print_help_tip(__('The default actions will be executed every time that the alert is fired and no other action is executed'), true);
|
||||
// Is possible manage actions if have LW permissions in the agent group of the alert module.
|
||||
if (is_metaconsole() === true) {
|
||||
|
@ -1520,7 +1547,7 @@ function ui_format_alert_row(
|
|||
[
|
||||
'alt' => __('Delete action'),
|
||||
'title' => __('Delete action'),
|
||||
'class' => 'main_menu_icon invert_filter vertical_baseline',
|
||||
'class' => 'main_menu_icon invert_filter vertical_baseline action_button_hidden',
|
||||
]
|
||||
).'</a>';
|
||||
}
|
||||
|
@ -1534,7 +1561,7 @@ function ui_format_alert_row(
|
|||
true,
|
||||
[
|
||||
'title' => __('Update action'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'class' => 'main_menu_icon invert_filter action_button_hidden',
|
||||
'onclick' => 'show_display_update_action(\''.$action['original_id'].'\',\''.$alert['id'].'\',\''.$alert['id_agent_module'].'\',\''.$action['original_id'].'\',\''.$alert['agent_name'].'\')',
|
||||
]
|
||||
);
|
||||
|
@ -1542,32 +1569,15 @@ function ui_format_alert_row(
|
|||
}
|
||||
}
|
||||
|
||||
$actionText .= '</div>';
|
||||
$actionText .= '</div>';
|
||||
|
||||
$actionText .= '<div id="update_action-div-'.$alert['id'].'" class="invisible">';
|
||||
$actionText .= '</div>';
|
||||
$actionText .= '</li></span></div>';
|
||||
}
|
||||
|
||||
$actionText .= '</ul></div>';
|
||||
|
||||
if ($actionDefault !== '' && $actionDefault !== false) {
|
||||
$actionDefault_name = db_get_sql(
|
||||
sprintf(
|
||||
'SELECT name FROM talert_actions WHERE id = %d',
|
||||
$actionDefault
|
||||
)
|
||||
);
|
||||
foreach ($actions as $action) {
|
||||
if ($actionDefault_name === $action['name']) {
|
||||
$hide_actionDefault = true;
|
||||
} else {
|
||||
$hide_actionDefault = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($hide_actionDefault !== true) {
|
||||
$actionText .= $actionDefault_name.' <i>('.__('Default').')</i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data[$index['action']] = $actionText;
|
||||
|
|
|
@ -43,7 +43,16 @@ function clippy_modules_not_learning_mode()
|
|||
$return_tours['tours']['modules_not_learning_mode']['steps'][] = [
|
||||
'init_step_context' => true,
|
||||
'position' => 'left',
|
||||
'intro' => '<table><tr><td class="context_help_body">'.__('Please note that you have your agent setup to do not add new modules coming from the data XML.').'<br />'.__('That means if you have a local plugin or add manually new modules to the configuration file, you won\'t have it in your agent, unless you first create manually in the interface (with the exact name and type as coming in the XML file).').'<br />'.__('You should use the "normal" mode (non learn) only when you don\'t intend to add more modules to the agent.').'</td></tr></table>',
|
||||
'intro' => __('Please note that you have your agent setup to do not add new modules coming from the data XML.').'<br />'.__('That means if you have a local plugin or add manually new modules to the configuration file, you won\'t have it in your agent, unless you first create manually in the interface (with the exact name and type as coming in the XML file).').'<br />'.__('You should use the "normal" mode (non learn) only when you don\'t intend to add more modules to the agent.'),
|
||||
'title' => __('Modules not learning mode.'),
|
||||
'img' => html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
[
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
'style' => 'margin-left: 5px; width: 16px; height: 16px;',
|
||||
]
|
||||
),
|
||||
];
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf'] = [];
|
||||
$return_tours['tours']['modules_not_learning_mode']['conf']['autostart'] = false;
|
||||
|
|
|
@ -2413,7 +2413,6 @@ date: 2018-05-14 15:05:04
|
|||
});
|
||||
}
|
||||
|
||||
console.log(vCard);
|
||||
formattedVCardString +=
|
||||
"FN" + encodingPrefix + ":" + e(formattedName) + nl();
|
||||
formattedVCardString +=
|
||||
|
|
|
@ -504,9 +504,8 @@ class CustomGraphWidget extends Widget
|
|||
break;
|
||||
|
||||
case CUSTOM_GRAPH_VBARS:
|
||||
$style = 'padding: 10px;';
|
||||
$height = $size['height'];
|
||||
$output = '<div class="container-center" style="'.$style.'">';
|
||||
$output = '<div class="container-center">';
|
||||
break;
|
||||
|
||||
case CUSTOM_GRAPH_GAUGE:
|
||||
|
|
|
@ -450,7 +450,8 @@ li#search_input_widget {
|
|||
}
|
||||
|
||||
div#dashboard-controls-slides {
|
||||
width: 720px !important;
|
||||
min-width: 720px;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
div#dashboard-controls,
|
||||
|
|
|
@ -7163,6 +7163,10 @@ div.graph div.legend table {
|
|||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.mrgn_lft_0px_imp {
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.mrgn_lft_2px {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
@ -7305,6 +7309,10 @@ div.graph div.legend table {
|
|||
margin-top: -15px;
|
||||
}
|
||||
|
||||
.mrgn_top-22px {
|
||||
margin-top: -22px;
|
||||
}
|
||||
|
||||
.mrgn_top_0px {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
|
|
@ -1893,6 +1893,17 @@ a.link-bold {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
div#dashboard-controls-slides {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
div#dashboard-controls-slides
|
||||
.select2-container
|
||||
.select2-selection--single
|
||||
.select2-selection__rendered {
|
||||
color: var(--text-color) !important;
|
||||
}
|
||||
|
||||
div.events-refresh-pure {
|
||||
background-color: #333;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<div style='padding-bottom: 50px'>
|
||||
<?php
|
||||
$version = '7.0NG.776';
|
||||
$build = '240402';
|
||||
$build = '240404';
|
||||
$banner = "v$version Build $build";
|
||||
error_reporting(0);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -4432,7 +4432,8 @@ CREATE TABLE IF NOT EXISTS `tfavmenu_user` (
|
|||
`url` TEXT NOT NULL,
|
||||
`label` VARCHAR(255) NOT NULL,
|
||||
`section` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`));
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tsesion_filter_log_viewer`
|
||||
|
@ -4578,7 +4579,7 @@ CREATE TABLE IF NOT EXISTS `tfiles_repo` (
|
|||
`description` varchar(500) NULL default '',
|
||||
`hash` varchar(8) NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tfiles_repo_group`
|
||||
|
@ -4589,7 +4590,7 @@ CREATE TABLE IF NOT EXISTS `tfiles_repo_group` (
|
|||
`id_group` int(4) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_file`) REFERENCES tfiles_repo(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tmodule_synth`
|
||||
|
|
|
@ -200,7 +200,10 @@ $output .= '<a id="prev-slide" href="'.$prev_slides_url.'">';
|
|||
$output .= html_print_image(
|
||||
'images/control_prev.png',
|
||||
true,
|
||||
['title' => __('Previous')]
|
||||
[
|
||||
'title' => __('Previous'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$output .= '</a>';
|
||||
$output .= '</div>';
|
||||
|
@ -215,7 +218,10 @@ $output .= '<a href="'.$url.'&'.$stop_slides_url.'">';
|
|||
$output .= html_print_image(
|
||||
'images/control_stop.png',
|
||||
true,
|
||||
['title' => __('Stop')]
|
||||
[
|
||||
'title' => __('Stop'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$output .= '</a>';
|
||||
$output .= '</div>';
|
||||
|
@ -226,7 +232,10 @@ $output .= '<a id="pause-btn" href="javascript:;">';
|
|||
$output .= html_print_image(
|
||||
'images/control_pause.png',
|
||||
true,
|
||||
['title' => __('Pause')]
|
||||
[
|
||||
'title' => __('Pause'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$output .= '</a>';
|
||||
$output .= '</div>';
|
||||
|
@ -237,7 +246,10 @@ $output .= '<a id="next-slide" href="'.$next_slides_url.'">';
|
|||
$output .= html_print_image(
|
||||
'images/control_next.png',
|
||||
true,
|
||||
['title' => __('Next')]
|
||||
[
|
||||
'title' => __('Next'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$output .= '</a>';
|
||||
$output .= '</div>';
|
||||
|
@ -249,14 +261,20 @@ if ($cellModeSlides === 0) {
|
|||
$output .= html_print_image(
|
||||
'images/visual_console.png',
|
||||
true,
|
||||
['title' => __('Boxed mode')]
|
||||
[
|
||||
'title' => __('Boxed mode'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$msg_tooltip = __('This mode will show the dashboard with all the widgets in the screen. Click to change to single screen mode.');
|
||||
} else {
|
||||
$output .= html_print_image(
|
||||
'images/dashboard.png',
|
||||
true,
|
||||
['title' => __('Single screen')]
|
||||
[
|
||||
'title' => __('Single screen'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
);
|
||||
$msg_tooltip = __('This mode will show each widget in a screen, rotating between elements in each dashboard. Click to change to boxed mode.');
|
||||
}
|
||||
|
@ -275,5 +293,11 @@ $output .= '<div class="dashboard-title"><b>'.$name.'</b></div>';
|
|||
$output .= '</div>';
|
||||
|
||||
$output .= '</div>';
|
||||
$output .= '
|
||||
<script>
|
||||
var controls = document.querySelector("#dashboard-controls-slides");
|
||||
autoHideElement(controls, 1000);
|
||||
</script>
|
||||
';
|
||||
|
||||
echo $output;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.776-240402
|
||||
Version: 7.0NG.776-240404
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.776-240402"
|
||||
pandora_version="7.0NG.776-240404"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.776";
|
||||
my $pandora_build = "240402";
|
||||
my $pandora_build = "240404";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3775,9 +3775,6 @@ sub pandora_delete_module {
|
|||
# Delete templates asociated to the module
|
||||
db_do ($dbh, 'DELETE FROM talert_template_modules WHERE id_agent_module = ?', $module_id);
|
||||
|
||||
# Delete events asociated to the module
|
||||
db_do ($dbh, 'DELETE FROM tevento WHERE id_agentmodule = ?', $module_id);
|
||||
|
||||
# Delete tags asociated to the module
|
||||
db_do ($dbh, 'DELETE FROM ttag_module WHERE id_agente_modulo = ?', $module_id);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.776";
|
||||
my $pandora_build = "240402";
|
||||
my $pandora_build = "240404";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -612,6 +612,7 @@ sub set_file_permissions($$;$) {
|
|||
my $uid = getpwnam($pa_config->{'user'});
|
||||
my $gid = getgrnam($pa_config->{'group'});
|
||||
my $perm = $grants & (~oct($pa_config->{'umask'}));
|
||||
$gid = getgrnam("www-data") if (!defined($gid));
|
||||
|
||||
chown $uid, $gid, $file;
|
||||
chmod ( $perm, $file );
|
||||
|
@ -647,6 +648,7 @@ sub safe_input($) {
|
|||
|
||||
return "" unless defined($value);
|
||||
|
||||
$value =~ s/<\/?script(.*?)>//gs;
|
||||
$value =~ s/(.)/$CHR2ENT{$1}||$1/ge;
|
||||
|
||||
return $value;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%define debug_package %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%global __os_install_post %{nil}
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.776
|
||||
%define release 240402
|
||||
%define release 240404
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240402"
|
||||
PI_BUILD="240404"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -38,7 +38,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.776 Build 240402";
|
||||
my $version = "7.0NG.776 Build 240404";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.776 Build 240402";
|
||||
my $version = "7.0NG.776 Build 240404";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
@ -3429,6 +3429,8 @@ sub cli_agent_update() {
|
|||
my @id_agents;
|
||||
my $id_agent;
|
||||
|
||||
$new_value = safe_input($new_value);
|
||||
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
@id_agents = get_agent_ids_from_alias($dbh,$agent_name);
|
||||
foreach my $id (@id_agents) {
|
||||
|
|
Loading…
Reference in New Issue