Merge branch 'ent-5575-wizard-de-modulos-y-recon-by-steps' of brutus.artica.es:artica/pandorafms into ent-5575-wizard-de-modulos-y-recon-by-steps

This commit is contained in:
Jose Gonzalez 2020-03-31 10:45:37 +02:00
commit 6cad02635e
36 changed files with 5328 additions and 5284 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.744-200326 Version: 7.0NG.744-200331
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.744" PI_VERSION="7.0NG.744"
PI_BUILD="200326" PI_BUILD="200331"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{200326} {200331}
ViewReadme ViewReadme
{Yes} {Yes}

View File

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

View File

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

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.744-200326 Version: 7.0NG.744-200331
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -2,6 +2,8 @@ START TRANSACTION;
ALTER TABLE trecon_task MODIFY COLUMN `id_network_profile` TEXT; ALTER TABLE trecon_task MODIFY COLUMN `id_network_profile` TEXT;
ALTER TABLE `trecon_task` CHANGE COLUMN `create_incident` `review_mode` TINYINT(1) UNSIGNED DEFAULT 0; ALTER TABLE `trecon_task` CHANGE COLUMN `create_incident` `review_mode` TINYINT(1) UNSIGNED DEFAULT 0;
ALTER TABLE `trecon_task` ADD COLUMN `subnet_csv` TINYINT(1) UNSIGNED DEFAULT 0;
UPDATE `trecon_task` SET `review_mode` = 1; UPDATE `trecon_task` SET `review_mode` = 1;
ALTER TABLE trecon_task add column `auto_monitor` TINYINT(1) UNSIGNED DEFAULT 1 AFTER `auth_strings`; ALTER TABLE trecon_task add column `auto_monitor` TINYINT(1) UNSIGNED DEFAULT 1 AFTER `auth_strings`;
UPDATE `trecon_task` SET `auto_monitor` = 0; UPDATE `trecon_task` SET `auto_monitor` = 0;

View File

@ -1685,7 +1685,8 @@ ALTER TABLE `trecon_task` ADD COLUMN `type` int(11) NOT NULL DEFAULT '0',
MODIFY COLUMN `autoconfiguration_enabled` tinyint(1) unsigned NULL DEFAULT '0', MODIFY COLUMN `autoconfiguration_enabled` tinyint(1) unsigned NULL DEFAULT '0',
MODIFY COLUMN `summary` text NULL, MODIFY COLUMN `summary` text NULL,
MODIFY COLUMN `id_network_profile` text, MODIFY COLUMN `id_network_profile` text,
CHANGE COLUMN `create_incident` `review_mode` TINYINT(1) UNSIGNED DEFAULT 0; CHANGE COLUMN `create_incident` `review_mode` TINYINT(1) UNSIGNED DEFAULT 0,
ADD COLUMN `subnet_csv` TINYINT(1) UNSIGNED DEFAULT 0;
-- Old recon always report. -- Old recon always report.
UPDATE `trecon_task` SET `review_mode` = 1; UPDATE `trecon_task` SET `review_mode` = 1;

View File

@ -300,9 +300,50 @@ class HostDevices extends Wizard
$comment = get_parameter('comment', ''); $comment = get_parameter('comment', '');
$server_id = get_parameter('id_recon_server', ''); $server_id = get_parameter('id_recon_server', '');
$network = get_parameter('network', ''); $network = get_parameter('network', '');
$network_csv_enabled = (bool) get_parameter_switch(
'network_csv_enabled',
false
);
$id_group = get_parameter('id_group', ''); $id_group = get_parameter('id_group', '');
$interval = get_parameter('interval', 0); $interval = get_parameter('interval', 0);
if ($network_csv_enabled) {
if ($_FILES['network_csv']['type'] != 'text/csv') {
$this->msg = __(
'Invalid mimetype for csv file: %s',
$_FILES['network_csv']['type']
);
return false;
}
$network = preg_split(
"/\n|,|;/",
trim(
file_get_contents(
$_FILES['network_csv']['tmp_name']
)
)
);
unlink($_FILES['network_csv']['tmp_name']);
if (empty($network) || is_array($network) === false) {
$this->msg = __(
'Invalid content readed from csv file: %s',
$_FILES['network_csv']['name']
);
return false;
}
// Sanitize.
$network = array_unique($network);
$network = array_filter(
$network,
function ($item) {
return (!empty($item));
}
);
$network = join(',', $network);
}
if (isset($task_id) === true) { if (isset($task_id) === true) {
// We're updating this task. // We're updating this task.
$task = db_get_row( $task = db_get_row(
@ -338,6 +379,7 @@ class HostDevices extends Wizard
&& $server_id == null && $server_id == null
&& empty($id_group) === true && empty($id_group) === true
&& empty($network) === true && empty($network) === true
&& empty($network_csv) === true
&& $interval === 0 && $interval === 0
) { ) {
// Default values, no data received. // Default values, no data received.
@ -385,6 +427,7 @@ class HostDevices extends Wizard
$this->task['id_recon_server'] = $server_id; $this->task['id_recon_server'] = $server_id;
$this->task['id_group'] = $id_group; $this->task['id_group'] = $id_group;
$this->task['interval_sweep'] = $interval; $this->task['interval_sweep'] = $interval;
$this->task['subnet_csv'] = $network_csv_enabled;
if (isset($this->task['id_rt']) === false) { if (isset($this->task['id_rt']) === false) {
// Create. // Create.
@ -701,7 +744,7 @@ class HostDevices extends Wizard
$form['rows'][0]['columns'][0] = [ $form['rows'][0]['columns'][0] = [
'width' => '30%', 'width' => '30%',
'style' => 'padding: 9px;', 'style' => 'padding: 9px;min-width: 250px;',
'inputs' => [ 'inputs' => [
'0' => [ '0' => [
'arguments' => [ 'arguments' => [
@ -728,7 +771,10 @@ class HostDevices extends Wizard
'name' => 'interval_manual_defined', 'name' => 'interval_manual_defined',
'return' => true, 'return' => true,
], ],
'extra' => '<span id="interval_manual_container">'.html_print_extended_select_for_time( 'extra' => '<div id="interval_manual_container"><div class="time_selection_container">'.ui_print_help_tip(
__('The minimum recomended interval for Recon Task is 5 minutes'),
true
).html_print_extended_select_for_time(
'interval', 'interval',
$this->task['interval_sweep'], $this->task['interval_sweep'],
'', '',
@ -738,10 +784,7 @@ class HostDevices extends Wizard
true, true,
false, false,
false false
).ui_print_help_tip( ).'</div></div>',
__('The minimum recomended interval for Recon Task is 5 minutes'),
true
).'</span>',
], ],
], ],
@ -751,6 +794,7 @@ class HostDevices extends Wizard
'width' => '40%', 'width' => '40%',
'padding-right' => '12%', 'padding-right' => '12%',
'padding-left' => '5%', 'padding-left' => '5%',
'style' => 'min-width: 350px',
'inputs' => [ 'inputs' => [
'0' => [ '0' => [
'label' => '<b>'.__('Task name').':</b>', 'label' => '<b>'.__('Task name').':</b>',
@ -783,6 +827,54 @@ class HostDevices extends Wizard
], ],
], ],
'2' => [ '2' => [
'label' => '<b>'.__('Use CSV file definition').':</b>'.ui_print_help_tip(
__('Define targets using csv o network definition.'),
true
),
'class' => 'no-margin',
'arguments' => [
'name' => 'network_csv_enabled',
'value' => $this->task['subnet_csv'],
'type' => 'switch',
'inline' => true,
'class' => 'discovery_full_width_input',
'onclick' => 'toggleNetwork(this);',
],
],
'3' => [
'hidden' => (($this->task['subnet_csv'] == '1') ? 0 : 1),
'block_id' => 'csv_subnet',
'block_content' => [
[
'label' => '<b>'.__('Networks (csv)').':</b>'.ui_print_help_tip(
__('You can upload a CSV file. Each line must contain a network in IP/MASK format. For instance: 192.168.1.1/32'),
true
),
'arguments' => [
'name' => 'network_csv',
'type' => 'file',
'columns' => 25,
'rows' => 10,
'class' => 'discovery_full_width_input',
],
],
[
'label' => '<b>'.__('Networks (current)').':</b>'.ui_print_help_tip(
__('Plese upload a new file to overwrite this content.'),
true
),
'arguments' => [
'attributes' => 'readonly',
'type' => 'textarea',
'size' => 25,
'value' => $this->task['subnet'],
],
],
],
],
'4' => [
'hidden' => (($this->task['subnet_csv'] == '1') ? 1 : 0),
'id' => 'std_subnet',
'label' => '<b>'.__('Network').':</b>'.ui_print_help_tip( 'label' => '<b>'.__('Network').':</b>'.ui_print_help_tip(
__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), __('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'),
true true
@ -817,6 +909,7 @@ class HostDevices extends Wizard
$form['rows'][0]['columns'][2] = [ $form['rows'][0]['columns'][2] = [
'width' => '30%', 'width' => '30%',
'style' => 'min-width: 250px',
'inputs' => ['0' => $group_select], 'inputs' => ['0' => $group_select],
]; ];
@ -846,8 +939,9 @@ class HostDevices extends Wizard
} }
$form['form'] = [ $form['form'] = [
'method' => 'POST', 'method' => 'POST',
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).$task_url, 'enctype' => 'multipart/form-data',
'action' => $this->url.'&mode=netscan&page='.($this->page + 1).$task_url,
]; ];
// Default. // Default.
@ -871,7 +965,19 @@ class HostDevices extends Wizard
$("#hidden-interval").val('.$interval.'); $("#hidden-interval").val('.$interval.');
$("#interval_units").val('.$unit.'); $("#interval_units").val('.$unit.');
} }
}).change();'; }).change();
function toggleNetwork(e) {
if (e.checked) {
$(\'#csv_subnet\').removeClass("hidden");
$(\'#std_subnet\').addClass("hidden");
} else {
$(\'#csv_subnet\').addClass("hidden");
$(\'#std_subnet\').removeClass("hidden");
}
};
';
$this->printFormAsGrid($form); $this->printFormAsGrid($form);
$this->printGoBackButton($this->url.'&page='.($this->page - 1)); $this->printGoBackButton($this->url.'&page='.($this->page - 1));

View File

@ -587,66 +587,40 @@ class Wizard
if (is_array($input['block_content']) === true) { if (is_array($input['block_content']) === true) {
// Print independent block of inputs. // Print independent block of inputs.
$output .= '<li id="'.$input['block_id'].'" class="'.$class.'">'; $output .= '<div id="'.$input['block_id'].'" class="wizard '.$class.'">';
$output .= '<ul class="wizard '.$input['block_class'].'">'; $output .= '<ul class="wizard '.$input['block_class'].'">';
foreach ($input['block_content'] as $input) { foreach ($input['block_content'] as $input) {
$output .= $this->printBlockAsGrid($input, $return); $output .= $this->printBlockAsGrid($input, $return);
} }
$output .= '</ul></li>'; $output .= '</ul></div>';
} else { } else {
if ($input['arguments']['type'] != 'hidden' if ($input['arguments']['type'] != 'hidden'
&& $input['arguments']['type'] != 'hidden_extended' && $input['arguments']['type'] != 'hidden_extended'
) { ) {
if ($input['arguments']['inline'] != 'true') { $id = '';
$output .= '<div class="edit_discovery_input">'; if ($input['id']) {
} else { $id = $input['id'];
$output .= '<div style="display: flex; margin-bottom: 25px; flex-wrap: wrap;">';
if (!isset($input['extra'])) {
$output .= '<div style="width: 50%;">';
}
if (isset($input['extra'])) {
$output .= '<div style="display: flex; margin-right:10px;">';
}
} }
if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) { if ($input['arguments']['inline'] != 'true') {
$output .= '<div style="margin-right:10px;">'; $output .= '<div id="'.$id.'" class="std_input '.$class.'">';
} else {
$output .= '<div id="'.$id.'" class="inline_input '.$class.'">';
} }
$output .= '<div class="label_select">'; $output .= '<div class="label_select">';
$output .= $input['label']; $output .= $input['label'];
$output .= '</div>'; $output .= '</div>';
if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) {
$output .= '</div>';
}
if ($input['arguments']['inline'] == 'true' && !isset($input['extra'])) {
$output .= '</div>';
}
if ($input['arguments']['type'] == 'text' || $input['arguments']['type'] == 'text_extended') { if ($input['arguments']['type'] == 'text' || $input['arguments']['type'] == 'text_extended') {
$output .= '<div class="discovery_text_input">'; $output .= '<div class="discovery_text_input">';
$output .= $this->printInput($input['arguments']); $output .= $this->printInput($input['arguments']);
$output .= '</div>'; $output .= '</div>';
} else if ($input['arguments']['inline'] == 'true') { } else if ($input['arguments']['inline'] == 'true') {
if (isset($input['extra'])) { $output .= '<div class="discovery_inline_input">';
$output .= '<div style="">';
$output .= '<div style="float: left;">';
} else {
$output .= '<div style="width:50%;">';
$output .= '<div style="float: right;">';
}
$output .= $this->printInput($input['arguments']); $output .= $this->printInput($input['arguments']);
$output .= '</div>'; $output .= '</div>';
$output .= '</div>';
if (isset($input['extra'])) {
$output .= '</div>';
}
} else { } else {
$output .= $this->printInput($input['arguments']); $output .= $this->printInput($input['arguments']);
} }
@ -821,7 +795,7 @@ class Wizard
$cb_function = $data['cb_function']; $cb_function = $data['cb_function'];
$cb_args = $data['cb_args']; $cb_args = $data['cb_args'];
$output_head = '<form class="discovery" onsubmit="'.$form['onsubmit'].'" enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method']; $output_head = '<form class="discovery wizard" onsubmit="'.$form['onsubmit'].'" enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method'];
$output_head .= '" '.$form['extra'].'>'; $output_head .= '" '.$form['extra'].'>';
if ($return === false) { if ($return === false) {

View File

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1087,7 +1087,7 @@ function html_print_extended_select_for_time(
ob_start(); ob_start();
// Use the no_meta parameter because this image is only in the base console // Use the no_meta parameter because this image is only in the base console
echo '<div id="'.$uniq_name.'_default" style="width:100%;display:inline;">'; echo '<div id="'.$uniq_name.'_default" style="width:100%;display:flex;align-items: baseline;">';
html_print_select( html_print_select(
$fields, $fields,
$uniq_name.'_select', $uniq_name.'_select',
@ -1121,7 +1121,7 @@ function html_print_extended_select_for_time(
echo '</div>'; echo '</div>';
echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:inline;">'; echo '<div id="'.$uniq_name.'_manual" style="width:100%;display:flex;">';
html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class); html_print_input_text($uniq_name.'_text', $selected, '', $size, 255, false, $readonly, false, '', $class);
html_print_input_hidden($name, $selected, false, $uniq_name); html_print_input_hidden($name, $selected, false, $uniq_name);
@ -1159,8 +1159,8 @@ function html_print_extended_select_for_time(
$('#text-".$uniq_name."_text').val(seconds); $('#text-".$uniq_name."_text').val(seconds);
adjustTextUnits('".$uniq_name."'); adjustTextUnits('".$uniq_name."');
calculateSeconds('".$uniq_name."'); calculateSeconds('".$uniq_name."');
$('#".$uniq_name."_manual').show(); $('#".$uniq_name."_manual').css('display', 'flex');
$('#".$uniq_name."_default').hide(); $('#".$uniq_name."_default').css('display', 'none');
} }
</script>"; </script>";
$returnString = ob_get_clean(); $returnString = ob_get_clean();

View File

@ -837,8 +837,8 @@ function post_process_select_events(name) {
*/ */
function period_select_init(name, allow_zero) { function period_select_init(name, allow_zero) {
// Manual mode is hidden by default // Manual mode is hidden by default
$("#" + name + "_manual").hide(); $("#" + name + "_manual").css("display", "none");
$("#" + name + "_default").show(); $("#" + name + "_default").css("display", "flex");
// If the text input is empty, we put on it 5 minutes by default // If the text input is empty, we put on it 5 minutes by default
if ($("#text-" + name + "_text").val() == "") { if ($("#text-" + name + "_text").val() == "") {
@ -852,8 +852,8 @@ function period_select_init(name, allow_zero) {
} }
} else if ($("#text-" + name + "_text").val() == 0 && allow_zero != true) { } else if ($("#text-" + name + "_text").val() == 0 && allow_zero != true) {
$("#" + name + "_units option:last").prop("selected", false); $("#" + name + "_units option:last").prop("selected", false);
$("#" + name + "_manual").show(); $("#" + name + "_manual").css("display", "flex");
$("#" + name + "_default").hide(); $("#" + name + "_default").css("display", "none");
} }
} }
@ -941,13 +941,13 @@ function selectFirst(name) {
*/ */
function toggleBoth(name) { function toggleBoth(name) {
if ($("#" + name + "_default").css("display") == "none") { if ($("#" + name + "_default").css("display") == "none") {
$("#" + name + "_default").css("display", "inline"); $("#" + name + "_default").css("display", "flex");
} else { } else {
$("#" + name + "_default").css("display", "none"); $("#" + name + "_default").css("display", "none");
} }
if ($("#" + name + "_manual").css("display") == "none") { if ($("#" + name + "_manual").css("display") == "none") {
$("#" + name + "_manual").css("display", "inline"); $("#" + name + "_manual").css("display", "flex");
} else { } else {
$("#" + name + "_manual").css("display", "none"); $("#" + name + "_manual").css("display", "none");
} }

View File

@ -2,7 +2,11 @@
* Discovery > Wizard css global style * Discovery > Wizard css global style
*/ */
#main > form.discovery.wizard > .white_box {
min-width: 1024px;
}
ul.wizard { ul.wizard {
list-style-type: none;
} }
ul.wizard li { ul.wizard li {
@ -24,13 +28,50 @@ ul.wizard li > textarea {
} }
.wizard .hidden { .wizard .hidden {
display: none; display: none !important;
} }
.wizard .indented { .wizard .indented {
margin-left: 2em; margin-left: 2em;
} }
.wizard .std_input {
display: flex;
margin-bottom: 25px;
flex-wrap: wrap;
justify-content: space-between;
}
.wizard .std_input > .label_select {
flex: 1 1 100%;
}
.wizard .std_input > * {
flex: 1 1 auto;
align-self: baseline;
}
.wizard .inline_input.no-margin {
margin-bottom: 0px;
}
.wizard .inline_input {
display: flex;
margin-bottom: 25px;
flex-wrap: wrap;
justify-content: space-between;
align-items: baseline;
}
.wizard .inline_input * {
flex: 1 1 auto;
}
.wizard .discovery_inline_input {
display: flex;
align-content: end;
flex: 0;
align-self: flex-start;
}
/* override tag-editor styles */ /* override tag-editor styles */
.wizard .tag-editor.ui-sortable { .wizard .tag-editor.ui-sortable {
width: 450px; width: 450px;
@ -57,3 +98,15 @@ ul.wizard li > textarea {
padding: 5px; padding: 5px;
background: #e63c52; background: #e63c52;
} }
.wizard .time_selection_container {
display: flex;
align-items: baseline;
justify-items: center;
align-content: space-between;
margin-top: 1em;
}
.wizard #interval_manual_container #interval_manual > * {
flex: 1 1 auto;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -810,6 +810,7 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
`autoconfiguration_enabled` tinyint(1) unsigned default 0, `autoconfiguration_enabled` tinyint(1) unsigned default 0,
`summary` text, `summary` text,
`type` int NOT NULL default 0, `type` int NOT NULL default 0,
`subnet_csv` TINYINT(1) UNSIGNED DEFAULT 0,
PRIMARY KEY (`id_rt`), PRIMARY KEY (`id_rt`),
KEY `recon_task_daemon` (`id_recon_server`) KEY `recon_task_daemon` (`id_recon_server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.744-200326 Version: 7.0NG.744-200331
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.744"; my $pandora_version = "7.0NG.744";
my $pandora_build = "200326"; my $pandora_build = "200331";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -6275,9 +6275,6 @@ sub notification_get_users {
', ',
safe_input($source) safe_input($source)
); );
@results = map { $_->{'id_user'} } @results;
return @results;
} }
########################################################################## ##########################################################################
@ -6299,9 +6296,6 @@ sub notification_get_groups {
', ',
safe_input($source) safe_input($source)
); );
@results = map { $_->{'id_group'} } @results;
return @results;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.744 PS200326"; my $version = "7.0NG.744 PS200331";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;
@ -402,16 +402,11 @@ sub pandora_purgedb ($$) {
log_message ('PURGE', 'netflow_max_lifetime is set to 0. Old netflow data will not be deleted.'); log_message ('PURGE', 'netflow_max_lifetime is set to 0. Old netflow data will not be deleted.');
} }
# Delete old log data # Delete old log data
log_message ('PURGE', "Deleting old log data."); log_message ('PURGE', "Deleting old log data.");
if (!defined ($conf->{'logstash_host'}) || $conf->{'logstash_host'} eq '') { if (defined($conf->{'_days_purge_old_information'}) && $conf->{'_days_purge_old_information'} > 0) {
log_message ('!', "Log collection disabled.");
}
elsif (defined($conf->{'_days_purge_old_information'}) && $conf->{'_days_purge_old_information'} > 0) {
log_message ('PURGE', 'Deleting log data older than ' . $conf->{'_days_purge_old_information'} . ' days.'); log_message ('PURGE', 'Deleting log data older than ' . $conf->{'_days_purge_old_information'} . ' days.');
enterprise_hook ('pandora_purge_logs', [$dbh, $conf]); enterprise_hook ('pandora_purge_logs', [$dbh, $conf]);
} }
else { else {
log_message ('PURGE', 'days_purge_old_data is set to 0. Old log data will not be deleted.'); log_message ('PURGE', 'days_purge_old_data is set to 0. Old log data will not be deleted.');

View File

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