Merge remote-tracking branch 'origin/develop' into ent-7074-Command-Center

This commit is contained in:
Daniel Barbero Martin 2021-04-28 08:13:10 +02:00
commit 2cd40a80fe
54 changed files with 460 additions and 309 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.754-210427
Version: 7.0NG.754-210428
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210427"
pandora_version="7.0NG.754-210428"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1015,7 +1015,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.754';
use constant AGENT_BUILD => '210427';
use constant AGENT_BUILD => '210428';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210427
%define release 210428
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.754
%define release 210427
%define release 210428
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210427"
PI_BUILD="210428"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{210427}
{210428}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.754(Build 210427)")
#define PANDORA_VERSION ("7.0NG.754(Build 210428)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.754(Build 210427))"
VALUE "ProductVersion", "(7.0NG.754(Build 210428))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.754-210427
Version: 7.0NG.754-210428
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210427"
pandora_version="7.0NG.754-210428"
package_pear=0
package_pandora=1

View File

@ -196,6 +196,7 @@ function mainModuleGroups()
ON ta.id_agente = tam.id_agente
WHERE ta.disabled = 0
AND tam.disabled = 0
AND tam.id_modulo <> 0
AND tam.delete_pending = 0
AND ta.id_grupo IN (%s)
GROUP BY tam.id_agente_modulo

View File

@ -1096,8 +1096,13 @@ function resource_registration_extension_main()
}
$xml = simplexml_load_file($_FILES['resource_upload']['tmp_name'], null, LIBXML_NOCDATA);
process_upload_xml($xml);
if ($xml === false) {
ui_print_error_message(
__('Error uploading resource. Check if the selected file is a valid resource template in .ptr format')
);
} else {
process_upload_xml($xml);
}
}

View File

@ -53,8 +53,8 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clus
<?php
if (check_acl($config['id_user'], 0, 'PM')) {
echo "<div id='create_master_window' class='invisible'></div>";
echo "<div id='msg' class='invisible'></div>";
echo "<div id='create_master_window' style='display: none'></div>";
echo "<div id='msg' style='display: none'></div>";
?>
<input onclick="show_create_ha_cluster();" type="submit" class="button_task ui_toggle" value="<?php echo __('Add new node'); ?>" />
<?php

View File

@ -1072,6 +1072,7 @@ foreach ($modules as $module) {
[
'alt' => __('Enable module'),
'title' => __('Enable module'),
'class' => 'invert_filter_important',
]
).'</a>';
} else {

View File

@ -91,6 +91,7 @@ if ($al_action !== false) {
true
);
}
$is_in_group = true;
}
@ -177,7 +178,7 @@ $table->data[0][1] = html_print_input_text(
'',
'',
'',
$is_central_policies_on_node | $disabled
($is_central_policies_on_node | $disabled)
);
if (io_safe_output($name) == 'Monitoring Event') {
@ -213,7 +214,7 @@ $table->data[1][1] = '<div class="w250px inline">'.html_print_select_groups(
false,
true,
'',
$is_central_policies_on_node | $disabled
($is_central_policies_on_node | $disabled)
).'</div>';
$table->colspan[1][1] = 2;
@ -247,7 +248,7 @@ $table->data[2][1] = html_print_select_from_sql(
true,
false,
false,
$is_central_policies_on_node | $disabled
($is_central_policies_on_node | $disabled)
);
$table->data[2][1] .= ' ';
if ($is_central_policies_on_node === false
@ -274,7 +275,7 @@ $table->data[3][1] = html_print_extended_select_for_time(
false,
true,
'',
$is_central_policies_on_node | $disabled,
($is_central_policies_on_node | $disabled),
false,
'',
false,
@ -306,11 +307,21 @@ $table->data[5][2] = html_print_textarea(
true
);
$table->data[6][0] = __('Create workunit on recovery').ui_print_help_tip(
// Selector will work only with Integria activated.
$integriaIdName = 'integria_wu';
$table->data[$integriaIdName][0] = __('Create workunit on recovery').ui_print_help_tip(
__('If closed status is set on recovery, a workunit will be added to the ticket in Integria IMS rather that closing the ticket.'),
true
);
$table->data[6][1] = html_print_checkbox_switch_extended('create_wu_integria', 1, $create_wu_integria, false, '', $disabled_attr, true);
$table->data[$integriaIdName][1] = html_print_checkbox_switch_extended(
'create_wu_integria',
1,
$create_wu_integria,
false,
'',
$disabled_attr,
true
);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$table->data['field'.$i][0] = html_print_image(
@ -344,7 +355,7 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
}
echo '<form method="post" action="'.'index.php?sec='.$sec.'&'.'sec2=godmode/alerts/alert_actions&'.'pure='.$pure.'">';
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&pure='.$pure.'">';
$table_html = html_print_table($table, true);
echo $table_html;
@ -392,6 +403,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
$(document).ready (function () {
var original_command;
var origicommand_descriptionnal_command;
var integriaWorkUnitName = "<?php echo $integriaIdName; ?>";
if (<?php echo (int) $id_command; ?>) {
original_command = "<?php echo str_replace("\r\n", '<br>', addslashes(io_safe_output(alerts_get_alert_command_command($id_command)))); ?>";
@ -593,6 +605,13 @@ $(document).ready (function () {
}
// Allow create workunit if Integria IMS Ticket is selected.
if (data['id'] == '14') {
$("#table_macros-"+integriaWorkUnitName).css('display', 'table-row');
} else {
$("#table_macros-"+integriaWorkUnitName).css('display', 'none');
}
var max_fields = parseInt('<?php echo $config['max_macro_fields']; ?>');
// Change the selected group

View File

@ -44,7 +44,7 @@ $sec2 = safe_url_extraclean($sec2);
$sec = get_parameter_get('sec');
$sec = safe_url_extraclean($sec);
// Layers
// Layers.
$layer_ids = get_parameter('layer_ids', []);
$layers = get_parameter('layers', []);
$layer_list = [];
@ -84,9 +84,10 @@ switch ($action) {
$map_default_latitude = get_parameter('map_default_latitude');
$map_default_altitude = get_parameter('map_default_altitude');
$map_group_id = get_parameter('map_group_id');
$map_levels_zoom = get_parameter('map_levels_zoom');
$map_levels_zoom = get_parameter('map_levels_zoom', 16);
$map_connection_list_temp = explode(',', get_parameter('map_connection_list'));
$listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection');
foreach ($map_connection_list_temp as $index => $value) {
@ -99,14 +100,14 @@ switch ($action) {
$map_connection_default = get_parameter('map_connection_default');
$map_connection_list = [];
foreach ($map_connection_list_temp as $idMapConnection) {
foreach ($listConnectionTemp as $idMapConnection) {
$default = 0;
if ($map_connection_default == $idMapConnection) {
if ($map_connection_default == $idMapConnection['id_tmap_connection']) {
$default = 1;
}
$map_connection_list[] = [
'id_conection' => $idMapConnection,
'id_conection' => $idMapConnection['id_tmap_connection'],
'default' => $default,
];
}
@ -124,7 +125,7 @@ switch ($action) {
$map_levels_zoom
);
if (empty($invalidFields) && get_parameter('map_connection_list') != '') {
if (empty($invalidFields)) {
$idMap = gis_save_map(
$map_name,
$map_initial_longitude,
@ -139,8 +140,13 @@ switch ($action) {
$map_connection_list,
$layer_list
);
$mapCreatedOk = true;
$next_action = 'update_saved';
if ($idMap) {
$mapCreatedOk = true;
$next_action = 'update_saved';
} else {
$next_action = 'save_new';
$mapCreatedOk = false;
}
} else {
$next_action = 'save_new';
$mapCreatedOk = false;
@ -168,7 +174,7 @@ switch ($action) {
$map_group_id = '';
$map_connection_list = [];
$layer_list = [];
$map_levels_zoom = 0;
$map_levels_zoom = 16;
break;
case 'edit_map':
@ -188,9 +194,12 @@ switch ($action) {
$map_default_latitude = get_parameter('map_default_latitude');
$map_default_altitude = get_parameter('map_default_altitude');
$map_group_id = get_parameter('map_group_id');
$map_levels_zoom = get_parameter('map_levels_zoom');
$map_levels_zoom = get_parameter('map_levels_zoom', 16);
$map_connection_list_temp = explode(',', get_parameter('map_connection_list'));
$listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection');
foreach ($map_connection_list_temp as $index => $value) {
$cleanValue = trim($value);
if ($cleanValue == '') {
@ -201,14 +210,14 @@ switch ($action) {
$map_connection_default = get_parameter('map_connection_default');
$map_connection_list = [];
foreach ($map_connection_list_temp as $idMapConnection) {
foreach ($listConnectionTemp as $idMapConnection) {
$default = 0;
if ($map_connection_default == $idMapConnection) {
if ($map_connection_default == $idMapConnection['id_tmap_connection']) {
$default = 1;
}
$map_connection_list[] = [
'id_conection' => $idMapConnection,
'id_conection' => $idMapConnection['id_tmap_connection'],
'default' => $default,
];
}
@ -226,7 +235,7 @@ switch ($action) {
$map_levels_zoom
);
if (empty($invalidFields) && get_parameter('map_connection_list') != '') {
if (empty($invalidFields)) {
// TODO
gis_update_map(
$idMap,
@ -263,7 +272,7 @@ switch ($action) {
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&map_id='.$idMap.'&action='.$next_action;
$buttons['gis_maps_list'] = [
'active' => true,
'active' => false,
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/list.png',
true,
@ -275,7 +284,7 @@ $buttons['gis_maps_list'] = [
];
if ($idMap) {
$buttons['view_gis'] = [
'active' => true,
'active' => false,
'text' => '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'">'.html_print_image(
'images/op_gis.png',
true,
@ -457,7 +466,7 @@ $table->data[1][0] = __('Add Map connection').$iconError;
$table->data[1][1] = "<table class='no-class' border='0' id='map_connection'>
<tr>
<td >
".html_print_select($listConnection, 'map_connection', '', '', '', '0', true)."
".html_print_select($listConnection, 'map_connection_list', '', '', '', '0', true)."
</td>
<td >
<a href='javascript: addConnectionMap();'>".html_print_image(
@ -504,7 +513,11 @@ $table->data[2][1] = html_print_select_groups(
);
$table->data[3][0] = __('Default zoom');
$table->data[3][1] = html_print_input_text('map_zoom_level', $map_zoom_level, '', 2, 4, true).html_print_input_hidden('map_levels_zoom', $map_levels_zoom, true);
$table->data[3][1] = html_print_input_text('map_zoom_level', $map_zoom_level, '', 2, 4, true).html_print_input_hidden(
'map_levels_zoom',
$map_levels_zoom,
true
);
$table->data[4][0] = __('Center Latitude').':';
$table->data[4][1] = html_print_input_text('map_initial_latitude', $map_initial_latitude, '', 8, 8, true);
@ -571,6 +584,9 @@ $params['hidden_input_idagent_name'] = 'agent_id';
$params['input_name'] = 'agent_alias';
$params['value'] = '';
$params['javascript_function_action_after_select'] = 'active_button_add_agent';
$params['javascript_is_function_select'] = true;
$params['disabled_javascript_on_blur_function'] = false;
$table->data[1][1] .= ui_print_agent_autocomplete_input($params);
@ -585,7 +601,7 @@ $table->data[1][1] .= '</td>
</td>
</tr>';
// Group items
// Group items.
$group_select = html_print_select_groups($config['id_user'], 'AR', false, 'layer_group_id', '', '', '', 0, true);
$params = [];
$params['return'] = true;
@ -597,8 +613,10 @@ $params['input_name'] = 'agent_alias_for_data';
$params['value'] = '';
$params['javascript_function_action_after_select'] = 'toggleAddGroupBtn';
$params['selectbox_group'] = 'layer_group_id';
// Filter by group
$params['disabled_javascript_on_blur_function'] = true;
$params['javascript_is_function_select'] = true;
// Filter by group.
$params['disabled_javascript_on_blur_function'] = false;
$agent_for_group_input = ui_print_agent_autocomplete_input($params);
$add_group_btn = html_print_button(__('Add'), 'add_group', true, '', 'class="sub add"', true);

View File

@ -63,7 +63,7 @@ if (is_ajax() === true) {
$group = [
'id_grupo' => 0,
'nombre' => 'None',
'icon' => '',
'icon' => 'world',
'parent' => 0,
'disabled' => 0,
'custom_id' => null,

View File

@ -742,7 +742,7 @@ switch ($action) {
}
$own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'RM')) {
if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'RM') || check_acl($config['id_user'], 0, 'RR')) {
$return_all_group = true;
} else {
$return_all_group = false;

View File

@ -278,26 +278,26 @@ if ($mapConnectionData != null) {
}
}
// Open Street Map Connection.
$optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.htmlentities(
__('Tile Server URL'),
ENT_QUOTES,
'UTF-8'
).':</td>'.'<td><input id="type" type="hidden" name="type" value="OSM" />'.html_print_input_text(
'url',
$mapConnectionDataUrl,
'',
45,
90,
true
).'</td>'.'</tr>'.'</table>';
// Open Street Map Connection.
$optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%"><tr class="row_0"><td>'.htmlentities(
__('Tile Server URL'),
ENT_QUOTES,
'UTF-8'
).':</td><td><input id="type" type="hidden" name="type" value="OSM" />'.html_print_input_text(
'url',
$mapConnectionDataUrl,
'',
45,
90,
true
).'</td></tr></table>';
// Google Maps Connection.
$gmaps_types['G_PHYSICAL_MAP'] = __('Google Physical');
$gmaps_types['G_HYBRID_MAP'] = __('Google Hybrid');
$gmaps_types['G_SATELITE_MAP'] = __('Google Satelite');
// TODO: Use label tags for the forms.
$optionsConnectionGmapTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="90%">'.'<tr class="row_0">'.'<td>'.__('Google Map Type').':</td>'.'<td><input id="type" type="hidden" name="type" value="Gmap" />'.trim(
$optionsConnectionGmapTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="90%"><tr class="row_0"><td>'.__('Google Map Type').':</td><td><input id="type" type="hidden" name="type" value="Gmap" />'.trim(
html_print_select(
$gmaps_types,
'gmap_type',
@ -305,181 +305,223 @@ $optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4"
'',
'',
0,
true
true,
false,
true,
'',
false,
false,
false,
false,
false,
'',
false,
false,
false,
false,
false
)
).'</td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Google Maps Key').':</td>'.'</tr>'.'<tr class="row_3">'.'<td colspan="2">'.html_print_input_text(
).'</td></tr><tr class="row_2"><td>'.__('Google Maps Key').':</td></tr><tr class="row_3"><td colspan="2">'.html_print_input_text(
'gmap_key',
$gmap_key,
'',
90,
128,
true
).'</td>'.'</tr>'.'</table>';
).'</td></tr></table>';
// Image Map Connection.
$optionsConnectionImageTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('Image URL').':</td>'.'<td colspan="3"><input id="type" type="hidden" name="type" value="Static_Image" />'.html_print_input_text(
$optionsConnectionImageTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%"><tr class="row_0"><td>'.__('Image URL').':</td><td colspan="3"><input id="type" type="hidden" name="type" value="Static_Image" />'.html_print_input_text(
'url',
$mapConnectionDataUrl,
'',
45,
90,
true
).'</td>'.'</tr>'.'<tr class="row_1">'.'<td colspan="4"><strong>'.__('Corners of the area of the image').':</strong></td>'.'</tr>'.'<tr class="row_2">'.'<td>'.__('Left').':</td>'.'<td>'.html_print_input_text(
).'</td></tr><tr class="row_1"><td colspan="4"><strong>'.__('Corners of the area of the image').':</strong></td></tr><tr class="row_2"><td>'.__('Left').':</td><td>'.html_print_input_text(
'bb_left',
$bb_left,
'',
25,
25,
true
).'</td>'.'<td>'.__('Bottom').':</td>'.'<td>'.html_print_input_text(
).'</td><td>'.__('Bottom').':</td><td>'.html_print_input_text(
'bb_bottom',
$bb_bottom,
'',
25,
25,
true
).'</td>'.'</tr>'.'<tr class="row_3">'.'<td>'.__('Right').':</td>'.'<td>'.html_print_input_text(
).'</td></tr><tr class="row_3"><td>'.__('Right').':</td><td>'.html_print_input_text(
'bb_right',
$bb_right,
'',
25,
25,
true
).'</td>'.'<td>'.__('Top').':</td>'.'<td>'.html_print_input_text(
).'</td><td>'.__('Top').':</td><td>'.html_print_input_text(
'bb_top',
$bb_top,
'',
25,
25,
true
).'</td>'.'</tr>'.'<tr class="row_4">'.'<td colspan="4"><strong>'.__('Image Size').':</strong></td>'.'</tr>'.'<tr class="row_5">'.'<td>'.__('Width').':</td>'.'<td>'.html_print_input_text('image_width', $image_width, '', 25, 25, true).'</td>'.'<td>'.__('Height').':</td>'.'<td>'.html_print_input_text('image_height', $image_height, '', 25, 25, true).'</td>'.'</tr>'.'</table>';
).'</td></tr><tr class="row_4"><td colspan="4"><strong>'.__('Image Size').':</strong></td></tr><tr class="row_5"><td>'.__('Width').':</td><td>'.html_print_input_text(
'image_width',
$image_width,
'',
25,
25,
true
).'</td><td>'.__('Height').':</td><td>'.html_print_input_text(
'image_height',
$image_height,
'',
25,
25,
true
).'</td></tr></table>';
// WMS Server Connection.
$optionsConnectionWMSTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">'.'<tr class="row_0">'.'<td>'.__('WMS Server URL').'</td>'.'<td>'.'<input id="type" type="hidden" name="type" value="WMS" />'.html_print_input_text('url', $mapConnectionDataUrl, '', 90, 255, true).'</td>'.'</tr>'.'<tr class="row_1">'.'<td>'.__('Layers').'</td>'.'<td>'.html_print_input_text('layers', $layers, '', 90, 255, true).'</td>'.'</tr>'.'</table>';
// WMS Server Connection.
$optionsConnectionWMSTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%"><tr class="row_0"><td>'.__('WMS Server URL').'</td><td><input id="type" type="hidden" name="type" value="WMS" />'.html_print_input_text(
'url',
$mapConnectionDataUrl,
'',
90,
255,
true
).'</td></tr><tr class="row_1"><td>'.__('Layers').'</td><td>'.html_print_input_text(
'layers',
$layers,
'',
90,
255,
true
).'</td></tr></table>';
if ($mapConnectionData != null) {
switch ($mapConnection_type) {
case 'OSM':
$optionsConnectionTypeTable = $optionsConnectionOSMTable;
break;
if ($mapConnectionData != null) {
switch ($mapConnection_type) {
case 'OSM':
$optionsConnectionTypeTable = $optionsConnectionOSMTable;
break;
case 'Gmap':
$optionsConnectionTypeTable = $optionsConnectionGmapTable;
break;
case 'Gmap':
$optionsConnectionTypeTable = $optionsConnectionGmapTable;
break;
case 'Static_Image':
$optionsConnectionTypeTable = $optionsConnectionImageTable;
break;
case 'Static_Image':
$optionsConnectionTypeTable = $optionsConnectionImageTable;
break;
case 'WMS':
$optionsConnectionTypeTable = $optionsConnectionWMSTable;
break;
case 'WMS':
$optionsConnectionTypeTable = $optionsConnectionWMSTable;
break;
default:
// Default.
break;
default:
// Default.
break;
}
}
}
echo "<div id='form_map_connection_type'>".$optionsConnectionTypeTable.'</div>';
echo "<div id='form_map_connection_type'>".$optionsConnectionTypeTable.'</div>';
echo '<h4>'.__('Preview to select the center of the map and the default position of an agent without gis data').'</h4><br>';
html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub"');
echo '<br /><br />';
echo "<div id='map' class='map_gis_step2'></div>";
echo '<h4>'.__('Preview to select the center of the map and the default position of an agent without gis data').'</h4><br>';
html_print_button(__('Load preview map'), 'button_refresh', false, 'refreshMapView();', 'class="sub next"');
echo '<br /><br />';
echo "<div id='map' class='map_gis_step2'></div>";
$table->width = '60%';
$table->data = [];
$table->width = '60%';
$table->data = [];
// $table->colspan[0][3] = 3;
$table->data[0][0] = '';
$table->data[0][1] = __('Map Center');
$table->data[0][2] = __('Default position for agents without GIS data');
// $table->colspan[0][3] = 3;
$table->data[0][0] = '';
$table->data[0][1] = __('Map Center');
$table->data[0][2] = __('Default position for agents without GIS data');
$table->data[1][0] = __('Change in the map');
$table->data[1][1] = html_print_radio_button_extended(
'radio_button',
1,
'',
1,
false,
'changeSetManualPosition(true, false)',
'',
true
);
$table->data[1][2] = html_print_radio_button_extended(
'radio_button',
2,
'',
0,
false,
'changeSetManualPosition(false, true)',
'',
true
);
$table->data[1][0] = __('Change in the map');
$table->data[1][1] = html_print_radio_button_extended(
'radio_button',
1,
'',
1,
false,
'changeSetManualPosition(true, false)',
'',
true
);
$table->data[1][2] = html_print_radio_button_extended(
'radio_button',
2,
'',
0,
false,
'changeSetManualPosition(false, true)',
'',
true
);
$table->data[2][0] = __('Latitude');
$table->data[2][1] = html_print_input_text(
'center_latitude',
$mapConnection_centerLatitude,
'',
10,
10,
true
);
$table->data[2][2] = html_print_input_text(
'default_latitude',
$mapConnection_defaultLatitude,
'',
10,
10,
true
);
$table->data[2][0] = __('Latitude');
$table->data[2][1] = html_print_input_text(
'center_latitude',
$mapConnection_centerLatitude,
'',
10,
10,
true
);
$table->data[2][2] = html_print_input_text(
'default_latitude',
$mapConnection_defaultLatitude,
'',
10,
10,
true
);
$table->data[3][0] = __('Longitude');
$table->data[3][1] = html_print_input_text(
'center_longitude',
$mapConnection_centerLongitude,
'',
10,
10,
true
);
$table->data[3][2] = html_print_input_text(
'default_longitude',
$mapConnection_defaultLongitude,
'',
10,
10,
true
);
$table->data[3][0] = __('Longitude');
$table->data[3][1] = html_print_input_text(
'center_longitude',
$mapConnection_centerLongitude,
'',
10,
10,
true
);
$table->data[3][2] = html_print_input_text(
'default_longitude',
$mapConnection_defaultLongitude,
'',
10,
10,
true
);
$table->data[4][0] = __('Altitude');
$table->data[4][1] = html_print_input_text(
'center_altitude',
$mapConnection_centerAltitude,
'',
10,
10,
true
);
$table->data[4][2] = html_print_input_text(
'default_altitude',
$mapConnection_defaultAltitude,
'',
10,
10,
true
);
html_print_table($table);
$table->data[4][0] = __('Altitude');
$table->data[4][1] = html_print_input_text(
'center_altitude',
$mapConnection_centerAltitude,
'',
10,
10,
true
);
$table->data[4][2] = html_print_input_text(
'default_altitude',
$mapConnection_defaultAltitude,
'',
10,
10,
true
);
html_print_table($table);
echo '<div class="action-buttons w90p left">';
html_print_submit_button(__('Save'), '', false, 'class="sub save wand"');
echo '</div>';
echo '</form>';
echo '<div class="action-buttons w90p float-left">';
html_print_submit_button(__('Save'), '', false, 'class="sub save wand"');
echo '</div>';
echo '</form>';
ui_require_javascript_file('OpenLayers/OpenLayers');
ui_require_javascript_file('openlayers.pandora');
?>
ui_require_javascript_file('OpenLayers/OpenLayers');
ui_require_javascript_file('openlayers.pandora');
?>
<script type="text/javascript">
var setCenter = true;
var centerPoint = null;
@ -649,7 +691,6 @@ function selMapConnectionType() {
$('#form_map_connection_type').html('<?php echo $optionsConnectionOSMTable; ?>').hide();
break;
case 'Gmap':
// TODO: Validate there is a key, and use it
$('#form_map_connection_type').html('<?php echo $optionsConnectionGmapTable; ?>').hide();
break;
case 'Static_Image':

View File

@ -402,6 +402,8 @@ if ($load_filter_modal) {
);
echo '<div id="load-filter-select" class="load-filter-modal">';
echo '<form method="post" id="form_load_filter">';
$table = new StdClass;
$table->id = 'load_filter_form';
$table->width = '100%';
@ -441,13 +443,15 @@ if ($load_filter_modal) {
__('Load filter'),
'load_filter',
false,
'class="sub upd" onclick="load_form_filter();"',
'class="sub upd"',
true
);
$data[1] .= html_print_input_hidden('load_filter', 1, true);
$table->data[] = $data;
$table->rowclass[] = '';
html_print_table($table);
echo '</form>';
echo '</div>';
?>
<script type="text/javascript">
@ -460,7 +464,8 @@ function show_filter() {
width: 450
});
}
//aki
function load_form_filter() {
jQuery.post (
"<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",

View File

@ -2840,13 +2840,7 @@ class NetworkMap
*/
public function loadSimpleInterface()
{
$output = '<div id="open_version_dialog" class="invisible">';
$output .= __(
'In the Open version of %s can not be edited nodes or map',
get_product_name()
);
$output .= '</div>';
$output = '';
$output .= '<div id="dialog_node_edit" class="invisible" title="';
$output .= __('Edit node').'">';
$output .= '<div class="left w100p">';
@ -2896,6 +2890,12 @@ class NetworkMap
$id = 'dialog_node_edit';
if (!enterprise_installed()) {
$id = 'open_version_dialog';
$output = '<div id="open_version" style="display: none" title="'.__('Warning').'">';
$output .= '<div class="center mrgn_top_20px w90p font_13px">'.__(
'In the Open version of %s can not be edited nodes or map',
get_product_name()
);
$output .= '</div></div>';
}
$output .= '<div id="'.$id.'" class="invisible" title="';

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC210427';
$build_version = 'PC210428';
$pandora_version = 'v7.0NG.754';
// Do not overwrite default timezone set if defined.

View File

@ -200,8 +200,20 @@ function config_update_config()
$error_update[] = __('Use cert.');
}
if (!config_update_value('attachment_store', (string) get_parameter('attachment_store'))) {
$attachment_store = (string) get_parameter('attachment_store');
if (file_exists($attachment_store) === false
|| is_writable($attachment_store) === false
) {
$error_update[] = __('Attachment store');
$error_update[] .= __(
"Path doesn't exists or is not writable"
);
} else {
if (config_update_value('attachment_store', $attachment_store) === false) {
$error_update[] = __(
'Attachment store.'
);
}
}
if (!config_update_value('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'))) {

View File

@ -1092,8 +1092,15 @@ function events_get_all(
// User comment.
if (!empty($filter['user_comment'])) {
// For filter field.
$sql_filters[] = sprintf(
' AND lower(te.user_comment) like lower("%%%s%%") ',
io_safe_input($filter['user_comment'])
);
// For show comments on event details.
$sql_filters[] = sprintf(
' OR lower(te.user_comment) like lower("%%%s%%") ',
$filter['user_comment']
);
}
@ -4313,6 +4320,12 @@ function events_page_details($event, $server='')
$serverstring = '';
}
$table_class = 'table_modal_alternate';
if ($config['style'] === 'pandora_black') {
$table_class = 'black_table_modal_alternate';
}
// Details.
$table_details = new stdClass;
$table_details->width = '100%';
@ -4320,7 +4333,7 @@ function events_page_details($event, $server='')
$table_details->head = [];
$table_details->cellspacing = 0;
$table_details->cellpadding = 0;
$table_details->class = 'table_modal_alternate';
$table_details->class = $table_class;
/*
* Useless switch.

View File

@ -971,7 +971,7 @@ function gis_save_map(
]
);
// Angent
if ((isset($layer['layer_agent_list'])) and (count($layer['layer_agent_list']) > 0)) {
if ((isset($layer['layer_agent_list'])) && (count($layer['layer_agent_list']) > 0)) {
foreach ($layer['layer_agent_list'] as $agent) {
db_process_sql_insert(
'tgis_map_layer_has_tagente',
@ -984,7 +984,7 @@ function gis_save_map(
}
// Group
if ((isset($layer['layer_group_list'])) and (count($layer['layer_group_list']) > 0)) {
if ((isset($layer['layer_group_list'])) && (count($layer['layer_group_list']) > 0)) {
foreach ($layer['layer_group_list'] as $group) {
db_process_sql_insert(
'tgis_map_layer_groups',
@ -1386,55 +1386,55 @@ function gis_validate_map_data(
echo "<style type='text/css'>";
// validateMap
// ValidateMap.
if ($map_name == '') {
echo 'input[name=map_name] {background: #FF5050;}';
$invalidFields['map_name'] = true;
}
// validate zoom level
// Validate zoom level.
if (($map_zoom_level == '') || ($map_zoom_level > $map_levels_zoom)) {
echo 'input[name=map_zoom_level] {background: #FF5050;}';
$invalidFields['map_zoom_level'] = true;
}
// validate map_initial_longitude
// Validate map_initial_longitude.
if ($map_initial_longitude == '') {
echo 'input[name=map_initial_longitude] {background: #FF5050;}';
$invalidFields['map_initial_longitude'] = true;
}
// validate map_initial_latitude
// Validate map_initial_latitude.
if ($map_initial_latitude == '') {
echo 'input[name=map_initial_latitude] {background: #FF5050;}';
$invalidFields['map_initial_latitude'] = true;
}
// validate map_initial_altitude
// Validate map_initial_altitude.
if ($map_initial_altitude == '') {
echo 'input[name=map_initial_altitude] {background: #FF5050;}';
$invalidFields['map_initial_altitude'] = true;
}
// validate map_default_longitude
// Validate map_default_longitude.
if ($map_default_longitude == '') {
echo 'input[name=map_default_longitude] {background: #FF5050;}';
$invalidFields['map_default_longitude'] = true;
}
// validate map_default_latitude
// Validate map_default_latitude.
if ($map_default_latitude == '') {
echo 'input[name=map_default_latitude] {background: #FF5050;}';
$invalidFields['map_default_latitude'] = true;
}
// validate map_default_altitude
// Validate map_default_altitude.
if ($map_default_altitude == '') {
echo 'input[name=map_default_altitude] {background: #FF5050;}';
$invalidFields['map_default_altitude'] = true;
}
// validate map_default_altitude
// Validate map_default_altitude.
if ($map_connection_list == '') {
$invalidFields['map_connection_list'] = true;
}

View File

@ -1939,7 +1939,7 @@ function html_print_extended_select_for_time(
html_print_select(
$units,
$uniq_name.'_units',
1,
'60',
''.$script,
$nothing,
$nothing_value,

View File

@ -706,7 +706,7 @@ function modules_create_agent_module(
}
// Update module status count if the module is not created disabled.
if (!isset($values['disabled']) || $values['disabled'] == 0) {
if ((!isset($values['disabled']) || $values['disabled'] == 0) && $values['id_modulo'] > 0) {
if ($status == 0) {
db_process_sql(
'UPDATE tagente

View File

@ -239,7 +239,7 @@ function get_notification_source_targets(int $id_source, ?string $subtype=null)
}
$filter = sprintf(
' AND ns.`subtype_blacklist` NOT LIKE "%%%s%%"',
' AND (ns.`subtype_blacklist` IS NULL OR ns.`subtype_blacklist` NOT LIKE "%%%s%%") ',
$subtype
);
}

View File

@ -343,6 +343,7 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
INNER JOIN tagente_modulo tam
ON tae.id_agente_modulo = tam.id_agente_modulo
AND tam.disabled = 0
AND tam.id_modulo <> 0
GROUP BY estado',
$user_groups_ids
)
@ -358,6 +359,7 @@ function tactical_get_data($id_user=false, $user_strict=false, $acltags, $return
INNER JOIN tagente_modulo tam
ON tae.id_agente_modulo = tam.id_agente_modulo
AND tam.disabled = 0
AND tam.id_modulo <> 0
LEFT JOIN tagent_secondary_group tasg
ON ta.id_agente = tasg.id_agent
WHERE (ta.id_grupo IN ( %s ) OR tasg.id_group IN ( %s ))

View File

@ -236,6 +236,9 @@ function vbar_graph(
// Grid color axes x.
if (isset($options['x']['color']) === false) {
$options['x']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
$options['x']['color'] = '#222';
}
}
if (isset($options['x']['labelWidth']) === false) {
@ -300,7 +303,7 @@ function vbar_graph(
$options['y']['font']['color'] = '#545454';
if ($config['style'] === 'pandora_black') {
$options['y']['font']['color'] = '#fff';
$options['y']['font']['color'] = '#222';
}
}
@ -317,6 +320,9 @@ function vbar_graph(
// Grid color axes y.
if (isset($options['y']['color']) === false) {
$options['y']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
$options['y']['color'] = '#222';
}
}
if (isset($options['y']['labelWidth']) === false) {
@ -352,6 +358,9 @@ function vbar_graph(
if (isset($options['grid']['color']) === false) {
$options['grid']['color'] = '#ffffff';
if ($config['style'] === 'pandora_black') {
$options['grid']['color'] = '#222';
}
}
if (isset($options['grid']['backgroundColor']) === false) {
@ -361,6 +370,14 @@ function vbar_graph(
'#ffffff',
],
];
if ($config['style'] === 'pandora_black') {
$options['grid']['backgroundColor'] = [
'colors' => [
'#222',
'#222',
],
];
}
}
if (isset($options['grid']['margin']) === false) {

View File

@ -879,6 +879,7 @@ function edit_node(data_node, dblClick) {
); // It doesn't eval the possible XSS so it's ok
$("#dialog_node_edit").dialog("open");
$("#open_version_dialog").dialog();
$("#open_version").dialog();
if (node_selected.id_agent == undefined || node_selected.type == 3) {
//Fictional node

View File

@ -54,7 +54,8 @@ table.databox,
.white_box,
input.sub,
.introjs-tooltip,
button.sub {
button.sub,
.bg_general {
background-color: #222 !important;
color: #fff;
}
@ -242,11 +243,20 @@ div#foot {
/* events.css */
table.table_modal_alternate tr:nth-child(odd) td {
background-color: #222;
background-color: #222 !important;
}
table.table_modal_alternate tr:nth-child(even) td {
background-color: #111;
background-color: #111 !important;
}
/* events.css */
table.black_table_modal_alternate tr:nth-child(odd) td {
background-color: #222 !important;
}
table.black_table_modal_alternate tr:nth-child(even) td {
background-color: #111 !important;
}
/* tables.css */
@ -945,3 +955,11 @@ div.integria_details_description textarea {
.fill_fff {
fill: #fff !important;
}
.module_graph_menu_header,
.module_graph_menu_content {
background-color: #222 !important;
}
.invert_filter_important {
filter: invert(100%) !important;
}

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.754';
$build = '210427';
$build = '210428';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -64,8 +64,14 @@ if (file_exists('../../include/languages/'.$user_language.'.mo')) {
$l10n->load_tables();
}
global $config;
echo '<link rel="stylesheet" href="../../include/styles/pandora.css" type="text/css"/>';
if ($config['style'] === 'pandora_black') {
echo '<link rel="stylesheet" href="../../include/styles/pandora_black.css" type="text/css"/>';
}
$id = get_parameter('id');
$id_agent = db_get_value(
'id_agente',
@ -129,7 +135,7 @@ ui_print_message_dialog(
};
</script>
</head>
<body class='bg_white'>
<body class='bg_general'>
<?php
// Module id.
$id = (int) get_parameter('id', 0);

View File

@ -446,21 +446,35 @@ if (is_ajax()) {
* Load user default form.
*/
$user_filter = db_get_row_sql(
sprintf(
'SELECT f.id_filter, f.id_name
FROM tevent_filter f
INNER JOIN tusuario u
ON u.default_event_filter=f.id_filter
WHERE u.id_user = "%s" ',
$config['id_user']
)
);
$load_filter_id = (int) get_parameter('filter_id', 0);
if ($load_filter_id === 0) {
// Load user filter.
$loaded_filter = db_get_row_sql(
sprintf(
'SELECT f.id_filter, f.id_name
FROM tevent_filter f
INNER JOIN tusuario u
ON u.default_event_filter=f.id_filter
WHERE u.id_user = "%s" ',
$config['id_user']
)
);
} else {
// Load filter selected by user.
$loaded_filter['id_filter'] = $load_filter_id;
$loaded_filter['id_name'] = db_get_value(
'id_name',
'tevent_filter',
'id_filter',
$load_filter_id
);
}
// Do not load the user filter if we come from the 24h event graph.
$from_event_graph = get_parameter('filter[from_event_graph]', $filter['from_event_graph']);
if ($user_filter !== false && $from_event_graph != 1) {
$filter = events_get_event_filter($user_filter['id_filter']);
if ($loaded_filter !== false && $from_event_graph != 1) {
$filter = events_get_event_filter($loaded_filter['id_filter']);
if ($filter !== false) {
$id_group = $filter['id_group'];
$event_type = $filter['event_type'];
@ -1057,7 +1071,7 @@ if (empty($severity) && $severity !== '0') {
$data = html_print_select(
get_priorities(),
'severity',
$severity,
explode(',', $severity),
'',
__('All'),
-1,
@ -1138,6 +1152,23 @@ $params['hidden_input_idagent_name'] = 'id_agent';
$params['hidden_input_idagent_value'] = $id_agent;
$params['size'] = '';
if ($id_agent !== null) {
if (is_metaconsole()) {
$metaconsole_agent = db_get_row_sql(
sprintf(
'SELECT alias, server_name
FROM tmetaconsole_agent
WHERE id_tagente = "%d" ',
$id_agent
)
);
$params['value'] = $metaconsole_agent['alias'].' ('.$metaconsole_agent['server_name'].')';
} else {
$params['value'] = agents_get_alias($id_agent);
}
}
$data = ui_print_agent_autocomplete_input($params);
$in = '<div class="filter_input"><label>'.__('Agent search').'</label>';
$in .= $data.'</div>';
@ -1212,6 +1243,11 @@ $in .= $data.'</div>';
$adv_inputs[] = $in;
if (is_metaconsole()) {
if (empty($id_source_event) === true) {
$id_source_event = '';
}
$input_id_source_event = (empty($id_source_event) === true) ? '' : $id_source_event;
$data = html_print_input_text(
'id_source_event',
$id_source_event,
@ -1225,6 +1261,9 @@ if (is_metaconsole()) {
$adv_inputs[] = $in;
}
if ($date_from === '0000-00-00') {
$date_from = '';
}
// Date from.
$data = html_print_input_text(
@ -1251,32 +1290,14 @@ $in = '<div class="filter_input">';
$in .= '<div class="filter_input_little"><label>'.__('Date from').'</label>';
$in .= $data.'</div>';
// Time from.
$data = html_print_input_text(
'time_from',
$time_from,
'',
false,
10,
true,
// Disabled.
false,
// Required.
false,
// Function.
'',
// Class.
'',
// OnChange.
'',
// Autocomplete.
'off'
);
$in .= '<div class="filter_input_little"><label>'.__('Time from').'</label>';
$data = '';
$in .= $data.'</div>';
$in .= '</div>';
$adv_inputs[] = $in;
if ($date_to === '0000-00-00') {
$date_to = '';
}
// Date to.
$data = html_print_input_text(
'date_to',
@ -1302,33 +1323,10 @@ $in = '<div class="filter_input">';
$in .= '<div class="filter_input_little"><label>'.__('Date to').'</label>';
$in .= $data.'</div>';
// Time to.
$data = html_print_input_text(
'time_to',
$time_to,
'',
false,
10,
true,
// Disabled.
false,
// Required.
false,
// Function.
'',
// Class.
'',
// OnChange.
'',
// Autocomplete.
'off'
);
$in .= '<div class="filter_input_little"><label>'.__('Time to').'</label>';
$data = '';
$in .= $data.'</div>';
$in .= '</div>';
$adv_inputs[] = $in;
// Tags.
if (is_metaconsole()) {
$data = '<fieldset><legend class="pdd_0px">'.__('Events with following tags').'</legend>'.html_print_table($tabletags_with, true).'</fieldset>';
@ -1472,8 +1470,8 @@ try {
$active_filters_div .= '<div>';
$active_filters_div .= '<div class="label box-shadow">'.__('Current filter').'</div>';
$active_filters_div .= '<div id="current_filter" class="content">';
if ($user_filter !== false) {
$active_filters_div .= io_safe_output($user_filter['id_name']);
if ($loaded_filter !== false) {
$active_filters_div .= io_safe_output($loaded_filter['id_name']);
} else {
$active_filters_div .= __('Not set.');
}

View File

@ -119,6 +119,16 @@ $has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_i
$buttons = [];
$buttons['gis_maps_list'] = [
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
'images/list.png',
true,
[
'title' => __('GIS Maps list'),
'class' => 'invert_filter',
]
).'</a>',
];
if ($config['pure'] == 0) {
$buttons[]['text'] = '<a href="index.php?sec=gismaps&amp;sec2=operation/gis_maps/render_view&amp;map_id='.$idMap.'&amp;refr='.((int) get_parameter('refr', 0)).'&amp;pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>';
} else {
@ -193,7 +203,7 @@ if ($layers != false) {
$layer['id_tmap_layer']
);
// calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB.
// Calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB.
$agentNamesByGroup = [];
if ($layer['tgrupo_id_grupo'] >= 0) {
$agentNamesByGroup = agents_get_group_agents(
@ -239,7 +249,7 @@ if ($layers != false) {
$icon_width = $icon_size[0];
$icon_height = $icon_size[1];
// Is a group item
// Is a group item.
if (!empty($groupsByAgentId[$idAgent])) {
$groupId = (int) $groupsByAgentId[$idAgent]['id'];
$groupName = $groupsByAgentId[$idAgent]['name'];

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210427
%define release 210428
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210427
%define release 210428
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.754
%define release 210427
%define release 210428
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.754-210427
Version: 7.0NG.754-210428
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.754-210427"
pandora_version="7.0NG.754-210428"
package_cpan=0
package_pandora=1

View File

@ -433,10 +433,6 @@ snmp_threads 4
transactionalserver 0
# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threads 1
# Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threshold 2

View File

@ -499,10 +499,6 @@ snmp_threads 4
transactionalserver 0
# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threads 1
# Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threshold 2

View File

@ -427,10 +427,6 @@ snmp_threads 4
transactionalserver 0
# Number of threads for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threads 1
# Threshold for the Transactional Server (PANDORA FMS ENTERPRISE ONLY).
transactional_threshold 2

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210427";
my $pandora_build = "210428";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -260,7 +260,6 @@ sub pandora_load_config {
$pa_config->{"webserver"} = 1; # 3.0
$pa_config->{"web_timeout"} = 60; # 6.0SP5
$pa_config->{"transactionalserver"} = 0; # Default 0, introduced on 6.1
$pa_config->{"transactional_threads"} = 1; # Default 1, introduced on 6.1
$pa_config->{"transactional_threshold"} = 2; # Default 2, introduced on 6.1
$pa_config->{"transactional_pool"} = $pa_config->{"incomingdir"} . "/" . "trans"; # Default, introduced on 6.1
$pa_config->{'snmp_logfile'} = "/var/log/pandora_snmptrap.log";
@ -747,9 +746,6 @@ sub pandora_load_config {
elsif ($parametro =~ m/^transactionalserver\s+([0-9]*)/i) {
$pa_config->{'transactionalserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactional_threads\s+([0-9]*)/i) {
$pa_config->{'transactional_threads'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactional_threshold\s+([0-9]*\.{0,1}[0-9]*)/i) {
$pa_config->{'transactional_threshold'}= clean_blank($1);
}

View File

@ -5936,7 +5936,7 @@ sub pandora_update_agent_module_count ($$$) {
}; # Module counts by status.
# Retrieve and hash module status counts.
my @rows = get_db_rows ($dbh, 'SELECT estado, COUNT(*) AS total FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled=0 AND tagente_modulo.id_agente_modulo=tagente_estado.id_agente_modulo AND tagente_modulo.id_agente=?GROUP BY estado', $agent_id);
my @rows = get_db_rows ($dbh, 'SELECT estado, COUNT(*) AS total FROM tagente_modulo, tagente_estado WHERE tagente_modulo.disabled=0 AND tagente_modulo.id_modulo<>0 AND tagente_modulo.id_agente_modulo=tagente_estado.id_agente_modulo AND tagente_modulo.id_agente=?GROUP BY estado', $agent_id);
foreach my $row (@rows) {
$counts->{$row->{'estado'}} = $row->{'total'};
$total += $row->{'total'};

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.754";
my $pandora_build = "210427";
my $pandora_build = "210428";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -491,11 +491,11 @@ sub sendmail {
|| return fail("send AUTH LOGIN failed (lost connection?)");
socket_read()
|| return fail("AUTH LOGIN failed: $server_reply");
socket_write(encode_base64($auth->{user},$CRLF))
socket_write(encode_base64($auth->{user}, ""), $CRLF)
|| return fail("send LOGIN username failed (lost connection?)");
socket_read()
|| return fail("LOGIN username failed: $server_reply");
socket_write(encode_base64($auth->{password},$CRLF))
socket_write(encode_base64($auth->{password}, ""), $CRLF)
|| return fail("send LOGIN password failed (lost connection?)");
socket_read()
|| return fail("LOGIN password failed: $server_reply");
@ -504,7 +504,7 @@ sub sendmail {
warn "Trying AUTH PLAIN\n" if ($mailcfg{debug} > 9);
socket_write(
"AUTH PLAIN "
. encode_base64(join("\0", $auth->{user}, $auth->{user}, $auth->{password}), $CRLF)
. encode_base64(join("\0", $auth->{user}, $auth->{user}, $auth->{password}), ""), $CRLF
) || return fail("send AUTH PLAIN failed (lost connection?)");
socket_read()
|| return fail("AUTH PLAIN failed: $server_reply");
@ -518,7 +518,7 @@ sub sendmail {
|| return fail("AUTH CRAM-MD5 failed: $server_reply");
$challenge =~ s/^\d+\s+//;
my $response = _hmac_md5($auth->{password}, decode_base64($challenge));
socket_write(encode_base64("$auth->{user} $response", $CRLF))
socket_write(encode_base64("$auth->{user} $response", ""), $CRLF)
|| return fail("AUTH CRAM-MD5 failed: $server_reply");
socket_read()
|| return fail("AUTH CRAM-MD5 failed: $server_reply");

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210427
%define release 210428
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.754
%define release 210427
%define release 210428
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.754"
PI_BUILD="210427"
PI_BUILD="210428"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.754 PS210427";
my $version = "7.0NG.754 PS210428";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.754 PS210427";
my $version = "7.0NG.754 PS210428";
# save program name for logging
my $progname = basename($0);