mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge remote-tracking branch 'origin/develop' into ent-13720-italtel-problema-raro-de-desincronizacion-en-alta-disponibilidad-ha-guardia
This commit is contained in:
commit
bc6465e68a
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.776-240521
|
||||
Version: 7.0NG.776-240530
|
||||
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-240521"
|
||||
pandora_version="7.0NG.776-240530"
|
||||
|
||||
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 => '240521';
|
||||
use constant AGENT_BUILD => '240530';
|
||||
|
||||
# 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 240521
|
||||
%define release 240530
|
||||
|
||||
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 240521
|
||||
%define release 240530
|
||||
%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 240521
|
||||
%define release 240530
|
||||
%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 240521
|
||||
%define release 240530
|
||||
|
||||
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 240521
|
||||
%define release 240530
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.776"
|
||||
PI_BUILD="240521"
|
||||
PI_BUILD="240530"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{240521}
|
||||
{240530}
|
||||
|
||||
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 240521")
|
||||
#define PANDORA_VERSION ("7.0NG.776 Build 240530")
|
||||
|
||||
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 240521))"
|
||||
VALUE "ProductVersion", "(7.0NG.776(Build 240530))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.776-240521
|
||||
Version: 7.0NG.776-240530
|
||||
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-240521"
|
||||
pandora_version="7.0NG.776-240530"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -162,12 +162,12 @@ function extension_db_status_execute_checks($db_user, $db_password, $db_host, $d
|
||||
$db_name = $db_name[0];
|
||||
|
||||
if (!$db_host) {
|
||||
ui_print_error_message(__('A host must be provided'));
|
||||
ui_print_error_message(__('Host must be provided'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$db_name) {
|
||||
ui_print_error_message(__('A DB name must be provided'));
|
||||
ui_print_error_message(__('DB name must be provided'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ if (is_ajax()) {
|
||||
echo "<ul class='tooltip_counters'><h3>".__('Counters Module').'</h3>';
|
||||
echo "<li><div style='background-color: ".COL_ALERTFIRED.";'></div>".__('Alerts_Fired').': '.$send_tooltip['alerts_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_CRITICAL.";'></div>".__('Critical').': '.$send_tooltip['critical_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_WARNING.";'></div>".__('warning').': '.$send_tooltip['warning_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_WARNING.";'></div>".__('Warning').': '.$send_tooltip['warning_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_UNKNOWN.";'></div>".__('Unknown').': '.$send_tooltip['unknown_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_NORMAL.";'></div>".__('OK').': '.$send_tooltip['normal_module_count'].'</li>';
|
||||
echo "<li><div style='background-color: ".COL_MAINTENANCE.";'></div>".__('Not_init').': '.$send_tooltip['notInit_module_count'].'</li></ul>';
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ $msg = __('A cluster is a group of devices that provide the same service in high
|
||||
|
||||
$msg .= __('Depending on how they provide that service, we can find two types:').'<br><br>';
|
||||
|
||||
$msg .= __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>';
|
||||
$msg .= __('Clusters to balance the service load: these are active - active (A/A) mode clusters. It means that all the nodes (or machines that compose it) are working. They must be working because if one stops working, it will overload the others.').'<br><br>';
|
||||
|
||||
$msg .= __('Clusters to guarantee service: these are active - passive (A/P) mode clusters. It means that one of the nodes (or machines that make up the cluster) will be running (primary) and another will not (secondary). When the primary goes down, the secondary must take over and give the service instead. Although many of the elements of this cluster are active-passive, it will also have active elements in both of them that indicate that the passive node is "online", so that in the case of a service failure in the master, the active node collects this information.');
|
||||
|
||||
|
@ -27,12 +27,12 @@ $button = '';
|
||||
if (check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) {
|
||||
$url_new = 'index.php?sec=reporting&sec2=godmode/reporting/graph_builder';
|
||||
$button = '<form action="'.$url_new.'" method="post">
|
||||
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create custom graph').'" />
|
||||
<input type="submit" class="button_task button_task_mini mrgn_0px_imp" value="'.__('Create custom graphs').'" />
|
||||
</form>';
|
||||
}
|
||||
|
||||
echo ui_print_empty_view(
|
||||
__('Create custom graph'),
|
||||
__('Create custom graphs'),
|
||||
$msg,
|
||||
'custom-graph.svg',
|
||||
$button
|
||||
|
@ -107,9 +107,9 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
||||
if ($check_minor_release_available === true) {
|
||||
if (users_is_admin($config['id_user'])) {
|
||||
if ($config['language'] === 'es') {
|
||||
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/es/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('Sobre actualización de revisión menor').'</a>', 'Revisión/es menor/es disponible/s');
|
||||
set_pandora_error_for_header('Hay una o mas revisiones menores en espera para ser actualizadas. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/es/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">Sobre actualización de revisión menor</a>', 'Revisión/es menor/es disponible/s');
|
||||
} else {
|
||||
set_pandora_error_for_header('There are one or more minor releases waiting for update. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/en/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">'.__('About minor release update').'</a>', 'minor release/s available');
|
||||
set_pandora_error_for_header('There are one or more minor releases waiting for update. <a id="aviable_updates" target="blank" href="https://pandorafms.com/manual/en/documentation/pandorafms/installation/02_anexo_upgrade#version_70ng_rolling_release">About minor release update</a>', 'minor release/s available');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -396,7 +396,7 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
||||
<div id="msg-header" class="invisible"></div>
|
||||
<a href="https://pandorafms.com/manual" target="_blank">'.__('Pandora documentation').'</a>';
|
||||
if (enterprise_installed() === true) {
|
||||
$modal_box .= '<a href="https://support.pandorafms.com/" target="_blank">'.__('Enterprise support ').'</a>';
|
||||
$modal_box .= '<a href="https://support.pandorafms.com/" target="_blank">'.__('Enterprise support').' </a>';
|
||||
$modal_box .= '<a href="#" id="feedback-header">'.__('Give us feedback').'</a>';
|
||||
} else {
|
||||
$modal_box .= '<a href="https://pandorafms.com/community/forums/" target="_blank">'.__('Community Support').'</a>';
|
||||
|
@ -129,7 +129,7 @@ $table->data[2][0] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$table->data[2][1] = html_print_label_input_block(
|
||||
__('Ignore new GIS data: '),
|
||||
__('Ignore new GIS data').': ',
|
||||
'<div class="flex mrgn_top_5px">'.__('Yes').' '.html_print_radio_button_extended(
|
||||
'update_gis_data',
|
||||
0,
|
||||
|
@ -1388,7 +1388,7 @@ ui_require_jquery_file('bgiframe');
|
||||
|
||||
confirmDialog({
|
||||
title: "<?php echo __('Delete agent'); ?>",
|
||||
message: msg_cluster + "<?php echo __('This action is not reversible. Are you sure'); ?>",
|
||||
message: msg_cluster + "<?php echo __('This action is not reversible. Are you sure?'); ?>",
|
||||
onAccept: function() {
|
||||
window.location.assign('index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente='+$idAgente);
|
||||
}
|
||||
|
@ -673,11 +673,7 @@ $custom_font_size = '';
|
||||
// ui_pagination($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&recursion=$recursion&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled&os=$os", $offset);
|
||||
if ($agents !== false) {
|
||||
// Urls to sort the table.
|
||||
if ($config['language'] === 'ja'
|
||||
|| $config['language'] === 'zh_CN'
|
||||
|| $own_info['language'] === 'ja'
|
||||
|| $own_info['language'] === 'zh_CN'
|
||||
) {
|
||||
if ($config['language'] === 'ja' || $own_info['language'] === 'ja') {
|
||||
// Adds a custom font size for Japanese and Chinese language.
|
||||
$custom_font_size = 'custom_font_size';
|
||||
}
|
||||
|
@ -649,7 +649,7 @@ if ($disabledBecauseInPolicy) {
|
||||
);
|
||||
}
|
||||
|
||||
$table_simple->data['caption_ignore_unknown'][0] = __('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true);
|
||||
$table_simple->data['caption_ignore_unknown'][0] = __('Ignore unknown').ui_print_help_tip(__('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true);
|
||||
$table_simple->data['ignore_unknown'][0] = html_print_checkbox_switch(
|
||||
'ignore_unknown',
|
||||
1,
|
||||
|
@ -300,7 +300,7 @@ $(document).ready (function () {
|
||||
},
|
||||
messages: {
|
||||
id_agent_module: { valueNotEquals: "<?php echo __('Please select an item'); ?>!"},
|
||||
template: { valueNotEquals: "<?php echo __('Please select a templete'); ?>!"},
|
||||
template: { valueNotEquals: "<?php echo __('Please select a template'); ?>!"},
|
||||
id_agent: { valueNotEquals: "<?php echo __('Please select an agent'); ?>!"},
|
||||
}
|
||||
});
|
||||
|
@ -682,14 +682,14 @@ switch ($action) {
|
||||
case 'edit_map':
|
||||
case 'update_saved':
|
||||
if (empty($invalidFields) === true) {
|
||||
$action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
$action_button = html_print_submit_button(__('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
} else {
|
||||
$action_button = html_print_submit_button(_('Update map'), 'update_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
$action_button = html_print_submit_button(__('Update map'), 'update_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'new_map':
|
||||
$action_button = html_print_submit_button(_('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
$action_button = html_print_submit_button(__('Save map'), 'save_button', false, ['mode' => 'primary', 'icon' => 'next'], true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1175,14 +1175,14 @@ if ($config['activate_gis']) {
|
||||
);
|
||||
|
||||
$table->data[4][0] = html_print_label_input_block(
|
||||
__('Ignore new GIS data:'),
|
||||
__('Ignore new GIS data').':',
|
||||
'<div class="flex-row-center">'.$ignore_gis.'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$table->data[5][0] = html_print_label_input_block(
|
||||
__('Quiet:').ui_print_help_tip(
|
||||
__('Quiet').ui_print_help_tip(
|
||||
__('The agent still runs but the alerts and events will be stop'),
|
||||
true
|
||||
),
|
||||
@ -1232,7 +1232,7 @@ $table->data[5][1] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$table->data[6][0] = html_print_label_input_block(
|
||||
__('Ignore unknown').ui_print_help_tip(_('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
__('Ignore unknown').ui_print_help_tip(__('This disables the calculation of the unknown state in the agent and any of its modules, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
|
@ -1545,7 +1545,7 @@ $table->data[40][0] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$table->data[40][1] = html_print_label_input_block(
|
||||
__('Ignore unknown').ui_print_help_tip(_('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
__('Ignore unknown').ui_print_help_tip(__('This disables the module\'s state calculation to unknown, so it will never transition to unknown. The state it reflects is the last known status.'), true),
|
||||
html_print_select(
|
||||
[
|
||||
'' => __('No change'),
|
||||
|
@ -380,7 +380,7 @@ $modules_select = html_print_select(
|
||||
false
|
||||
);
|
||||
|
||||
$row[] = '<b>'._('Modules').'</b>';
|
||||
$row[] = '<b>'.__('Modules').'</b>';
|
||||
$row[] = $modules_select;
|
||||
|
||||
$table->rowstyle['agents-modules-row'] = 'vertical-align: top; display: none';
|
||||
|
@ -373,7 +373,7 @@ $autorefresh_list_out['operation/dashboard/dashboard'] = 'Dashboard';
|
||||
$autorefresh_list_out['operation/visual_console/render_view'] = 'Visual console';
|
||||
$autorefresh_list_out['operation/events/events'] = 'Events';
|
||||
|
||||
$autorefresh_show = '<p class="edit_user_labels">'._('Autorefresh').ui_print_help_tip(
|
||||
$autorefresh_show = '<p class="edit_user_labels">'.__('Autorefresh').ui_print_help_tip(
|
||||
__('This will activate autorefresh in selected pages'),
|
||||
true
|
||||
).'</p>';
|
||||
|
@ -509,7 +509,7 @@ if ($option === 'edit_agents' || $option === 'edit_modules') {
|
||||
global $SelectAction;
|
||||
|
||||
$SelectAction = '<form id="form_necesario" method="post" id="form_options" action="'.$url.'">';
|
||||
$SelectAction .= '<span class="mrgn_lft_10px mrgn_right_10px">'._('Action').'</span>';
|
||||
$SelectAction .= '<span class="mrgn_lft_10px mrgn_right_10px">'.__('Action').'</span>';
|
||||
$SelectAction .= html_print_select(
|
||||
$options,
|
||||
'option',
|
||||
|
@ -140,10 +140,7 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true
|
||||
$sub['godmode/servers/discovery&wiz=custom']['sub2'] = $sub2;
|
||||
}
|
||||
|
||||
if (check_acl($config['id_user'], 0, 'RW')
|
||||
|| check_acl($config['id_user'], 0, 'RM')
|
||||
|| check_acl($config['id_user'], 0, 'PM')
|
||||
) {
|
||||
if (users_is_admin($config['id_user']) === true) {
|
||||
$sub['godmode/servers/discovery&wiz=magextensions']['text'] = __('Manage disco packages');
|
||||
$sub['godmode/servers/discovery&wiz=magextensions']['id'] = 'mextensions';
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ $table->data[2][] = html_print_label_input_block(
|
||||
100,
|
||||
true
|
||||
).ui_print_input_placeholder(
|
||||
__('separate fields with ').SEPARATOR_COLUMN,
|
||||
__('Separate fields with').' '.SEPARATOR_COLUMN,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
@ -182,7 +182,7 @@ $table->data[3][0] = html_print_label_input_block(
|
||||
).$dynamic_interval_img.'</div>'
|
||||
);
|
||||
|
||||
$table->data[3][2] = '<span><em>'.__('Dynamic Min. ').'</em>';
|
||||
$table->data[3][2] = '<span><em>'.__('Dynamic Min.').' </em>';
|
||||
$table->data[3][2] .= html_print_input_text('dynamic_min', $dynamic_min, '', 10, 255, true);
|
||||
$table->data[3][2] .= '<br /><em>'.__('Dynamic Max.').'</em>';
|
||||
$table->data[3][2] .= html_print_input_text('dynamic_max', $dynamic_max, '', 10, 255, true);
|
||||
@ -192,14 +192,14 @@ $table->data[3][3] .= html_print_checkbox('dynamic_two_tailed', 1, $dynamic_two_
|
||||
$table->data[3][1] = html_print_label_input_block(
|
||||
'',
|
||||
'<div class="inline_flex align-center">'.html_print_label_input_block(
|
||||
__('Dynamic Min. '),
|
||||
__('Dynamic Min.').' ',
|
||||
html_print_input_text('dynamic_min', $dynamic_min, '', 10, 255, true, false, false, '', 'w100p mrgn_top_10px'),
|
||||
[
|
||||
'label_class' => 'font-title-font',
|
||||
'div_class' => 'mrgn_right_10px',
|
||||
]
|
||||
).html_print_label_input_block(
|
||||
__('Dynamic Max. '),
|
||||
__('Dynamic Max.').' ',
|
||||
html_print_input_text('dynamic_max', $dynamic_max, '', 10, 255, true, false, false, '', 'w100p mrgn_top_10px'),
|
||||
[
|
||||
'label_class' => 'font-title-font',
|
||||
|
@ -142,7 +142,7 @@ if (isset($_GET['create']) || isset($_GET['update'])) {
|
||||
// Will return either 0 (in case of error) or an int
|
||||
}
|
||||
} else {
|
||||
ui_print_result_message(false, '', _('Cannot create a template without name'));
|
||||
ui_print_result_message(false, '', __('Cannot create a template without name'));
|
||||
}
|
||||
} else if ($id_np > 0) {
|
||||
// Profile exists
|
||||
|
@ -3823,7 +3823,7 @@ if (is_metaconsole() === true) {
|
||||
<td>
|
||||
<span id="row_event_graph_by_agent">
|
||||
<?php
|
||||
echo __('By agent ');
|
||||
echo __('By agent').' ';
|
||||
html_print_checkbox_switch(
|
||||
'event_graph_by_agent',
|
||||
true,
|
||||
@ -3833,7 +3833,7 @@ if (is_metaconsole() === true) {
|
||||
</span>
|
||||
<span id="row_event_graph_by_user">
|
||||
<?php
|
||||
echo __('By user validator ');
|
||||
echo __('By user validator').' ';
|
||||
html_print_checkbox_switch(
|
||||
'event_graph_by_user_validator',
|
||||
true,
|
||||
@ -3843,7 +3843,7 @@ if (is_metaconsole() === true) {
|
||||
</span>
|
||||
<span id="row_event_graph_by_criticity">
|
||||
<?php
|
||||
echo __('By criticity ');
|
||||
echo __('By criticity').' ';
|
||||
html_print_checkbox_switch(
|
||||
'event_graph_by_criticity',
|
||||
true,
|
||||
@ -3853,7 +3853,7 @@ if (is_metaconsole() === true) {
|
||||
</span>
|
||||
<span id="row_event_graph_by_validated">
|
||||
<?php
|
||||
echo __('Validated vs unvalidated ');
|
||||
echo __('Validated vs unvalidated').' ';
|
||||
html_print_checkbox_switch(
|
||||
'event_graph_validated_vs_unvalidated',
|
||||
true,
|
||||
|
@ -190,7 +190,7 @@ if ($schedule_report != '') {
|
||||
|
||||
ui_print_result_message(
|
||||
$result,
|
||||
__('Your report has been planned, and the system will email you a '.$report_type.' file with the report as soon as its finished'),
|
||||
__('Your report has been planned, and the system will email you a %s file with the report as soon as its finished', $report_type),
|
||||
__('An error has ocurred')
|
||||
);
|
||||
echo '<br>';
|
||||
|
@ -687,10 +687,6 @@ if ($display_loading === true || $running_create === true || $running_delete ===
|
||||
}
|
||||
|
||||
$(document).ready (function () {
|
||||
var demo_items_count = <?php echo $demo_items_count; ?>;
|
||||
var agent_count_span_str = '<?php echo __('demo agents currently in the system'); ?>';
|
||||
var agents_str = '<?php echo __('agents'); ?>';
|
||||
|
||||
$("#table-adv").hide();
|
||||
|
||||
$('#checkbox-toggle_adv_opts').change(function() {
|
||||
|
@ -246,7 +246,7 @@ if ($config['history_db_enabled'] == 1) {
|
||||
true
|
||||
).' '.__('ago').'.';
|
||||
} else {
|
||||
$table_status->data[1][0] .= __('not executed');
|
||||
$table_status->data[1][0] .= __('Not executed');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ $row['publicUrl'] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$row['agentsSync'] = html_print_label_input_block(
|
||||
__('Number of Agents to synchronize').ui_print_help_tip(
|
||||
__('Number of agents to synchronize').ui_print_help_tip(
|
||||
__('Number of agents that will synchronize at the same time, minimum 10 max 1000'),
|
||||
true
|
||||
),
|
||||
|
@ -505,7 +505,7 @@ $ldap_rows = [];
|
||||
// Method.
|
||||
$auth_methods = [
|
||||
'mysql' => __('Local %s', get_product_name()),
|
||||
'ldap' => __('ldap'),
|
||||
'ldap' => __('LDAP'),
|
||||
];
|
||||
if (enterprise_installed() === true) {
|
||||
add_enterprise_auth_methods($auth_methods);
|
||||
|
@ -50,7 +50,7 @@ if (is_ajax()) {
|
||||
}
|
||||
|
||||
echo "<div id='dialog' title='".__('Enforce https Information')."' class='invisible'>";
|
||||
echo "<p class='center'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>';
|
||||
echo "<p class='center'>".__('If SSL is not properly configured you will lose access to').' '.get_product_name().' '.__('Console').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
|
||||
@ -112,7 +112,7 @@ html_print_div(
|
||||
[
|
||||
'id' => 'force_public_url_dialog',
|
||||
'class' => 'invisible',
|
||||
'content' => __('If public URL is not properly configured you will lose access to ').get_product_name().__(' Console'),
|
||||
'content' => __('If public URL is not properly configured you will lose access to').' '.get_product_name().' '.__('Console'),
|
||||
]
|
||||
);
|
||||
|
||||
@ -405,7 +405,7 @@ $table->data[$i][] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Enable Feedback').ui_print_help_tip(__(' It enables the \'give feedback\' window in the help menu at the top right.'), true),
|
||||
__('Enable Feedback').ui_print_help_tip(__('It enables the \'give feedback\' window in the help menu at the top right.'), true),
|
||||
html_print_checkbox_switch_extended(
|
||||
'activate_feedback',
|
||||
true,
|
||||
@ -557,7 +557,7 @@ $table->data[$i][] = html_print_label_input_block(
|
||||
)
|
||||
);
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Referrer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
|
||||
__('Referer security').ui_print_help_tip(__('When it is active, the source of the requests is checked. If the user comes from a URL external to Pandora FMS, the source of the activity will be considered suspicious.'), true),
|
||||
html_print_checkbox_switch(
|
||||
'referer_security',
|
||||
1,
|
||||
@ -720,7 +720,7 @@ $table->data[$i++][] = html_print_label_input_block(
|
||||
);
|
||||
|
||||
$help_tip = ui_print_help_tip(
|
||||
__('If there is any event “In process” with a specific additional ID and a “New” event with that additional ID is received, it will be created as “In process.” New events will also inherit the Event Custom ID from the old event.'),
|
||||
__('If there is any event "In process" with a specific additional ID and a "New" event with that additional ID is received, it will be created as "In process." New events will also inherit the Event Custom ID from the old event.'),
|
||||
true
|
||||
);
|
||||
|
||||
|
@ -2202,7 +2202,7 @@ html_print_table($table_vc);
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<fieldset class="margin-bottom-10">';
|
||||
echo '<legend>'.__('Reports configuration ').ui_print_help_icon('reports_configuration_tab', true).'</legend>';
|
||||
echo '<legend>'.__('Reports configuration').' '.ui_print_help_icon('reports_configuration_tab', true).'</legend>';
|
||||
html_print_table($table_report);
|
||||
echo '</fieldset>';
|
||||
|
||||
@ -2398,7 +2398,7 @@ $(document).ready (function () {
|
||||
$("#button-interval_del_btn").click( function() {
|
||||
confirmDialog({
|
||||
title: "<?php echo __('Delete interval'); ?>",
|
||||
message: "<?php echo __('This action is not reversible. Are you sure'); ?>",
|
||||
message: "<?php echo __('This action is not reversible. Are you sure?'); ?>",
|
||||
onAccept: function() {
|
||||
var interval_selected = $('#intervals option:selected').val();
|
||||
$('#hidden-interval_to_delete').val(interval_selected);
|
||||
|
@ -400,7 +400,7 @@ if ($create_user === true) {
|
||||
// Previously defined.
|
||||
$values['autorefresh_white_list'] = $autorefresh_white_list;
|
||||
|
||||
// eHorus user level conf.
|
||||
// Ehorus user level conf.
|
||||
if ((bool) $config['ehorus_user_level_conf'] === true) {
|
||||
$values['ehorus_user_level_enabled'] = (bool) get_parameter('ehorus_user_level_enabled', false);
|
||||
if ($values['ehorus_user_level_enabled'] === true) {
|
||||
@ -1417,7 +1417,7 @@ $default_event_filter .= html_print_select(
|
||||
).'</div>';
|
||||
|
||||
if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_user_level_conf'] === true) {
|
||||
$ehorus = '<div class="label_select_simple"><p class="edit_user_labels">'.__('eHorus user access enabled').'</p>';
|
||||
$ehorus = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Ehorus user access enabled').'</p>';
|
||||
$ehorus .= html_print_checkbox_switch(
|
||||
'ehorus_user_level_enabled',
|
||||
1,
|
||||
@ -1425,7 +1425,7 @@ if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_
|
||||
true
|
||||
).'</div>';
|
||||
$ehorus .= '<div class="user_edit_ehorus_outer">';
|
||||
$ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('eHorus user').'</p>';
|
||||
$ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('Ehorus user').'</p>';
|
||||
$ehorus .= html_print_input_text(
|
||||
'ehorus_user_level_user',
|
||||
$user_info['ehorus_user_level_user'],
|
||||
@ -1434,7 +1434,7 @@ if (isset($config['ehorus_user_level_conf']) === true && (bool) $config['ehorus_
|
||||
45,
|
||||
true
|
||||
).'</div>';
|
||||
$ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('eHorus password').'</p>';
|
||||
$ehorus .= '<div class="label_select_simple user_edit_ehorus_inner"><p class="edit_user_labels">'.__('Ehorus password').'</p>';
|
||||
$ehorus .= html_print_input_password(
|
||||
'ehorus_user_level_pass',
|
||||
io_output_password($user_info['ehorus_user_level_pass']),
|
||||
|
@ -1178,7 +1178,7 @@ class DiscoveryTaskList extends HTML
|
||||
}
|
||||
|
||||
if (empty($table->data)) {
|
||||
$content = '<div class="nf">'.__('Server').' '.$server_name.' '.__('has no discovery tasks assigned').'</div>';
|
||||
$content = '<div class="nf">'.__('Server %s has no discovery tasks assigned', $server_name).'</div>';
|
||||
$return = false;
|
||||
} else {
|
||||
$content = html_print_table($table, true);
|
||||
@ -1327,7 +1327,7 @@ class DiscoveryTaskList extends HTML
|
||||
{
|
||||
$result = '<div class="flex">';
|
||||
$result .= '<div class="subtitle">';
|
||||
$result .= '<span>'._('Overall Progress').'</span>';
|
||||
$result .= '<span>'.__('Overall Progress').'</span>';
|
||||
$result .= '<div class="mrgn_top_25px">';
|
||||
$result .= progress_circular_bar(
|
||||
$task['id_rt'],
|
||||
|
@ -161,7 +161,7 @@ class ManageExtensions extends HTML
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'AR')) {
|
||||
if (users_is_admin($config['id_user']) === false) {
|
||||
db_pandora_audit(
|
||||
AUDIT_LOG_ACL_VIOLATION,
|
||||
'Trying to access Manage disco packages'
|
||||
@ -267,7 +267,7 @@ class ManageExtensions extends HTML
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => _('Manage disco packages'),
|
||||
'label' => __('Manage disco packages'),
|
||||
'selected' => 1,
|
||||
],
|
||||
]
|
||||
|
@ -907,7 +907,7 @@ if (check_login()) {
|
||||
if ($id_filter == -1) {
|
||||
$result_array['error'] = 1;
|
||||
$result_array['msg'] = ui_print_error_message(
|
||||
__('please, select a filter'),
|
||||
__('Please, select a filter'),
|
||||
'',
|
||||
true
|
||||
);
|
||||
@ -923,7 +923,7 @@ if (check_login()) {
|
||||
if ($filters['id_custom_fields'] == '') {
|
||||
$result_array['error'] = 1;
|
||||
$result_array['msg'] = ui_print_error_message(
|
||||
__('please, select a custom field'),
|
||||
__('Please, select a custom field'),
|
||||
'',
|
||||
true
|
||||
);
|
||||
@ -980,7 +980,7 @@ if (check_login()) {
|
||||
if ($id_filter == -1) {
|
||||
$result_array['error'] = 1;
|
||||
$result_array['msg'] = ui_print_error_message(
|
||||
__('please, select a filter'),
|
||||
__('Please, select a filter'),
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
@ -206,10 +206,7 @@ if ($get_double_auth_info_page) {
|
||||
$html .= '<div class="left_align">';
|
||||
$html .= '<p>';
|
||||
$html .= __('You are about to activate the double authentication').'. ';
|
||||
$html .= __(
|
||||
'With this option enabled, your account access will be more secure,
|
||||
cause a code generated by other application will be required after the login'
|
||||
).'. ';
|
||||
$html .= __('With this option enabled, your account access will be more secure, cause a code generated by other application will be required after the login').'. ';
|
||||
$html .= '</p>';
|
||||
$html .= '<p>';
|
||||
$html .= __('You will need to install the app from the following link before continue').'. ';
|
||||
|
@ -2535,7 +2535,7 @@ if ($drawConsoleSound === true) {
|
||||
]
|
||||
);
|
||||
$output .= '<span class="text-discovered-alerts">';
|
||||
$output .= __('Congrats! there’s nothing to show');
|
||||
$output .= __('Congrats! there\'s nothing to show');
|
||||
$output .= '</span>';
|
||||
$output .= '</div>';
|
||||
$output .= '<div class="elements-discovered-alerts"><ul></ul></div>';
|
||||
|
@ -39,7 +39,7 @@ $ajaxPage = 'include/ajax/welcome_window';
|
||||
$method = get_parameter('method', '');
|
||||
|
||||
if ($method === 'loadWelcomeWindow') {
|
||||
unset($config['welcome_state']);
|
||||
$config['welcome_state'] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -369,11 +369,7 @@ function process_user_login_remote($login, $pass, $api=false)
|
||||
|
||||
// The user does not exist and can not be created.
|
||||
if ($config['autocreate_remote_users'] == 0 || is_user_blacklisted($login)) {
|
||||
$config['auth_error'] = __(
|
||||
'Ooops User not found in
|
||||
database or incorrect password'
|
||||
);
|
||||
|
||||
$config['auth_error'] = __('Ooops User not found in database or incorrect password');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ class AgentDeployWizard
|
||||
$instructions_url = 'https://pandorafms.com/manual/en/documentation/pandorafms/installation/05_configuration_agents';
|
||||
}
|
||||
|
||||
$instructions_link = '<a class="green-link" style="font-size: 15px;" href="'.$instructions_url.'" target="_blank">'.__('view the following instructions').'</a>';
|
||||
$instructions_link = '<a class="green-link" style="font-size: 15px;" href="'.$instructions_url.'" target="_blank">'.__('View the following instructions').'</a>';
|
||||
|
||||
$more_info_link = html_print_div(
|
||||
[
|
||||
|
@ -1659,6 +1659,14 @@ class AgentWizard extends HTML
|
||||
$k = $matches[1].'_'.$matches[2].'-'.$matches[3];
|
||||
}
|
||||
} else {
|
||||
if (preg_match('/module-id_plugin/', $k) > 0) {
|
||||
$result[$value]['id_plugin'] = $data['module-id_plugin-'.$key];
|
||||
}
|
||||
|
||||
if (preg_match('/module-id_modulo/', $k) > 0) {
|
||||
$result[$value]['id_modulo'] = $data['module-id_modulo-'.$key];
|
||||
}
|
||||
|
||||
if (preg_match('/module-value/', $k) > 0
|
||||
&& empty($data[$k]) === false
|
||||
) {
|
||||
|
@ -953,10 +953,7 @@ class CalendarManager
|
||||
if ($specialDay->save() === true) {
|
||||
$success = true;
|
||||
} else {
|
||||
$reason = \__(
|
||||
'Failed saving special day: ',
|
||||
$config['dbconnection']->error
|
||||
);
|
||||
$reason = \__('Failed saving special day: %s', $config['dbconnection']->error);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
@ -1926,7 +1926,7 @@ class ConsoleSupervisor
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.PHP.CHROMIUM',
|
||||
'title' => __('chromium is not installed'),
|
||||
'title' => __('Chromium is not installed'),
|
||||
'message' => __('To be able to create images of the graphs for PDFs, please install the chromium extension. For that, it is necessary to follow these steps:'),
|
||||
'url' => $url,
|
||||
'icon_notification' => self::ICON_HEADSUP,
|
||||
@ -1989,7 +1989,7 @@ class ConsoleSupervisor
|
||||
[
|
||||
'type' => 'NOTIF.PHP.VERSION.SUPPORT',
|
||||
'title' => __('PHP UPDATE REQUIRED'),
|
||||
'message' => __('You should update your PHP version because it will be out of official support').'<br>'.__('Current PHP version: ').PHP_VERSION,
|
||||
'message' => __('You should update your PHP version because it will be out of official support').'<br>'.__('Current PHP version').': '.PHP_VERSION,
|
||||
'url' => $url,
|
||||
'icon_notification' => self::ICON_HEADSUP,
|
||||
]
|
||||
@ -2035,7 +2035,7 @@ class ConsoleSupervisor
|
||||
[
|
||||
'type' => 'NOTIF.MYSQL.VERSION',
|
||||
'title' => __('MYSQL UPDATE REQUIRED'),
|
||||
'message' => __('You should update your MYSQL version because it will be out of official support').'<br>'.__('Current MYSQL version: ').$mysql_version,
|
||||
'message' => __('You should update your MYSQL version because it will be out of official support').'<br>'.__('Current MYSQL version: %s', $mysql_version),
|
||||
'url' => $url,
|
||||
'icon_notification' => self::ICON_HEADSUP,
|
||||
]
|
||||
@ -2619,7 +2619,7 @@ class ConsoleSupervisor
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.API.ACCESS',
|
||||
'title' => __('Cannot access the Pandora FMS API '),
|
||||
'title' => __('Cannot access the Pandora FMS API'),
|
||||
'message' => __('Please check the configuration, some components may fail due to this misconfiguration in '.$server_name.' ('.$config['public_url'].')'),
|
||||
'icon_notification' => self::ICON_ERROR,
|
||||
]
|
||||
@ -3097,7 +3097,7 @@ class ConsoleSupervisor
|
||||
$this->notify(
|
||||
[
|
||||
'type' => 'NOTIF.HAMASTER.MESSAGE',
|
||||
'title' => __('Desynchronized operation on the node '.$node['host']),
|
||||
'title' => __('Desynchronized operation on the node %s', $node['host']),
|
||||
'message' => __($message),
|
||||
'url' => '__url__/index.php?sec=gservers&sec2=enterprise/godmode/servers/new_HA_cluster',
|
||||
'icon_notification' => self::ICON_ERROR,
|
||||
|
@ -751,7 +751,7 @@ class CredentialStore extends Wizard
|
||||
$identifier = get_parameter('identifier', null);
|
||||
|
||||
if (empty($identifier)) {
|
||||
$this->ajaxMsg('error', __('identifier cannot be empty'), true);
|
||||
$this->ajaxMsg('error', __('Identifier cannot be empty'), true);
|
||||
}
|
||||
|
||||
if (self::getKey($identifier) === false) {
|
||||
|
@ -495,7 +495,7 @@ class EventSound extends HTML
|
||||
$('#file-sound').change(function(){
|
||||
var ext = $('#file-sound').val().split('.').pop().toLowerCase();
|
||||
if($.inArray(ext, ['wav']) == -1) {
|
||||
alert('<?php __('invalid extension'); ?>');
|
||||
alert('<?php __('Invalid extension'); ?>');
|
||||
$('#file-sound').val('');
|
||||
}
|
||||
});
|
||||
|
@ -3120,7 +3120,7 @@ class NetworkMap
|
||||
html_print_input_text(
|
||||
'edit_name_node',
|
||||
'',
|
||||
__('name node'),
|
||||
__('Name node'),
|
||||
'20',
|
||||
'50',
|
||||
true
|
||||
@ -3132,7 +3132,7 @@ class NetworkMap
|
||||
html_print_input_text(
|
||||
'edit_name_fictional_node',
|
||||
'',
|
||||
__('name fictional node'),
|
||||
__('Name fictional node'),
|
||||
'20',
|
||||
'50',
|
||||
true
|
||||
@ -3502,7 +3502,7 @@ class NetworkMap
|
||||
html_print_input_text(
|
||||
'name_fictional_node',
|
||||
'',
|
||||
__('name fictional node'),
|
||||
__('Name fictional node'),
|
||||
'20',
|
||||
'50',
|
||||
true
|
||||
|
@ -398,7 +398,7 @@ class OrderInterpreter extends Wizard
|
||||
foreach ($this->pages_menu as $key => $value) {
|
||||
if (preg_match(
|
||||
'/.*'.io_safe_output($text).'.*/i',
|
||||
__('GO TO '.$value['name'])
|
||||
__('GO TO %s', $value['name'])
|
||||
) && $value['acl']
|
||||
) {
|
||||
if ($iterator <= 9 && $this->canShowItem($enterprise, $this->pages_menu[$key]['url'])) {
|
||||
@ -427,7 +427,7 @@ class OrderInterpreter extends Wizard
|
||||
echo '</ul>';
|
||||
if ($iterator > 10) {
|
||||
echo '<div class="more_results"><span class="">
|
||||
+ '.$more_results.' '.__('results found').'</span></div>';
|
||||
+ '.$more_results.' '.__('Results found').'</span></div>';
|
||||
}
|
||||
|
||||
if ($iterator === 0) {
|
||||
|
@ -598,7 +598,7 @@ class SatelliteAgent extends HTML
|
||||
if ($this->parseSatelliteConf('save', $values) === false) {
|
||||
$this->ajaxMsg('error', __('Error saving agent'));
|
||||
} else {
|
||||
$this->ajaxMsg('result', _('Host '.$values['addres'].' added.'));
|
||||
$this->ajaxMsg('result', __('Host %s added.', $values['addres']));
|
||||
}
|
||||
|
||||
exit;
|
||||
@ -640,8 +640,8 @@ class SatelliteAgent extends HTML
|
||||
$this->ajaxMsg(
|
||||
'result',
|
||||
($values['delete'] === '0')
|
||||
? _('Host '.$values['address'].' deleted.')
|
||||
: _('Host '.$values['address'].' added.'),
|
||||
? __('Host %s deleted.', $values['address'])
|
||||
: __('Host %s added.', $values['address']),
|
||||
true
|
||||
);
|
||||
}
|
||||
@ -685,8 +685,8 @@ class SatelliteAgent extends HTML
|
||||
$this->ajaxMsg(
|
||||
'result',
|
||||
($values['disable'] === '0')
|
||||
? _('Host '.$values['address'].' disabled.')
|
||||
: _('Host '.$values['address'].' enabled.'),
|
||||
? __('Host %s disabled.', $values['address'])
|
||||
: __('Host %s enabled.', $values['address']),
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
@ -305,7 +305,7 @@ class SatelliteCollection extends HTML
|
||||
if ($this->parseSatelliteConf('add', $short_name) === false) {
|
||||
$this->ajaxMsg('error', __('Error adding collection'));
|
||||
} else {
|
||||
$this->ajaxMsg('result', _('Collection '.$short_name.' added.'));
|
||||
$this->ajaxMsg('result', __('Collection %s added.', $short_name));
|
||||
}
|
||||
|
||||
exit;
|
||||
@ -324,7 +324,7 @@ class SatelliteCollection extends HTML
|
||||
if ($this->parseSatelliteConf('delete', $short_name) === false) {
|
||||
$this->ajaxMsg('error', __('Error deleting collection'));
|
||||
} else {
|
||||
$this->ajaxMsg('result', _('Collection '.$short_name.' deleted.'));
|
||||
$this->ajaxMsg('result', __('Collection %s deleted.', $short_name));
|
||||
}
|
||||
|
||||
exit;
|
||||
|
@ -447,7 +447,7 @@ class WelcomeWindow extends Wizard
|
||||
'direct' => 1,
|
||||
'block_content' => [
|
||||
[
|
||||
'label' => __('This is your post-installation status diagnostic:'),
|
||||
'label' => __('This is your post-installation status diagnostic'),
|
||||
'arguments' => [
|
||||
'class' => 'first_lbl',
|
||||
'name' => 'lbl_diagnosis',
|
||||
@ -599,8 +599,8 @@ class WelcomeWindow extends Wizard
|
||||
'content' => '
|
||||
<h2>'.__('Hi!').'</h2>
|
||||
<p class="mrgn_btn_5px">'.__('It seems you are new to Pandora FMS.').'<br />
|
||||
'.__('If you want to watch videos on how to use Pandora FMS, you can visit our ').'<a href="https://www.youtube.com/@PandoraFMS" target="_blank"><b>'.__('YouTube channel.').'</b></a></p>
|
||||
<p class="mrgn_top_5px">'.__('Are you familiar with ').'<a href="https://pandorafms.com/es/producto/elearning/" target="_blank"><b>'.__('our eLearning system?').'</b></a>'.__(' It\'s completely free for PAO (Operation) and PAT (Administration) courses. Learn how to use Pandora FMS at your own pace.').'</p>',
|
||||
'.__('If you want to watch videos on how to use Pandora FMS, you can visit our').' <a href="https://www.youtube.com/@PandoraFMS" target="_blank"><b>'.__('YouTube channel.').'</b></a></p>
|
||||
<p class="mrgn_top_5px">'.__('Are you familiar with').' <a href="https://pandorafms.com/es/producto/elearning/" target="_blank"><b>'.__('our eLearning system?').'</b></a>'.__(' It\'s completely free for PAO (Operation) and PAT (Administration) courses. Learn how to use Pandora FMS at your own pace.').'</p>',
|
||||
],
|
||||
true
|
||||
);
|
||||
@ -658,7 +658,7 @@ class WelcomeWindow extends Wizard
|
||||
],
|
||||
[
|
||||
'arguments' => [
|
||||
'label' => __('Let's do it!'),
|
||||
'label' => __('Let\'s do it!'),
|
||||
'type' => 'button',
|
||||
'attributes' => [
|
||||
'class' => 'secondary',
|
||||
|
@ -22,7 +22,7 @@ use DI\ContainerBuilder;
|
||||
/*
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC240521';
|
||||
$build_version = 'PC240530';
|
||||
$pandora_version = 'v7.0NG.776';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -2164,6 +2164,21 @@ function get_snmpwalk(
|
||||
return [];
|
||||
}
|
||||
|
||||
// Check if valid IP or DNS
|
||||
if (filter_var($ip_target, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6) === false &&
|
||||
preg_match('/^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*$/', $ip_target) !== 1
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Check if valid OID or MIB and not starting with dash (-)
|
||||
if ((preg_match('/^\.{0,1}(\d+(\.\d+)*){0,1}$/', $base_oid) !== 1 &&
|
||||
preg_match('/^[A-Za-z0-9-:]+(\.[A-Za-z0-9-:]+)*(?<![-:])$/', $base_oid) !== 1) ||
|
||||
preg_match('/^-/', $base_oid) === 1
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Note: quick_print is ignored
|
||||
// Fix for snmp port
|
||||
if (!empty($snmp_port)) {
|
||||
@ -4111,7 +4126,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
if ($show_elements_graph['unit']) {
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $show_elements_graph['unit'].': ';
|
||||
} else {
|
||||
if (isset($show_elements_graph['from_interface']) === true
|
||||
@ -4130,7 +4145,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= $value['module_name'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $value['unit'].': ';
|
||||
}
|
||||
} else {
|
||||
@ -4144,7 +4159,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= $value['module_name'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $value['unit'].'Baseline ';
|
||||
} else {
|
||||
$name_legend = $value['agent_alias'];
|
||||
@ -4189,7 +4204,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= $value['module_name'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $value['unit'].': ';
|
||||
} else {
|
||||
$name_legend .= $value['agent_alias'];
|
||||
@ -4231,7 +4246,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$config['csv_decimal_separator'],
|
||||
$config['csv_decimal_separator'] == ',' ? '.' : ','
|
||||
)
|
||||
).' '.$value['unit'].'</span> <span class="legend-font-small">'._('Avg.').' </span><span class="bolder">'.remove_right_zeros(
|
||||
).' '.$value['unit'].'</span> <span class="legend-font-small">'.__('Avg.').' </span><span class="bolder">'.remove_right_zeros(
|
||||
number_format(
|
||||
$value['avg'],
|
||||
$config['graph_precision'],
|
||||
@ -4273,7 +4288,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= $value['module_name'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $show_elements_graph['unit'].': ';
|
||||
} else {
|
||||
$name_legend .= $value['agent_alias'];
|
||||
@ -4301,7 +4316,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$config['thousand_separator']
|
||||
)
|
||||
).' '.$value['unit'];
|
||||
$data_return['legend'][$key] .= '</span> <span class="legend-font-small">'._('Avg:').' </span><span class="bolder">';
|
||||
$data_return['legend'][$key] .= '</span> <span class="legend-font-small">'.__('Avg:').' </span><span class="bolder">';
|
||||
$data_return['legend'][$key] .= remove_right_zeros(
|
||||
number_format(
|
||||
$value['avg'],
|
||||
@ -4350,7 +4365,7 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||
$name_legend .= __('of module').' ';
|
||||
$name_legend .= $value['agent_alias'].' / ';
|
||||
$name_legend .= $value['module_name'].' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= __('Unit').' ';
|
||||
$name_legend .= $show_elements_graph['unit'].': ';
|
||||
} else {
|
||||
$name_legend = __('Percentil').' ';
|
||||
|
@ -10345,7 +10345,7 @@ function api_set_module_data($id, $thrash2, $other, $trash1)
|
||||
if (false === @file_put_contents($config['remote_config'].'/'.io_safe_output($agent['nombre']).'.'.$idAgentModule.'.'.$time.'.data', $xml)) {
|
||||
returnError(sprintf('XML file could not be generated in path: %s', $config['remote_config']));
|
||||
} else {
|
||||
echo __('XML file was generated successfully in path: ').$config['remote_config'];
|
||||
echo __('XML file was generated successfully in path: %s', $config['remote_config']);
|
||||
returnData('string', ['type' => 'string', 'data' => $xml]);
|
||||
return;
|
||||
}
|
||||
@ -14614,7 +14614,7 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
|
||||
}
|
||||
|
||||
if (is_nan($graph_seconds) || $graph_seconds <= 0) {
|
||||
// returnError('error_module_graph', __(''));
|
||||
// returnError('error_module_graph', '');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -359,31 +359,31 @@ function config_update_config()
|
||||
}
|
||||
|
||||
if (config_update_value('identification_reminder', get_parameter('identification_reminder'), true) === false) {
|
||||
$error_update[] = __('Identification_reminder');
|
||||
$error_update[] = __('Identification reminder');
|
||||
}
|
||||
|
||||
if (config_update_value('include_agents', (bool) get_parameter('include_agents'), true) === false) {
|
||||
$error_update[] = __('Include_agents');
|
||||
$error_update[] = __('Include agents');
|
||||
}
|
||||
|
||||
if (config_update_value('alias_as_name', get_parameter('alias_as_name'), true) === false) {
|
||||
$error_update[] = __('alias_as_name');
|
||||
$error_update[] = __('Alias as name');
|
||||
}
|
||||
|
||||
if (config_update_value('keep_in_process_status_extra_id', get_parameter('keep_in_process_status_extra_id'), true) === false) {
|
||||
$error_update[] = __('keep_in_process_status_extra_id');
|
||||
$error_update[] = __('Keep in process status extra id');
|
||||
}
|
||||
|
||||
if (config_update_value('show_experimental_features', get_parameter('show_experimental_features'), true) === false) {
|
||||
$error_update[] = __('show_experimental_features');
|
||||
$error_update[] = __('Show experimental features');
|
||||
}
|
||||
|
||||
if (config_update_value('eastern_eggs_disabled', get_parameter('eastern_eggs_disabled'), true) === false) {
|
||||
$error_update[] = __('eastern_eggs_disabled');
|
||||
$error_update[] = __('Easter eggs disabled');
|
||||
}
|
||||
|
||||
if (config_update_value('number_modules_queue', get_parameter('number_modules_queue'), true) === false) {
|
||||
$error_update[] = __('number_modules_queue');
|
||||
$error_update[] = __('Number modules queue');
|
||||
}
|
||||
|
||||
if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) {
|
||||
@ -1912,35 +1912,35 @@ function config_update_config()
|
||||
|
||||
case 'pandorarc':
|
||||
if (config_update_value('ehorus_enabled', (int) get_parameter('ehorus_enabled', 0), true) === false) {
|
||||
$error_update[] = __('Enable eHorus');
|
||||
$error_update[] = __('Enable Ehorus');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_user_level_conf', (int) get_parameter('ehorus_user_level_conf', 0), true) === false) {
|
||||
$error_update[] = __('eHorus user login');
|
||||
$error_update[] = __('Ehorus user login');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_user', (string) get_parameter('ehorus_user', $config['ehorus_user']), true) === false) {
|
||||
$error_update[] = __('eHorus user');
|
||||
$error_update[] = __('Ehorus user');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_pass', (string) get_parameter('ehorus_pass', $config['ehorus_pass']), true, true) === false) {
|
||||
$error_update[] = __('eHorus password');
|
||||
$error_update[] = __('Ehorus password');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_hostname', (string) get_parameter('ehorus_hostname', $config['ehorus_hostname']), true) === false) {
|
||||
$error_update[] = __('eHorus API hostname');
|
||||
$error_update[] = __('Ehorus API hostname');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_port', (int) get_parameter('ehorus_port', $config['ehorus_port']), true) === false) {
|
||||
$error_update[] = __('eHorus API port');
|
||||
$error_update[] = __('Ehorus API port');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_req_timeout', (int) get_parameter('ehorus_req_timeout', $config['ehorus_req_timeout']), true) === false) {
|
||||
$error_update[] = __('eHorus request timeout');
|
||||
$error_update[] = __('Ehorus request timeout');
|
||||
}
|
||||
|
||||
if (config_update_value('ehorus_custom_field', (string) get_parameter('ehorus_custom_field', $config['ehorus_custom_field']), true) === false) {
|
||||
$error_update[] = __('eHorus id custom field');
|
||||
$error_update[] = __('Ehorus id custom field');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1991,7 +1991,7 @@ function config_update_config()
|
||||
|
||||
$ITSM_groups_agents_sync = get_parameter(
|
||||
'ITSM_groups_agents_sync',
|
||||
null
|
||||
''
|
||||
);
|
||||
|
||||
if (empty($ITSM_groups_agents_sync) === false) {
|
||||
@ -3958,7 +3958,7 @@ function config_process_config()
|
||||
}
|
||||
|
||||
if (!isset($config['ITSM_groups_agents_sync'])) {
|
||||
config_update_value('ITSM_groups_agents_sync', null);
|
||||
config_update_value('ITSM_groups_agents_sync', '');
|
||||
}
|
||||
|
||||
// Module Library.
|
||||
|
@ -3847,7 +3847,17 @@ function events_get_response_target(
|
||||
$eventObjt = new PandoraFMS\Event();
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true && (int) $server_id > 0) {
|
||||
$node = new Node($server_id);
|
||||
$node->connect();
|
||||
}
|
||||
|
||||
$event = db_get_row('tevento', 'id_evento', $event_id);
|
||||
|
||||
if (is_metaconsole() === true && $server_id > 0) {
|
||||
$node->disconnect();
|
||||
}
|
||||
|
||||
$target = io_safe_output(db_get_value('target', 'tevent_response', 'id', $event_response['id']));
|
||||
|
||||
// Replace parameters response.
|
||||
@ -3877,6 +3887,11 @@ function events_get_response_target(
|
||||
}
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true && (int) $server_id > 0) {
|
||||
$node = new Node($server_id);
|
||||
$node->connect();
|
||||
}
|
||||
|
||||
// Replace macros.
|
||||
if (strpos($target, '_agent_alias_') !== false) {
|
||||
$agente_table_name = 'tagente';
|
||||
@ -4238,6 +4253,10 @@ function events_get_response_target(
|
||||
);
|
||||
}
|
||||
|
||||
if (is_metaconsole() === true && $server_id > 0) {
|
||||
$node->disconnect();
|
||||
}
|
||||
|
||||
return $target;
|
||||
}
|
||||
|
||||
@ -5343,8 +5362,11 @@ function events_page_comments($event, $groupedComments=[], $filter=null)
|
||||
'<br><br><i>%s</i>',
|
||||
date($config['date_format'], $comm['utimestamp'])
|
||||
);
|
||||
|
||||
$data[1] = '<p class="break_word">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $comm['comment'])).'</p>';
|
||||
if (isset($config['events_format_urls']) === true && (bool) $config['events_format_urls'] === true) {
|
||||
$data[1] = io_safe_output($comm['comment']);
|
||||
} else {
|
||||
$data[1] = '<p class="break_word">'.stripslashes(str_replace(['\n', '\r'], '<br/>', $comm['comment'])).'</p>';
|
||||
}
|
||||
|
||||
$table_comments->data[] = $data;
|
||||
}
|
||||
@ -6022,7 +6044,7 @@ function get_row_response_action(
|
||||
$output .= __('Event # %d', $id_event);
|
||||
if (empty($command_str) === false) {
|
||||
$output .= ' ';
|
||||
$output .= __('Executing command: ');
|
||||
$output .= __('Executing command').': ';
|
||||
}
|
||||
|
||||
$output .= '</b>';
|
||||
|
@ -705,7 +705,7 @@ function menu_get_sec($with_categories=false)
|
||||
}
|
||||
|
||||
if ($in_godmode) {
|
||||
$category = __('Administration');
|
||||
$category = __('Management');
|
||||
} else {
|
||||
$category = __('Operation');
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ function config_wiz_modal(
|
||||
$output .= '</div>';
|
||||
|
||||
// Verification modal.
|
||||
$output .= '<div id="wiz_ensure_cancel" title="Confirmation Required" class="invisible">';
|
||||
$output .= '<div id="wiz_ensure_cancel" title="'.__('Confirmation Required').'" class="invisible">';
|
||||
$output .= '<div class="font_12_20">';
|
||||
$output .= __('Are you sure you don\'t want to configure a base email?');
|
||||
$output .= '<p>';
|
||||
|
@ -2283,7 +2283,7 @@ function reporting_event_report_group(
|
||||
}
|
||||
|
||||
if (!empty($content['style']['event_filter_exclude'])) {
|
||||
$return['subtitle'] .= ' ('.__('Exclude ').$content['style']['event_filter_exclude'].')';
|
||||
$return['subtitle'] .= ' ('.__('Exclude %s', $content['style']['event_filter_exclude']).')';
|
||||
}
|
||||
|
||||
$return['description'] = $content['description'];
|
||||
@ -8196,7 +8196,7 @@ function reporting_sql_auxiliary($report, $content, $pdf=false)
|
||||
}
|
||||
} else {
|
||||
$return['correct'] = 0;
|
||||
$return['error'] = __('Illegal query: Due to security restrictions, there are some tokens or words you cannot use: *, delete, drop, alter, modify, password, pass, insert or update.');
|
||||
$return['error'] = __('Illegal query: due to security restrictions, there are some tokens or words you cannot use: *, delete, drop, alter, modify, password, pass, insert or update.');
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -5395,43 +5395,43 @@ function reporting_html_availability($table, $item, $pdf=0)
|
||||
if ($item['fields']['total_time']) {
|
||||
$table1->head[2] = __('Total time');
|
||||
} else {
|
||||
$table1->head[2] = __('');
|
||||
$table1->head[2] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_failed']) {
|
||||
$table1->head[3] = __('Time failed');
|
||||
} else {
|
||||
$table1->head[3] = __('');
|
||||
$table1->head[3] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_in_ok_status']) {
|
||||
$table1->head[4] = __('Time OK');
|
||||
} else {
|
||||
$table1->head[4] = __('');
|
||||
$table1->head[4] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_in_warning_status']) {
|
||||
$table1->head[5] = __('Time in warning status');
|
||||
} else {
|
||||
$table1->head[5] = __('');
|
||||
$table1->head[5] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_in_unknown_status']) {
|
||||
$table1->head[6] = __('Time Unknown');
|
||||
} else {
|
||||
$table1->head[6] = __('');
|
||||
$table1->head[6] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_of_not_initialized_module']) {
|
||||
$table1->head[7] = __('Time Not Init Module');
|
||||
} else {
|
||||
$table1->head[7] = __('');
|
||||
$table1->head[7] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['time_of_downtime']) {
|
||||
$table1->head[8] = __('Time Downtime');
|
||||
} else {
|
||||
$table1->head[8] = __('');
|
||||
$table1->head[8] = '';
|
||||
}
|
||||
|
||||
$table1->head[9] = __('% Ok');
|
||||
@ -5489,31 +5489,31 @@ function reporting_html_availability($table, $item, $pdf=0)
|
||||
if ($item['fields']['total_checks']) {
|
||||
$table2->head[2] = __('Total checks');
|
||||
} else {
|
||||
$table2->head[2] = __('');
|
||||
$table2->head[2] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['checks_failed']) {
|
||||
$table2->head[3] = __('Checks failed');
|
||||
} else {
|
||||
$table2->head[3] = __('');
|
||||
$table2->head[3] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['checks_in_ok_status']) {
|
||||
$table2->head[4] = __('Checks OK');
|
||||
} else {
|
||||
$table2->head[4] = __('');
|
||||
$table2->head[4] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['checks_in_warning_status']) {
|
||||
$table2->head[5] = __('Checks Warning');
|
||||
} else {
|
||||
$table2->head[5] = __('');
|
||||
$table2->head[5] = '';
|
||||
}
|
||||
|
||||
if ($item['fields']['unknown_checks']) {
|
||||
$table2->head[6] = __('Checks Uknown');
|
||||
} else {
|
||||
$table2->head[6] = __('');
|
||||
$table2->head[6] = '';
|
||||
}
|
||||
|
||||
$table2->headstyle = [];
|
||||
|
@ -866,7 +866,7 @@ function reports_get_report_types($template=false, $not_editor=false)
|
||||
];
|
||||
$types['alert_report_agent'] = [
|
||||
'optgroup' => __('Alerts'),
|
||||
'name' => __('Agent alert report '),
|
||||
'name' => __('Agent alert report'),
|
||||
];
|
||||
|
||||
if (!$template) {
|
||||
@ -878,7 +878,7 @@ function reports_get_report_types($template=false, $not_editor=false)
|
||||
|
||||
$types['alert_report_actions'] = [
|
||||
'optgroup' => __('Alerts'),
|
||||
'name' => __('Actions alert report '),
|
||||
'name' => __('Actions alert report'),
|
||||
];
|
||||
|
||||
$types['event_report_module'] = [
|
||||
|
@ -138,7 +138,7 @@ function snmp_get_default_translations()
|
||||
'post_process' => '1',
|
||||
];
|
||||
$return['1.3.6.1.2.1.1.3.0'] = [
|
||||
'description' => __('system Up time'),
|
||||
'description' => __('System Up time'),
|
||||
'post_process' => '0.00000011574074',
|
||||
];
|
||||
|
||||
|
@ -7270,24 +7270,27 @@ function ui_print_comments($comment, $truncate_limit=255)
|
||||
|
||||
$short_comment = substr($comment['comment'], 0, 20);
|
||||
$comentario = $comment['comment'];
|
||||
if (isset($config['events_format_urls']) === true && (bool) $config['events_format_urls'] === true) {
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
} else {
|
||||
if (strlen($comentario) >= $truncate_limit) {
|
||||
$comentario = ui_print_truncate_text(
|
||||
$comentario,
|
||||
$truncate_limit,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'…',
|
||||
true,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
if (strlen($comentario) >= $truncate_limit) {
|
||||
$comentario = ui_print_truncate_text(
|
||||
$comentario,
|
||||
$truncate_limit,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'…',
|
||||
true,
|
||||
true,
|
||||
);
|
||||
}
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$comment['comment'].'';
|
||||
|
||||
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$short_comment.'...';
|
||||
if (strlen($comentario) > '200px' && $truncate_limit >= 255) {
|
||||
$comentario = '<i class="forced_title" data-use_title_for_force_title="1" data-title="'.date($config['date_format'], $comment['utimestamp']).'">'.ui_print_timestamp($comment['utimestamp'], true, ['style' => 'font-size: 10px; display: contents;', 'prominent' => 'compact']).' ('.$comment['id_user'].'): '.$short_comment.'...';
|
||||
}
|
||||
}
|
||||
|
||||
return $comentario;
|
||||
@ -8363,17 +8366,17 @@ function ui_print_status_secmon_div($status, $title=false)
|
||||
{
|
||||
$class = 'status_rounded_rectangles forced_title';
|
||||
if (($status) === 'normal') {
|
||||
$title = ($title === false) ? __('normal') : $title;
|
||||
$title = ($title === false) ? __('Normal') : $title;
|
||||
return ui_print_div('group_view_ok '.$class, $title);
|
||||
}
|
||||
|
||||
if (($status) === 'warning') {
|
||||
$title = ($title === false) ? __('warning') : $title;
|
||||
$title = ($title === false) ? __('Warning') : $title;
|
||||
return ui_print_div('group_view_warn '.$class, $title);
|
||||
}
|
||||
|
||||
if (($status) === 'critical') {
|
||||
$title = ($title === false) ? __('critical') : $title;
|
||||
$title = ($title === false) ? __('Critical') : $title;
|
||||
return ui_print_div('group_view_crit '.$class, $title);
|
||||
}
|
||||
}
|
||||
|
@ -12,12 +12,11 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Clippy
|
||||
*/
|
||||
|
||||
|
||||
function clippy_agent_out_of_limits()
|
||||
{
|
||||
$return_tours = [];
|
||||
@ -32,7 +31,7 @@ function clippy_agent_out_of_limits()
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'] = [];
|
||||
$return_tours['tours']['agent_out_of_limits']['steps'][] = [
|
||||
'init_step_context' => true,
|
||||
'intro' => '<table>'.'<tr>'.'<td class="context_help_title">'.__('Agent contact date passed it\'s ETA!.').'</td>'.'</tr>'.'<tr>'.'<td class="context_help_body">'.__('This happen when your agent stopped reporting or the server have any problem (too load or just down). Check also connectivity between the agent and the server.').'</td>'.'</tr>'.'</table>',
|
||||
'intro' => '<table>'.'<tr>'.'<td class="context_help_title">'.__('Agent contact date passed it\'s ETA!').'</td>'.'</tr>'.'<tr>'.'<td class="context_help_body">'.__('This happen when your agent stopped reporting or the server have any problem (too load or just down). Check also connectivity between the agent and the server.').'</td>'.'</tr>'.'</table>',
|
||||
];
|
||||
$return_tours['tours']['agent_out_of_limits']['conf'] = [];
|
||||
$return_tours['tours']['agent_out_of_limits']['conf']['autostart'] = false;
|
||||
|
@ -12,12 +12,11 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Clippy
|
||||
*/
|
||||
|
||||
|
||||
function clippy_start_page()
|
||||
{
|
||||
$return_tours = [];
|
||||
@ -36,7 +35,7 @@ function clippy_start_page()
|
||||
$return_tours['tours']['monitoring_server_step_3']['steps'][] = [
|
||||
'element' => "img[alt='Modules']",
|
||||
'position' => 'left',
|
||||
'intro' => __('Click in this tab..'),
|
||||
'intro' => __('Click in this tab'),
|
||||
];
|
||||
$return_tours['tours']['monitoring_server_step_3']['conf'] = [];
|
||||
$return_tours['tours']['monitoring_server_step_3']['conf']['show_bullets'] = 0;
|
||||
|
@ -12,12 +12,11 @@
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
|
||||
/**
|
||||
* @package Include
|
||||
* @subpackage Clippy
|
||||
*/
|
||||
|
||||
|
||||
function clippy_interval_agent_min()
|
||||
{
|
||||
$return_tours = [];
|
||||
@ -33,7 +32,7 @@ function clippy_interval_agent_min()
|
||||
$return_tours['tours']['interval_agent_min']['steps'][] = [
|
||||
'init_step_context' => true,
|
||||
'intro' => __('Please note that having agents with a monitoring interval below 300 seconds is not recommended. This will impact seriously in the performance of the server. For example, having 200 agents with one minute interval, is the same than having 1000 agents with a 5 minute interval. The probability of getting unknown modules is higher, and the impact on the server is higher because it requires a shorter response time.'),
|
||||
'title' => __('Interval Agent.'),
|
||||
'title' => __('Interval agent.'),
|
||||
'img' => html_print_image(
|
||||
'images/info-warning.svg',
|
||||
true,
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
137
pandora_console/include/languages/po_auto_translate.sh
Executable file
137
pandora_console/include/languages/po_auto_translate.sh
Executable file
@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE=$1
|
||||
|
||||
SOURCE_LANG="en"
|
||||
TARGET_LANG=$2
|
||||
|
||||
ID=""
|
||||
STR=""
|
||||
REAL_ID=""
|
||||
NEW_STR=""
|
||||
|
||||
READING_ID=0
|
||||
READING_STR=0
|
||||
|
||||
TARGET_LANG=$(echo "$TARGET_LANG" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
function help() {
|
||||
echo "Usage: $0 <path_to_file.po> <es|ja|ca|fr|ru>"
|
||||
}
|
||||
|
||||
function check_target_lang() {
|
||||
case $TARGET_LANG in
|
||||
es|ja|ca|fr|ru)
|
||||
return 0 # Valid
|
||||
;;
|
||||
*)
|
||||
return 1 # Invalid
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function translate_text() {
|
||||
local text="$1"
|
||||
|
||||
# URL encode the text
|
||||
local encoded_text=$(echo -n "$text" | jq -sRr @uri)
|
||||
|
||||
# Google Translate API endpoint
|
||||
local url="https://translate.googleapis.com/translate_a/single?client=gtx&sl=$SOURCE_LANG&tl=$TARGET_LANG&dt=t&q=$encoded_text"
|
||||
|
||||
# Send GET request to Google Translate API
|
||||
local translated_text=$(curl -s "$url" | jq -r '.[0][][0]' | tr -d '\n')
|
||||
|
||||
echo "$translated_text"
|
||||
}
|
||||
|
||||
if command -v jq &> /dev/null; then
|
||||
if check_target_lang && [ "$FILE" != "" ] && [ -f $FILE ]; then
|
||||
|
||||
while IFS= read -r line; do
|
||||
|
||||
if [[ $line == "#"* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$line" == "" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $line == msgid* ]]; then
|
||||
|
||||
# Check if ID is not empty (i.e., if this is not the first ID)
|
||||
if [ -n "$ID" ]; then
|
||||
|
||||
if [ "$ID" != "" ]; then
|
||||
if [ "$STR" == "" ]; then
|
||||
STR=$(translate_text "$ID")
|
||||
fi
|
||||
|
||||
echo "msgid ${REAL_ID}"$'\n'"msgstr \"${STR}\""$'\n'
|
||||
REAL_ID=""
|
||||
ID=""
|
||||
STR=""
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
READING_ID=1
|
||||
READING_STR=0
|
||||
# Initialize ID with the content after "msgid "
|
||||
TMP="${line#msgid }"
|
||||
REAL_ID="${TMP}"
|
||||
TMP="${TMP#\"}"
|
||||
ID="${TMP%\"}"
|
||||
|
||||
elif [[ $line == msgstr* ]]; then
|
||||
|
||||
READING_ID=0
|
||||
READING_STR=1
|
||||
# Initialize STR with the content after "msgstr "
|
||||
TMP="${line#msgstr }"
|
||||
TMP="${TMP#\"}"
|
||||
STR="${TMP%\"}"
|
||||
|
||||
else
|
||||
|
||||
# If reading ID, append to ID
|
||||
if [ $READING_ID -eq 1 ]; then
|
||||
REAL_ID="${REAL_ID}"$'\n'"${line}"
|
||||
TMP="${line#\"}"
|
||||
TMP="${TMP%\"}"
|
||||
ID="$ID$TMP"
|
||||
# If reading STR, append to STR
|
||||
elif [ $READING_STR -eq 1 ]; then
|
||||
TMP="${line#\"}"
|
||||
TMP="${TMP%\"}"
|
||||
STR="$STR$TMP"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done < $FILE
|
||||
|
||||
if [ "$ID" != "" ]; then
|
||||
if [ "$STR" == "" ]; then
|
||||
STR=$(translate_text "$ID")
|
||||
fi
|
||||
|
||||
echo "msgid ${REAL_ID}"$'\n'"msgstr \"${STR}\""$'\n'
|
||||
REAL_ID=""
|
||||
ID=""
|
||||
STR=""
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
help
|
||||
echo
|
||||
echo "[ERROR] File [$FILE] not found or not valid language [$TARGET_LANG]"
|
||||
|
||||
fi
|
||||
else
|
||||
|
||||
echo "[ERROR] Command needed to run script: jq"
|
||||
|
||||
fi
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo Reading php files...
|
||||
find ../.. -type "f" | grep -v .svn | grep -v .bzr | grep .php > temp666
|
||||
find ../../../.. -type "f" | grep -v .svn | grep -v .bzr | grep .php > temp666
|
||||
|
||||
echo Creating template "index.pot"
|
||||
xgettext -f temp666 -L PHP -o index.pot --from-code=iso-8859-1 --keyword=__
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user