Merge remote-tracking branch 'origin/develop' into ent-11931-made-selector-de-modulo-donde-se-activa-made-monitoring-anomaly-detection-engine

This commit is contained in:
Calvo 2023-10-26 14:31:22 +02:00
commit 763f656822
41 changed files with 291 additions and 58 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.773.3-231024 Version: 7.0NG.773.3-231026
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.773.3-231024" pandora_version="7.0NG.773.3-231026"
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

@ -1031,7 +1031,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.773.3'; use constant AGENT_VERSION => '7.0NG.773.3';
use constant AGENT_BUILD => '231024'; use constant AGENT_BUILD => '231026';
# 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

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin %define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux %define source_name pandorafms_agent_linux
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
Summary: Pandora FMS Linux agent, binary version Summary: Pandora FMS Linux agent, binary version
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
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.773.3" PI_VERSION="7.0NG.773.3"
PI_BUILD="231024" PI_BUILD="231026"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{231024} {231026}
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.773.3 Build 231024") #define PANDORA_VERSION ("7.0NG.773.3 Build 231026")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS" VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.773.3(Build 231024))" VALUE "ProductVersion", "(7.0NG.773.3(Build 231026))"
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.773.3-231024 Version: 7.0NG.773.3-231026
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.773.3-231024" pandora_version="7.0NG.773.3-231026"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -1,4 +1,4 @@
pandorafms.vmware=459175dce8ab811e874ce2e7216f0db4 pandorafms.vmware=9959cc3e5cc6bfcfadd6d05b56d4a11b
pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe pandorafms.mysql=fadb4750d18285c0eca34f47c6aa3cfe
pandorafms.mssql=1cc215409741d19080269ffba112810e pandorafms.mssql=1cc215409741d19080269ffba112810e
pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6 pandorafms.oracle=2d9320a514d1e48a0b2804e1653c31c6

View File

@ -369,4 +369,7 @@ ALTER TABLE tagente_modulo ADD COLUMN `last_compact` TIMESTAMP NOT NULL DEFAULT
UPDATE `tevent_alert` ea INNER JOIN `tevent_rule` er ON ea.id = er.id_event_alert SET disabled=1 WHERE er.log_agent IS NOT NULL OR er.log_content IS NOT NULL OR er.log_source IS NOT NULL; UPDATE `tevent_alert` ea INNER JOIN `tevent_rule` er ON ea.id = er.id_event_alert SET disabled=1 WHERE er.log_agent IS NOT NULL OR er.log_content IS NOT NULL OR er.log_source IS NOT NULL;
ALTER TABLE `tnetwork_explorer_filter`
MODIFY COLUMN `id` INT NOT NULL AUTO_INCREMENT;
COMMIT; COMMIT;

View File

@ -1354,6 +1354,14 @@ if ($update_module === true || $create_module === true) {
} }
$configuration_data = (string) get_parameter('configuration_data'); $configuration_data = (string) get_parameter('configuration_data');
$array_configuration_data = explode(PHP_EOL, io_safe_output($configuration_data));
$configuration_data = '';
foreach ($array_configuration_data as $value) {
$configuration_data .= trim($value).PHP_EOL;
}
$configuration_data = io_safe_input($configuration_data);
$old_configuration_data = (string) get_parameter('old_configuration_data'); $old_configuration_data = (string) get_parameter('old_configuration_data');
$new_configuration_data = ''; $new_configuration_data = '';
@ -1494,6 +1502,14 @@ if ($update_module === true || $create_module === true) {
} }
$plugin_parameter = (string) get_parameter('plugin_parameter'); $plugin_parameter = (string) get_parameter('plugin_parameter');
$array_plugin_parameter = explode(PHP_EOL, io_safe_output($plugin_parameter));
$plugin_parameter = '';
foreach ($array_plugin_parameter as $value) {
$plugin_parameter .= trim($value).PHP_EOL;
}
$plugin_parameter = io_safe_input($plugin_parameter);
} }
$parent_module_id = (int) get_parameter('parent_module_id'); $parent_module_id = (int) get_parameter('parent_module_id');

View File

@ -318,7 +318,7 @@ foreach ($texts as $code => $text) {
return; return;
} }
$(plugin_parameter).val('task_begin\ncookie 0\nresource 0\ntask_end'); $(plugin_parameter).val('task_begin\nget https://demoweb.com/page/\ncheck_string text string or HTML code to search (regexp)\ntask_end\n');
$('#button-btn_loadbasic').attr('disabled', 'disabled'); $('#button-btn_loadbasic').attr('disabled', 'disabled');

View File

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

View File

@ -5409,7 +5409,7 @@ function html_print_link_with_params($text, $params=[], $type='text', $style='',
$formStyle = ' style="'.$formStyle.'"'; $formStyle = ' style="'.$formStyle.'"';
} }
$html = '<form method="POST"'.$formStyle.'>'; $html = '<form method="POST"'.$formStyle.' class="link-with-params">';
switch ($type) { switch ($type) {
case 'image': case 'image':
$html .= html_print_input_image($text, $text, $text, $style, true); $html .= html_print_input_image($text, $text, $text, $style, true);

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,8 @@ namespace PandoraFMS\Dashboard;
global $config; global $config;
require_once $config['homedir'].'/include/functions_inventory.php';
/** /**
* Inventory Widget. * Inventory Widget.
*/ */
@ -608,7 +610,7 @@ class InventoryWidget extends Widget
} }
} }
$id_table = 'id_'.$row['id_module_inventory'].'_'.$nodo['server_uid']; $id_table = 'id_'.$row['id_module_inventory'].'_'.uniqid().'_'.$nodo['server_uid'];
$table = ui_print_datatable( $table = ui_print_datatable(
[ [
'id' => $id_table, 'id' => $id_table,
@ -619,7 +621,7 @@ class InventoryWidget extends Widget
'no_sortable_columns' => [], 'no_sortable_columns' => [],
'data_element' => $data, 'data_element' => $data,
'searching' => true, 'searching' => true,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],
'direction' => 'asc', 'direction' => 'asc',
@ -727,7 +729,7 @@ class InventoryWidget extends Widget
} }
} }
$id_table = 'id_'.$row['id_module_inventory'].'_'.$nodo['server_uid']; $id_table = 'id_'.$row['id_module_inventory'].'_'.uniqid().'_'.$nodo['server_uid'];
$table = ui_print_datatable( $table = ui_print_datatable(
[ [
@ -739,7 +741,7 @@ class InventoryWidget extends Widget
'no_sortable_columns' => [], 'no_sortable_columns' => [],
'data_element' => $data, 'data_element' => $data,
'searching' => true, 'searching' => true,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],
'direction' => 'asc', 'direction' => 'asc',
@ -893,7 +895,7 @@ class InventoryWidget extends Widget
} }
} }
$id_table = 'id_'.$key_row.'_'.$row['id_module_inventory'].'_'.$row['id_agente']; $id_table = 'id_'.$key_row.'_'.$row['id_module_inventory'].'_'.uniqid().'_'.$row['id_agente'];
$table = ui_print_datatable( $table = ui_print_datatable(
[ [
@ -905,7 +907,7 @@ class InventoryWidget extends Widget
'no_sortable_columns' => [], 'no_sortable_columns' => [],
'data_element' => $data, 'data_element' => $data,
'searching' => true, 'searching' => true,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],
'direction' => 'asc', 'direction' => 'asc',
@ -985,7 +987,7 @@ class InventoryWidget extends Widget
array_push($data, $data_tmp); array_push($data, $data_tmp);
} }
$id_table = 'id_'.$row['id_module_inventory']; $id_table = 'id_'.$row['id_module_inventory'].'_'.uniqid();
} }
if ($count_rows > 1) { if ($count_rows > 1) {
@ -999,7 +1001,7 @@ class InventoryWidget extends Widget
'no_sortable_columns' => [], 'no_sortable_columns' => [],
'data_element' => $data, 'data_element' => $data,
'searching' => true, 'searching' => true,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],
'direction' => 'asc', 'direction' => 'asc',
@ -1035,7 +1037,7 @@ class InventoryWidget extends Widget
'no_sortable_columns' => [], 'no_sortable_columns' => [],
'data_element' => $data, 'data_element' => $data,
'searching' => true, 'searching' => true,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],
'direction' => 'asc', 'direction' => 'asc',
@ -1098,7 +1100,7 @@ class InventoryWidget extends Widget
'columns' => $columns, 'columns' => $columns,
'column_names' => $columns_names, 'column_names' => $columns_names,
'ordering' => $ordering, 'ordering' => $ordering,
'dom_elements' => 'frtilp', 'dom_elements' => 'rtilp',
'searching' => $searching, 'searching' => $searching,
'order' => [ 'order' => [
'field' => $columns[0], 'field' => $columns[0],

View File

@ -300,6 +300,10 @@ class SingleGraphWidget extends Widget
$values['period'] = SECONDS_1DAY; $values['period'] = SECONDS_1DAY;
} }
if (isset($values['period_projection']) === false) {
$values['period_projection'] = SECONDS_1DAY;
}
if (isset($values['showLegend']) === false) { if (isset($values['showLegend']) === false) {
$values['showLegend'] = 1; $values['showLegend'] = 1;
} }
@ -439,7 +443,7 @@ class SingleGraphWidget extends Widget
$trickHight = 0; $trickHight = 0;
if ($this->values['showLegend'] === 1) { if ($this->values['showLegend'] === 1) {
// Needed for legend. // Needed for legend.
$trickHight = 40; $trickHight = 60;
} }
$output = '<div class="container-center widget-mrgn-0px">'; $output = '<div class="container-center widget-mrgn-0px">';
@ -448,10 +452,16 @@ class SingleGraphWidget extends Widget
'period' => $this->values['period'], 'period' => $this->values['period'],
'date' => strtotime(date('Y-m-d H:i:s')), 'date' => strtotime(date('Y-m-d H:i:s')),
'only_image' => false, 'only_image' => false,
'homeurl' => ui_get_full_url(false, false, false, false).'/',
'height' => ((int) $size['height'] - $trickHight), 'height' => ((int) $size['height'] - $trickHight),
'landscape' => $content['landscape'], 'landscape' => $content['landscape'],
'return_img_base_64' => true, 'return_img_base_64' => true,
'show_legend' => $this->values['showLegend'],
'width' => '100%',
'height' => ((int) $size['height'] - $trickHight),
'title' => $module_name,
'unit' => $units_name,
'homeurl' => $config['homeurl'],
'menu' => false,
]; ];
$params_combined = [ $params_combined = [

View File

@ -949,3 +949,7 @@ input.resize_button {
bottom: 3%; bottom: 3%;
right: 6%; right: 6%;
} }
.parent_graph > .graph {
margin-left: 10px;
}

View File

@ -1292,6 +1292,11 @@ p.center {
margin: 0 5px; margin: 0 5px;
} }
.loading-text {
font-size: 19px;
text-align: center;
}
/* Legacy spinner */ /* Legacy spinner */
#loading { #loading {
position: fixed; position: fixed;

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'> <div style='padding-bottom: 50px'>
<?php <?php
$version = '7.0NG.773.3'; $version = '7.0NG.773.3';
$build = '231024'; $build = '231026';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -36,6 +36,7 @@ require_once $config['homedir'].'/include/functions_agents.php';
require_once $config['homedir'].'/include/functions_groups.php'; require_once $config['homedir'].'/include/functions_groups.php';
require_once $config['homedir'].'/include/functions_modules.php'; require_once $config['homedir'].'/include/functions_modules.php';
require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_users.php';
require_once $config['homedir'].'/include/functions_inventory.php';
enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('include/functions_omnishell.php'); enterprise_include_once('include/functions_omnishell.php');

View File

@ -87,7 +87,7 @@ if (is_ajax() === true) {
$filter_id = (int) get_parameter('filter_id', 0); $filter_id = (int) get_parameter('filter_id', 0);
$filter['id_name'] = get_parameter('new_filter_name', ''); $filter['id_name'] = get_parameter('new_filter_name', '');
$filter['id_group'] = (int) get_parameter('assign_group', 0); $filter['id_group'] = (int) get_parameter('assign_group', 0);
$filter['aggregate'] = get_parameter('aggregate', ''); $filter['aggregate'] = get_parameter('aggregate', 'dstip');
$filter['ip_dst'] = get_parameter('ip_dst', ''); $filter['ip_dst'] = get_parameter('ip_dst', '');
$filter['ip_src'] = get_parameter('ip_src', ''); $filter['ip_src'] = get_parameter('ip_src', '');
$filter['dst_port'] = get_parameter('dst_port', ''); $filter['dst_port'] = get_parameter('dst_port', '');
@ -169,7 +169,8 @@ if ($custom_date === '1') {
$date_from = strtotime($date_init); $date_from = strtotime($date_init);
$date_to = strtotime($date_end); $date_to = strtotime($date_end);
// Read buttons. // Read buttons.
$draw = get_parameter('draw_button', ''); // Change default value for not autoload default filter when load view.
$draw = get_parameter('draw_button', 1);
$save = get_parameter('save_button', ''); $save = get_parameter('save_button', '');
$update = get_parameter('update_button', ''); $update = get_parameter('update_button', '');
@ -663,6 +664,7 @@ if (empty($draw) === false) {
// Draw the netflow chart. // Draw the netflow chart.
html_print_div( html_print_div(
[ [
'id' => 'container_netflow',
'class' => $netflowContainerClass, 'class' => $netflowContainerClass,
'content' => netflow_draw_item( 'content' => netflow_draw_item(
$date_from, $date_from,
@ -677,6 +679,22 @@ if (empty($draw) === false) {
), ),
] ]
); );
$spinner = html_print_div(
[
'content' => '<span></span>',
'class' => 'spinner-fixed inherit',
'style' => 'position: initial;',
],
true
);
html_print_div(
[
'id' => 'spinner',
'content' => '<p class="loading-text">'.__('Loading netflow data, please wait...').'</p>'.$spinner,
'class' => 'invisible',
'style' => 'position: initial;',
]
);
} }
} else { } else {
ui_print_info_message(__('No data to show')); ui_print_info_message(__('No data to show'));
@ -934,6 +952,11 @@ ui_include_time_picker();
$('#filter_group_color').css('color', '#000000'); $('#filter_group_color').css('color', '#000000');
} }
}); });
$("#button-draw_button").on('click', function(){
$("#container_netflow").remove();
$("#spinner").removeClass("invisible");
});
}); });
$("#text-time, #text-time_lower").timepicker({ $("#text-time, #text-time_lower").timepicker({

View File

@ -135,11 +135,53 @@ if ($advanced_filter !== '') {
$filter['advanced_filter'] = $advanced_filter; $filter['advanced_filter'] = $advanced_filter;
} }
$filter_name = get_parameter('filter_name');
$order_by = get_parameter('order_by', 'bytes'); $order_by = get_parameter('order_by', 'bytes');
if (!in_array($order_by, ['bytes', 'pkts', 'flows'])) { if (!in_array($order_by, ['bytes', 'pkts', 'flows'])) {
$order_by = 'bytes'; $order_by = 'bytes';
} }
$save = get_parameter('save_button', '');
$update = get_parameter('update_button', '');
// Save user defined filter.
if ($save != '' && check_acl($config['id_user'], 0, 'AW')) {
// Save filter args.
$data['filter_name'] = $filter_name;
$data['top'] = $top;
$data['action'] = $action;
$data['advanced_filter'] = $advanced_filter;
$filter_id = db_process_sql_insert('tnetwork_explorer_filter', $data);
if ($filter_id === false) {
$filter_id = 0;
ui_print_error_message(__('Error creating filter'));
} else {
ui_print_success_message(__('Filter created successfully'));
}
} else if ($update != '' && check_acl($config['id_user'], 0, 'AW')) {
// Update current filter.
// Do not update the filter name and group.
$data['top'] = $top;
$data['action'] = $action;
$data['advanced_filter'] = $advanced_filter;
$result = db_process_sql_update(
'tnetwork_explorer_filter',
$data,
['id' => $filter_id]
);
ui_print_result_message(
$result,
__('Filter updated successfully'),
__('Error updating filter')
);
}
// Build the table. // Build the table.
$filterTable = new stdClass(); $filterTable = new stdClass();
$filterTable->id = ''; $filterTable->id = '';
@ -176,6 +218,59 @@ $filterTable->data[0][1] = html_print_label_input_block(
html_print_select_date_range('date', true) html_print_select_date_range('date', true)
); );
$filterTable->data[1][0] = html_print_label_input_block(
__('Data to show'),
html_print_select(
network_get_report_actions(),
'action',
$action,
'',
'',
0,
true
)
);
$advanced_toggle = new stdClass();
$advanced_toggle->class = 'filter-table-adv';
$advanced_toggle->size = [];
$advanced_toggle->size[0] = '50%';
$advanced_toggle->size[1] = '50%';
$advanced_toggle->width = '100%';
$user_groups = users_get_groups($config['id_user'], 'AR', $own_info['is_admin'], true);
$user_groups[0] = 0;
// Add all groups.
$sql = 'SELECT * FROM tnetwork_explorer_filter';
$advanced_toggle->data[0][0] = html_print_label_input_block(
__('Load Filter'),
html_print_select_from_sql($sql, 'filter_id', $filter_id, '', __('Select a filter'), 0, true, false, true, false, 'width:100%;')
);
$advanced_toggle->data[0][1] = html_print_label_input_block(
__('Filter name'),
html_print_input_text('filter_name', $filter_name, false, 40, 45, true, false, false, '', 'w100p')
);
$advanced_toggle->colspan[1][0] = 2;
$advanced_toggle->data[1][0] = html_print_label_input_block(
__('Filter').ui_print_help_icon('pcap_filter', true),
html_print_textarea('advanced_filter', 4, 10, $advanced_filter, 'style="width:100%"', true)
);
$filterTable->colspan[2][0] = 3;
$filterTable->data[2][0] = html_print_label_input_block(
'',
ui_toggle(
html_print_table($advanced_toggle, true),
__('Advanced'),
'',
'',
true,
true,
'',
'white-box-content',
'box-flat white_table_graph'
)
);
$filterInputTable = '<form method="POST">'; $filterInputTable = '<form method="POST">';
$filterInputTable .= html_print_input_hidden('order_by', $order_by); $filterInputTable .= html_print_input_hidden('order_by', $order_by);
$filterInputTable .= html_print_table($filterTable, true); $filterInputTable .= html_print_table($filterTable, true);
@ -262,10 +357,14 @@ $data = netflow_get_top_summary(
// Get the params to return the builder. // Get the params to return the builder.
$hidden_main_link = [ $hidden_main_link = [
'time_greater' => $time_greater, 'custom_date' => get_parameter('custom_date', '0'),
'date_greater' => $date_greater, 'date' => get_parameter('date', SECONDS_1DAY),
'time_lower' => $time_lower, 'date_init' => get_parameter('date_init'),
'date_lower' => $date_lower, 'time_init' => get_parameter('time_init'),
'date_end' => get_parameter('date_end'),
'time_end' => get_parameter('time_end'),
'date_text' => get_parameter('date_text'),
'date_units' => get_parameter('date_units'),
'top' => $top, 'top' => $top,
'action' => $action, 'action' => $action,
]; ];
@ -449,6 +548,7 @@ if (empty($data)) {
// Print results. // Print results.
html_print_div( html_print_div(
[ [
'id' => 'content-netflow',
'style' => 'max-width: -webkit-fill-available; display: flex', 'style' => 'max-width: -webkit-fill-available; display: flex',
'class' => '', 'class' => '',
'content' => $resultsTable.$pieGraph, 'content' => $resultsTable.$pieGraph,
@ -456,11 +556,25 @@ if (empty($data)) {
); );
} }
$spinner = html_print_div(
[
'content' => '<span></span>',
'class' => 'spinner-fixed inherit',
'style' => 'position: initial;',
],
true
);
html_print_div(
[
'id' => 'spinner',
'content' => '<p class="loading-text">'.__('Loading netflow data, please wait...').'</p>'.$spinner,
'class' => 'invisible',
'style' => 'position: initial;',
]
);
?> ?>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
nf_view_click_period();
$('#filter_id').change(function(){ $('#filter_id').change(function(){
jQuery.post ( jQuery.post (
"ajax.php", "ajax.php",
@ -473,9 +587,42 @@ $(document).ready(function(){
$('#action').val(data.action).trigger('change'); $('#action').val(data.action).trigger('change');
$('#top').val(data.top).trigger('change'); $('#top').val(data.top).trigger('change');
$('#textarea_advanced_filter').val(data.advanced_filter); $('#textarea_advanced_filter').val(data.advanced_filter);
$('#text-filter_name').val(data.filter_name);
$('select#filter_id').select2('close'); $('select#filter_id').select2('close');
}, 'json'); }, 'json');
}); });
$('#button-update').on('click', function(){
if ($('.info_box_information').length > 0) {
$('.info_box_information').remove();
}
if ($('#content-netflow').length > 0) {
$('#content-netflow').remove();
}
if ($('#spinner').length > 0) {
$('#spinner').removeClass("invisible");
}
if ($('.link-with-params').length > 0) {
$('.link-with-params').remove();
}
});
$('.link-with-params').on('submit', function(e){
setTimeout(() => {
if ($('.info_box_information').length > 0) {
$('.info_box_information').remove();
}
if ($('#content-netflow').length > 0) {
$('#content-netflow').remove();
}
if ($('#spinner').length > 0) {
$('#spinner').removeClass("invisible");
}
if ($('.link-with-params').length > 0) {
$('.link-with-params').remove();
}
}, 100); // Prevent fields from being deleted before being sent.
})
}); });
// Configure jQuery timepickers. // Configure jQuery timepickers.

View File

@ -336,7 +336,7 @@ ui_toggle(
$has_data = false; $has_data = false;
if ((bool) get_parameter('update_netflow') === true) { if ((bool) get_parameter('update_netflow', 1) === true) {
$map_data = netflow_build_map_data( $map_data = netflow_build_map_data(
$date_from, $date_from,
$date_to, $date_to,
@ -354,6 +354,23 @@ if ($has_data === true) {
ui_print_info_message(__('No data to show')); ui_print_info_message(__('No data to show'));
} }
$spinner = html_print_div(
[
'content' => '<span></span>',
'class' => 'spinner-fixed inherit',
'style' => 'position: initial;',
],
true
);
html_print_div(
[
'id' => 'spinner',
'content' => '<p class="loading-text">'.__('Loading netflow data, please wait...').'</p>'.$spinner,
'class' => 'invisible',
'style' => 'position: initial;',
]
);
?> ?>
<style> <style>
.networkconsole { .networkconsole {
@ -363,7 +380,6 @@ if ($has_data === true) {
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
nf_view_click_period();
$('#filter_id').change(function(){ $('#filter_id').change(function(){
jQuery.post ( jQuery.post (
@ -380,6 +396,12 @@ $(document).ready(function(){
$('select#filter_id').select2('close'); $('select#filter_id').select2('close');
}, 'json'); }, 'json');
}); });
$('#button-update_netflow').on('click', function(){
$('.info_box_information').remove();
$('.networkconsole').remove();
$('#spinner').removeClass("invisible");
});
}); });
// Configure jQuery timepickers. // Configure jQuery timepickers.

View File

@ -6,7 +6,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
# 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

@ -6,7 +6,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
# 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.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
%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

@ -4475,7 +4475,7 @@ CREATE TABLE IF NOT EXISTS `tdiscovery_apps_tasks_macros` (
-- Table `tnetwork_explorer_filter` -- Table `tnetwork_explorer_filter`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetwork_explorer_filter` ( CREATE TABLE IF NOT EXISTS `tnetwork_explorer_filter` (
`id` INT NOT NULL, `id` INT NOT NULL auto_increment,
`filter_name` VARCHAR(45) NULL, `filter_name` VARCHAR(45) NULL,
`top` VARCHAR(45) NULL, `top` VARCHAR(45) NULL,
`action` VARCHAR(45) NULL, `action` VARCHAR(45) NULL,

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.773.3-231024 Version: 7.0NG.773.3-231026
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.773.3-231024" pandora_version="7.0NG.773.3-231026"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -46,7 +46,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.773.3"; my $pandora_version = "7.0NG.773.3";
my $pandora_build = "231024"; my $pandora_build = "231026";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash
@ -296,9 +296,9 @@ sub pandora_load_config {
$pa_config->{"update_parent"} = 0; # 3.1 $pa_config->{"update_parent"} = 0; # 3.1
$pa_config->{"google_maps_description"} = 0; $pa_config->{"google_maps_description"} = 0;
$pa_config->{'openstreetmaps_description'} = 0; $pa_config->{'openstreetmaps_description'} = 0;
$pa_config->{"eventserver"} = 1; # 4.0 $pa_config->{"eventserver"} = 0; # 4.0
$pa_config->{"eventserver_threads"} = 1; # 4.0 $pa_config->{"eventserver_threads"} = 1; # 4.0
$pa_config->{"logserver"} = 1; # 7.774 $pa_config->{"logserver"} = 0; # 7.774
$pa_config->{"logserver_threads"} = 1; # 7.774 $pa_config->{"logserver_threads"} = 1; # 7.774
$pa_config->{"event_window"} = 3600; # 4.0 $pa_config->{"event_window"} = 3600; # 4.0
$pa_config->{"log_window"} = 3600; # 7.741 $pa_config->{"log_window"} = 3600; # 7.741
@ -513,7 +513,7 @@ sub pandora_load_config {
$pa_config->{"clean_wux_sessions"} = 1; # 7.0.746 (only selenium 3) $pa_config->{"clean_wux_sessions"} = 1; # 7.0.746 (only selenium 3)
# Syslog Server # Syslog Server
$pa_config->{"syslogserver"} = 1; # 7.0.716 $pa_config->{"syslogserver"} = 0; # 7.0.716
$pa_config->{"syslog_file"} = '/var/log/messages/'; # 7.0.716 $pa_config->{"syslog_file"} = '/var/log/messages/'; # 7.0.716
$pa_config->{"syslog_max"} = 65535; # 7.0.716 $pa_config->{"syslog_max"} = 65535; # 7.0.716
$pa_config->{"syslog_threads"} = 4; # 7.0.716 $pa_config->{"syslog_threads"} = 4; # 7.0.716

View File

@ -34,7 +34,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.773.3"; my $pandora_version = "7.0NG.773.3";
my $pandora_build = "231024"; my $pandora_build = "231026";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -7,7 +7,7 @@
%define debug_package %{nil} %define debug_package %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.773.3 %define version 7.0NG.773.3
%define release 231024 %define release 231026
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

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

View File

@ -38,7 +38,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.773.3 Build 231024"; my $version = "7.0NG.773.3 Build 231026";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

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.773.3 Build 231024"; my $version = "7.0NG.773.3 Build 231026";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);