Merge branch 'develop' into ent-9869-no-desactivar-validate_password-en-nuevas-instalaciones

This commit is contained in:
rafael 2023-07-27 07:50:49 +02:00
commit 05b8df628c
63 changed files with 557 additions and 423 deletions

View File

@ -4,7 +4,7 @@ Architecture: all
Priority: optional
Section: admin
Installed-Size: 260
Maintainer: ÁRTICA ST <info@artica.es>
Maintainer: Pandora FMS <info@pandorafms.com>
Homepage: https://pandorafms.org/
Depends: coreutils, perl, unzip
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. Its possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.

View File

@ -4,7 +4,7 @@ Architecture: all
Priority: optional
Section: admin
Installed-Size: 260
Maintainer: ÁRTICA ST <info@artica.es>
Maintainer: Pandora FMS <info@pandorafms.com>
Homepage: http://pandorafms.org/
Depends: coreutils, perl
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. Its possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.

View File

@ -1,10 +1,10 @@
package: pandorafms-agent-unix
Version: 7.0NG.772-230724
Version: 7.0NG.772-230727
Architecture: all
Priority: optional
Section: admin
Installed-Size: 260
Maintainer: ÁRTICA ST <info@artica.es>
Maintainer: Pandora FMS <info@pandorafms.com>
Homepage: http://pandorafms.org/
Depends: coreutils, perl, unzip
Description: Pandora FMS agents are based on native languages in every platform: scripts that can be written in any language. Its possible to reproduce any agent in any programming language and can be extended without difficulty the existing ones in order to cover aspects not taken into account up to the moment. These scripts are formed by modules that each one gathers a "chunk" of information. Thus, every agent gathers several "chunks" of information; this one is organized in a data set and stored in a single file, called data file.

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.772-230724"
pandora_version="7.0NG.772-230727"
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

@ -6,7 +6,7 @@
<key>CFBundleIdentifier</key> <string>com.pandorafms.pandorafms_uninstall</string>
<key>CFBundleVersion</key> <string>7.0NG.772</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.772 Pandora FMS Agent uninstaller for MacOS by Artica ST on Aug 2020</string>
<key>CFBundleGetInfoString</key> <string>7.0NG.772 Pandora FMS on Aug 2020</string>
<key>CFBundleShortVersionString</key> <string>7.0NG.772</string>
<key>NSPrincipalClass</key><string>NSApplication</string>

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.772"
PI_BUILD="230724"
PI_BUILD="230727"
OS_NAME=`uname -s`
FORCE=0

View File

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

View File

@ -6,12 +6,12 @@ BEGIN
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "CompanyName", "Artica ST"
VALUE "CompanyName", "Pandora FMS"
VALUE "FileDescription", "Pandora FMS Agent for Windows Platform"
VALUE "LegalCopyright", "Artica ST"
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.772(Build 230724))"
VALUE "ProductVersion", "(7.0NG.772(Build 230727))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,10 +1,10 @@
package: pandorafms-console
Version: 7.0NG.772-230724
Version: 7.0NG.772-230727
Architecture: all
Priority: optional
Section: admin
Installed-Size: 42112
Maintainer: Artica ST <deptec@artica.es>
Maintainer: Pandora FMS <info@pandorafms.com>
Homepage: https://pandorafms.com/
Depends: php, php-snmp, php-gd, php-mysqlnd, php-db, php-xmlrpc, php-curl, graphviz, dbconfig-common, php-ldap, mysql-client | virtual-mysql-client, php-xmlrpc, php-zip, php-mbstring
Description: Pandora FMS is an Open Source monitoring tool. It monitor your systems and applications, and allows you to control the status of any element of them. The web console is the graphical user interface (GUI) to manage the pool and to generate reports and graphs from the Pandora FMS monitoring process.

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.772-230724"
pandora_version="7.0NG.772-230727"
package_pear=0
package_pandora=1
@ -163,7 +163,7 @@ if [ $package_pear -eq 1 ]
then
echo "Make the package \"php-xml-rpc\"."
cd temp_package
dh-make-pear --maintainer "ÁRTICA ST <info@artica.es>" XML_RPC
dh-make-pear --maintainer "Pandora FMS <info@pandorafms.com>" XML_RPC
cd php-xml-rpc-*
dpkg-buildpackage -rfakeroot
cd ..

View File

@ -609,7 +609,7 @@
}
],
"description": "PHP library for ChartJS",
"homepage": "https://artica.es/",
"homepage": "https://pandorafms.com/",
"keywords": [
"chartjs",
"graph",

View File

@ -233,11 +233,8 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
$header_autorefresh = '';
$header_autorefresh_counter = '';
if ($config['legacy_vc']
|| ($_GET['sec2'] !== 'operation/visual_console/render_view')
|| (($_GET['sec2'] !== 'operation/visual_console/render_view')
&& $config['legacy_vc'])
) {
if (($_GET['sec2'] !== 'operation/visual_console/render_view')) {
if ($autorefresh_list !== null
&& array_search($_GET['sec2'], $autorefresh_list) !== false
) {

View File

@ -212,7 +212,7 @@ $groups = users_get_groups($config['id_user'], 'AR', false);
// Get modules.
$modules = db_get_all_rows_sql(
'SELECT id_agente_modulo as id_module, nombre as name FROM tagente_modulo
WHERE id_agente = '.$id_parent
WHERE id_agente = '.$id_agente
);
$modules_values = [];
$modules_values[0] = __('Any');

View File

@ -184,7 +184,7 @@ if (empty($result) === false) {
]
).'</a>&nbsp;&nbsp;';
$data[1] .= '<a href="index.php?sec=advanced&sec2=godmode/category/category&delete_category='.$category['id'].'&pure='.(int) $config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">'.html_print_image(
'images/delet.svg',
'images/delete.svg',
true,
[
'title' => __('Delete'),

View File

@ -189,6 +189,14 @@ echo get_table_inputs_masive_agents($params);
if (is_metaconsole() === true || is_management_allowed() === true) {
attachActionButton('delete', 'delete', '100%', false, $SelectAction);
} else {
html_print_action_buttons(
'',
[
'right_content' => $SelectAction,
'class' => 'pdd_t_15px_important pdd_b_15px_important',
]
);
}
echo '</form>';

View File

@ -488,14 +488,38 @@ if (!empty($graphs)) {
true
);
$ActionButtons[] = '</form>';
$offset = (int) get_parameter('offset', 0);
$block_size = (int) $config['block_size'];
$tablePagination = ui_pagination(
count($graphs),
false,
$offset,
$block_size,
true,
'offset',
false
);
}
// FALTA METER EL PRINT TABLE.
html_print_table($table);
html_print_action_buttons(
implode('', $ActionButtons),
['type' => 'form_action']
);
if (is_metaconsole() === true) {
html_print_action_buttons(
implode('', $ActionButtons),
['type' => 'form_action']
);
} else {
html_print_action_buttons(
implode('', $ActionButtons),
[
'type' => 'form_action',
'right_content' => $tablePagination,
]
);
}
}
echo '</div>';

View File

@ -6720,6 +6720,8 @@ function chooseType() {
$("#row_agent").show();
$("#row_module").show();
$("#row_historical_db_check").hide();
period_set_value($("#hidden-period").attr('class'), 3600);
$("#row_period").find('select').val('3600').trigger('change');
break;
case 'SLA_monthly':

View File

@ -116,10 +116,13 @@ if (!$report_r && !$report_w && !$report_m) {
}
require_once $config['homedir'].'/include/functions_reports.php';
require_once $config['homedir'].'/godmode/wizards/DiscoveryTaskList.class.php';
// Load enterprise extensions.
enterprise_include('operation/reporting/custom_reporting.php');
enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('include/functions_tasklist.php');
enterprise_include_once('include/functions_cron.php');
@ -782,7 +785,7 @@ switch ($action) {
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
false,
true,
false,
'',
'white-box-content',
@ -1251,7 +1254,12 @@ switch ($action) {
array_push($table->data, $data);
}
html_print_table($table);
$reports_table = '<div class="white_box">';
$reports_table .= '<span class="white_table_graph_header">'.__('Reports').'</span>';
$reports_table .= html_print_table($table, true);
$reports_table .= '<br></div>';
echo $reports_table;
$tablePagination = ui_pagination(
$total_reports,
$url,
@ -1259,7 +1267,7 @@ switch ($action) {
$pagination,
true,
'offset',
false,
false
);
} else {
ui_print_info_message(
@ -1270,6 +1278,21 @@ switch ($action) {
);
}
$discovery_tasklist = new DiscoveryTaskList();
$report_task_data = $discovery_tasklist->showListConsoleTask(true);
if (is_array($report_task_data) === true || strpos($report_task_data, 'class="nf"') === false) {
$task_table = '<div class="mrgn_top_15px white_box">';
$task_table .= '<span class="white_table_graph_header">'.__('Report tasks');
$task_table .= ui_print_help_tip(__('To schedule a report, do it from the editing view of each report.'), true);
$task_table .= '</span><div>';
$task_table .= $report_task_data;
$task_table .= '</div></div>';
echo $task_table;
} else {
ui_print_info_message($report_task_data.__('To schedule a report, do it from the editing view of each report.'));
}
if (check_acl($config['id_user'], 0, 'RW')
|| check_acl($config['id_user'], 0, 'RM')
) {

View File

@ -837,12 +837,6 @@ $buttons['wizard'] = [
'active' => false,
'text' => '<a href="'.$url_base.$action.'&tab=wizard&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wizard@svg.svg', true, ['title' => __('Wizard'), 'class' => 'invert_filter']).'</a>',
];
if ($config['legacy_vc']) {
$buttons['editor'] = [
'active' => false,
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder@svg.svg', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
];
}
$buttons['view'] = [
'active' => false,

View File

@ -161,7 +161,7 @@ if ($classname_selected === null) {
$wiz_data = [];
foreach ($classes as $classpath) {
if (is_reporting_console_node() === true) {
if ($classpath !== '/var/www/html/pandora_console/godmode/wizards/DiscoveryTaskList.class.php') {
if ($classpath !== $config['homedir'].'/godmode/wizards/DiscoveryTaskList.class.php') {
continue;
}
}

View File

@ -101,6 +101,13 @@ foreach ($servers as $server) {
}
}
$ext = '';
// Check for any data-type server present in servers list. If none, enable server access for first server.
if (array_search('data', array_column($servers, 'type')) === false) {
$ext = '_server';
}
foreach ($servers as $server) {
$data = [];
@ -185,14 +192,12 @@ foreach ($servers as $server) {
$data[7] = ui_print_timestamp($server['keepalive'], true);
$ext = '_server';
if ($server['type'] != 'data') {
$ext = '';
if ($server['type'] === 'data') {
$ext = '_server';
}
$safe_server_name = servers_get_name($server['id_server']);
if (($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) {
if (($ext === '_server' || $server['type'] == 'enterprise satellite')) {
if (servers_check_remote_config($safe_server_name.$ext) && enterprise_installed()) {
$names_servers[$safe_server_name] = true;
} else {
@ -253,9 +258,19 @@ foreach ($servers as $server) {
);
$data[8] .= '</a>';
if (($names_servers[$safe_server_name] === true) && ($server['type'] === 'data' || $server['type'] === 'enterprise satellite')) {
if (($names_servers[$safe_server_name] === true) && ($ext === '_server' || $server['type'] === 'enterprise satellite')) {
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext.'&tab=agent_editor').'">';
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext).'&tab=standard_editor">';
$data[8] .= html_print_image(
'images/agents@svg.svg',
true,
[
'title' => __('Manage server conf'),
'class' => 'main_menu_icon invert_filter',
]
);
$data[8] .= '</a>';
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server['id_server'].'&ext='.$ext).'">';
$data[8] .= html_print_image(
'images/remote-configuration@svg.svg',
true,
@ -288,6 +303,8 @@ foreach ($servers as $server) {
unset($data[8]);
}
$ext = '';
array_push($table->data, $data);
}

View File

@ -1344,17 +1344,6 @@ $table_vc->style[0] = 'font-weight: bold';
$table_vc->size[0] = '50%';
$table_vc->data = [];
// Remove when the new view reaches rock solid stability.
$table_vc->data[$row][] = html_print_label_input_block(
__('Legacy Visual Console View'),
html_print_checkbox_switch(
'legacy_vc',
1,
(bool) $config['legacy_vc'],
true
)
);
$table_vc->data[$row][] = html_print_label_input_block(
__('Default cache expiration'),
html_print_extended_select_for_time(
@ -1372,7 +1361,6 @@ $table_vc->data[$row][] = html_print_label_input_block(
$intervals
)
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Default interval for refresh on Visual Console'),
@ -1388,6 +1376,7 @@ $table_vc->data[$row][] = html_print_label_input_block(
false
)
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Type of view of visual consoles'),
@ -1401,12 +1390,12 @@ $table_vc->data[$row][] = html_print_label_input_block(
true
)
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Number of favorite visual consoles to show in the menu'),
"<input ' value=".$config['vc_menu_items']." size='5' name='vc_menu_items' min='0' max='25'>"
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Default line thickness for the Visual Console'),
@ -1419,7 +1408,6 @@ $table_vc->data[$row][] = html_print_label_input_block(
true
)
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Lock screen orientation when viewing on mobile devices'),
@ -1430,6 +1418,7 @@ $table_vc->data[$row][] = html_print_label_input_block(
true
)
);
$row++;
$table_vc->data[$row][] = html_print_label_input_block(
__('Display item frame on alert triggered'),

View File

@ -129,6 +129,11 @@ class DiscoveryTaskList extends HTML
}
$delete_console_task = (bool) get_parameter('delete_console_task');
$report_task = (bool) get_parameter('report_task', 0);
if ($report_task === true) {
$this->url = ui_get_full_url('index.php?sec=reporting&sec2=godmode/reporting/reporting_builder');
}
if ($delete_console_task === true) {
return $this->deleteConsoleTask();
}
@ -287,6 +292,10 @@ class DiscoveryTaskList extends HTML
}
$id_console_task = (int) get_parameter('id_console_task');
$report_task = (bool) get_parameter('report_task', 0);
if ($report_task === true) {
$this->url = ui_get_full_url('index.php?sec=reporting&sec2=godmode/reporting/reporting_builder');
}
if ($id_console_task != null) {
// --------------------------------
@ -352,6 +361,10 @@ class DiscoveryTaskList extends HTML
}
$id_console_task = (int) get_parameter('id_console_task');
$report_task = (bool) get_parameter('report_task', 0);
if ($report_task === true) {
$this->url = ui_get_full_url('index.php?sec=reporting&sec2=godmode/reporting/reporting_builder');
}
if ($id_console_task > 0) {
$result = db_process_sql_update(
@ -1096,9 +1109,9 @@ class DiscoveryTaskList extends HTML
*
* @return boolean Success or not.
*/
public function showListConsoleTask()
public function showListConsoleTask($report_task=false)
{
return enterprise_hook('tasklist_showListConsoleTask', [$this]);
return enterprise_hook('tasklist_showListConsoleTask', [$this, $report_task]);
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Reportes programados@svg</title>
<g id="Reportes-programados" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M8.00059781,0 C8.54059781,0 9.00059781,0.363636364 9.00059781,0.909090909 L9.00059781,4.07934284 C9.00059781,5.35207011 9.69059781,6 10.9505978,6 L14.1005978,6 C14.6405978,6 15.0005978,6.45454545 15.0005978,7 L15.0005978,16.3636364 C15.0005978,18.3636364 13.3805978,20 11.4005978,20 L5.24310254,20.0009635 C7.48899044,18.7052484 9.00059781,16.2791516 9.00059781,13.5 C9.00059781,9.35786438 5.64273343,6 1.50059781,6 C0.986687841,6 0.484850221,6.05168787 -2.12052598e-14,6.15014855 L0.000597808993,3.63636364 C0.000597808993,1.63636364 1.62059781,0 3.60059781,0 Z M10.0001439,1 L14.0005978,5 L11.0001439,5 C10.4478591,5 10.0001439,4.55228475 10.0001439,4 L10.0001439,1 Z" id="Shape" fill="#3F3F3F" transform="translate(7.500299, 10.000482) scale(-1, 1) translate(-7.500299, -10.000482) "></path>
<path d="M13.5,7 C17.0898509,7 20,9.91014913 20,13.5 C20,17.0898509 17.0898509,20 13.5,20 C9.91014913,20 7,17.0898509 7,13.5 C7,9.91014913 9.91014913,7 13.5,7 Z M14.0002191,9 C13.4873832,9 13.0647119,9.38604019 13.0069468,9.88337887 L13.0002191,10 L13.0002191,13.382 L11.4068856,14.2067645 C10.9481913,14.4361116 10.742785,14.9704208 10.9135349,15.4410874 L10.959672,15.5484052 C11.1890192,16.0070996 11.7233284,16.2125059 12.193995,16.0417559 L12.3013128,15.9956188 L14.4474327,14.8944272 C14.748574,14.7438565 14.9511225,14.4535358 14.9924154,14.1248553 L15.0002191,14 L15.0002191,10 C15.0002191,9.44771525 14.5525038,9 14.0002191,9 Z" id="Oval-2" fill="#3F3F3F"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -84,7 +84,7 @@ if ($save_log_filter) {
if ($recover_aduit_log_select) {
echo json_encode(audit_get_audit_filter_select());
echo json_encode(audit_get_audit_filter_select_fix_order());
}
if ($update_log_filter) {
@ -190,7 +190,7 @@ function show_filter() {
draggable: true,
modal: false,
closeOnEscape: true,
width: 380
width: "auto"
});
}
@ -207,12 +207,13 @@ function load_filter_values() {
},
success: function(data) {
var options = "";
console.log(data);
$.each(data,function(i,value){
if (i == 'text'){
$("#text-filter_text").val(value);
}
if (i == 'period'){
$("#text-filter_period").val(value);
$("#filter_period").val(value).change();
}
if (i == 'ip'){
$("#text-filter_ip").val(value);
@ -395,7 +396,7 @@ function save_new_filter() {
"save_log_filter" : 1,
"id_name" : $("#text-id_name").val(),
"text" : $("#text-filter_text").val(),
"period" : $("#text-filter_period").val(),
"period" : $("#filter_period :selected").val(),
"ip" : $('#text-filter_ip').val(),
"type" : $('#filter_type :selected').val(),
"user" : $('#filter_user :selected').val(),
@ -431,7 +432,7 @@ function save_update_filter() {
"update_log_filter" : 1,
"id" : $("#overwrite_filter :selected").val(),
"text" : $("#text-filter_text").val(),
"period" : $("#text-filter_period").val(),
"period" : $("#filter_period :selected").val(),
"ip" : $('#text-filter_ip').val(),
"type" : $('#filter_type :selected').val(),
"user" : $('#filter_user :selected').val(),

View File

@ -469,7 +469,7 @@ class AuditLog extends HTML
success: function(data) {
var options = "";
$.each(data,function(key,value){
options += "<option value='"+key+"'>"+value+"</option>";
options += "<option value='"+value+"'>"+key+"</option>";
});
$('#overwrite_filter').html(options);
$('#overwrite_filter').select2();
@ -509,8 +509,12 @@ class AuditLog extends HTML
/* Filter management */
$('#button-load-filter').click(function (){
if($('#load-filter-select').length) {
$('#load-filter-select').dialog({width: "20%",
maxWidth: "25%",
$('#load-filter-select').dialog({
resizable: true,
draggable: true,
modal: false,
closeOnEscape: true,
width: "auto",
title: "<?php echo __('Load filter'); ?>"
});
$.ajax({
@ -523,8 +527,9 @@ class AuditLog extends HTML
},
success: function(data) {
var options = "";
console.log(data)
$.each(data,function(key,value){
options += "<option value='"+key+"'>"+value+"</option>";
options += "<option value='"+value+"'>"+key+"</option>";
});
$('#filter_id').html(options);
$('#filter_id').select2();

View File

@ -519,6 +519,8 @@ class SnmpConsole extends HTML
$legend .= '</div>';
$legend .= '</div></div></td>';
echo '<br>';
ui_toggle($legend, __('Legend'));
// Load own javascript file.
@ -1331,17 +1333,8 @@ class SnmpConsole extends HTML
* Show more information
*/
function toggleVisibleExtendedInfo(id, position) {
// Show all "Show more"
$('[id^=img_]').each(function() {
$(this).show();
});
// Hide all "Hide details"
$('[id^=img_hide_]').each(function() {
$(this).hide();
});
var status = $('#eye_'+id).attr('data-show');
if(status == "show"){
$('tr[id^=show_]').remove()
$.ajax({
method: 'get',
url: '<?php echo ui_get_full_url('ajax.php', false, false, false); ?>',
@ -1360,14 +1353,14 @@ class SnmpConsole extends HTML
datatype: "json",
success: function(data) {
let trap = JSON.parse(data);
var tr = $('#snmp_console tr').eq(position+1);
var tr = $('#snmp_console tr:not([id^="show_"])').eq(position+1);
// Count.
if ($('#filter_group_by').val() == 1) {
let labelCount = '<td align="left" valign="top"><b><?php echo __('Count:'); ?></b></br><b><?php echo __('First trap:'); ?></b></br><b><?php echo __('Last trap:'); ?></td>';
let variableCount = `<td align="left" valign="top" style="line-height: 16pt">${trap['count']}</br>${trap['first']}</br>${trap['last']}</td>`;
tr.after(`<tr id="show_" role="row">${labelCount}${variableCount}</tr>`);
tr.after(`<tr id="show_${id}" role="row">${labelCount}${variableCount}</tr>`);
}
// Type.
@ -1405,27 +1398,27 @@ class SnmpConsole extends HTML
let labelType = '<td align="left" valign="top"><b><?php echo __('Type:'); ?></td>';
let variableType = `<td align="left" colspan="8">${desc_trap_type}</td>`;
tr.after(`<tr id="show_" role="row">${labelType}${variableType}</tr>`);
tr.after(`<tr id="show_${id}" role="row">${labelType}${variableType}</tr>`);
// Description.
if (trap['description']) {
let labelDesc = '<td align="left" valign="top"><b><?php echo __('Description:'); ?></td>';
let variableDesc = `<td align="left" colspan="8">${trap['description']}</td>`;
tr.after(`<tr id="show_" role="row">${labelDesc}${variableDesc}</tr>`);
tr.after(`<tr id="show_${id}" role="row">${labelDesc}${variableDesc}</tr>`);
}
// Enterprise String.
let labelOid = '<td align="left" valign="top"><b><?php echo __('Enterprise String:'); ?></td>';
let variableOId = `<td align="left" colspan="8">${trap['oid']}</td>`;
tr.after(`<tr id="show_" role="row">${labelOid}${variableOId}</tr>`);
tr.after(`<tr id="show_${id}" role="row">${labelOid}${variableOId}</tr>`);
// Variable bindings.
let labelBindings = '';
let variableBindings = '';
if ($('#filter_group_by').val() == 1) {
labelBindings = '<td align="left" valign="top" width="15%"><b><?php echo __('Variable bindings:'); ?></b></td>';
labelBindings = '<td align="left" valign="top" ><b><?php echo __('Variable bindings:'); ?></b></td>';
let new_url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view';
new_url += '&filter_severity='+$('#filter_severity').val();
@ -1439,7 +1432,7 @@ class SnmpConsole extends HTML
variableBindings = `<td align="left" colspan="8">${string}</td>`;
} else {
labelBindings = '<td align="left" valign="top" width="15%"><b><?php echo __('Variable bindings:'); ?></b></td>';
labelBindings = '<td align="left" valign="top" ><b><?php echo __('Variable bindings:'); ?></b></td>';
const binding_vars = trap['oid_custom'].split("\t");
let string = '';
binding_vars.forEach(function(oid) {
@ -1448,7 +1441,7 @@ class SnmpConsole extends HTML
variableBindings = `<td align="left" colspan="8" class="break-word w200px">${string}</td>`;
}
tr.after(`<tr id="show_" role="row">${labelBindings}${variableBindings}</tr>`);
tr.after(`<tr id="show_${id}" role="row">${labelBindings}${variableBindings}</tr>`);
},
error: function(e) {
console.error(e);
@ -1458,7 +1451,7 @@ class SnmpConsole extends HTML
$('#img_'+id).hide();
$('#img_hide_'+id).show();
} else{
$('tr[id^=show_]').remove();
$(`tr#show_${id}`).remove();
$('#eye_'+id).attr('data-show', 'show');
$('#img_'+id).show();
$('#img_hide_'+id).hide();

View File

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

View File

@ -3479,10 +3479,6 @@ function config_process_config()
config_update_value('dbtype', 'mysql');
}
if (!isset($config['legacy_vc'])) {
config_update_value('legacy_vc', 0);
}
if (!isset($config['vc_default_cache_expiration'])) {
config_update_value('vc_default_cache_expiration', 60);
}

View File

@ -5504,7 +5504,10 @@ function html_print_input($data, $wrapper='div', $input_only=false)
($data['attributes'] ?? null),
((isset($data['return']) === true) ? $data['return'] : false),
((isset($data['password']) === true) ? $data['password'] : false),
((isset($data['function']) === true) ? $data['function'] : '')
((isset($data['function']) === true) ? $data['function'] : ''),
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : 'off'),
((isset($data['disabled']) === true) ? $data['disabled'] : false),
((isset($data['hide_div_eye']) === true) ? $data['hide_div_eye'] : false),
);
break;

View File

@ -1274,52 +1274,50 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
);
$form_items_advance['element_group_row']['html'] .= '</td>';
if (!$config['legacy_vc']) {
$intervals = [
10 => '10 '.__('seconds'),
30 => '30 '.__('seconds'),
60 => '1 '.__('minutes'),
300 => '5 '.__('minutes'),
900 => '15 '.__('minutes'),
1800 => '30 '.__('minutes'),
3600 => '1 '.__('hour'),
];
$intervals = [
10 => '10 '.__('seconds'),
30 => '30 '.__('seconds'),
60 => '1 '.__('minutes'),
300 => '5 '.__('minutes'),
900 => '15 '.__('minutes'),
1800 => '30 '.__('minutes'),
3600 => '1 '.__('hour'),
];
$form_items_advance['cache_expiration_row'] = [];
$form_items_advance['cache_expiration_row']['items'] = [
'static_graph',
'percentile_bar',
'percentile_item',
'module_graph',
'simple_value',
'datos',
'auto_sla_graph',
'group_item',
'bars_graph',
'donut_graph',
'color_cloud',
'service',
];
$form_items_advance['cache_expiration_row']['html'] = '<td align="left">';
$form_items_advance['cache_expiration_row']['html'] .= __('Cache expiration');
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
$form_items_advance['cache_expiration_row']['html'] .= '<td align="left">';
$form_items_advance['cache_expiration_row']['html'] .= html_print_extended_select_for_time(
'cache_expiration',
$config['vc_default_cache_expiration'],
'',
__('No cache'),
0,
false,
true,
false,
true,
'',
false,
$intervals
);
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
}
$form_items_advance['cache_expiration_row'] = [];
$form_items_advance['cache_expiration_row']['items'] = [
'static_graph',
'percentile_bar',
'percentile_item',
'module_graph',
'simple_value',
'datos',
'auto_sla_graph',
'group_item',
'bars_graph',
'donut_graph',
'color_cloud',
'service',
];
$form_items_advance['cache_expiration_row']['html'] = '<td align="left">';
$form_items_advance['cache_expiration_row']['html'] .= __('Cache expiration');
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
$form_items_advance['cache_expiration_row']['html'] .= '<td align="left">';
$form_items_advance['cache_expiration_row']['html'] .= html_print_extended_select_for_time(
'cache_expiration',
$config['vc_default_cache_expiration'],
'',
__('No cache'),
0,
false,
true,
false,
true,
'',
false,
$intervals
);
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
// Insert and modify before the buttons to create or update.
if (enterprise_installed()) {
@ -1454,12 +1452,9 @@ function visual_map_editor_print_toolbox()
visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item', true);
visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item', true);
visual_map_print_button_editor('color_cloud', __('Color cloud'), 'left', false, 'color_cloud_min', true);
if (isset($config['legacy_vc']) === false
|| (bool) $config['legacy_vc'] === false
) {
// Applies only on modern VC.
visual_map_print_button_editor('network_link', __('Network link'), 'left', false, 'network_link_min', true);
}
// Applies only on modern VC.
visual_map_print_button_editor('network_link', __('Network link'), 'left', false, 'network_link_min', true);
if (defined('METACONSOLE')) {
echo '<a href="javascript:" class="tip"><img src="'.$config['homeurl_static'].'/images/tip.png" data-title="The data displayed in editor mode is not real" data-use_title_for_force_title="1"

View File

@ -259,7 +259,7 @@ function flot_area_graph(
$return .= html_print_input_hidden(
'line_width_graph',
$config['custom_graph_width'],
(empty($params['line_width']) === true) ? $config['custom_graph_width'] : $params['line_width'],
true
);
$return .= "<div id='timestamp_$graph_id'

View File

@ -4,6 +4,7 @@ var config = config;
var datacolumns = [];
var datacolumnsTemp = [];
dt.datacolumns.forEach(column => {
if (column === null) return;
if (typeof column !== "string") {
datacolumnsTemp = { data: column.text, className: column.class };
datacolumns.push(datacolumnsTemp);

View File

@ -297,6 +297,14 @@ class BasicChart extends Widget
$values['label'] = $decoder['label'];
}
if (isset($decoder['type_graph']) === true) {
$values['type_graph'] = $decoder['type_graph'];
}
if (isset($decoder['line_width']) === true) {
$values['line_width'] = $decoder['line_width'];
}
return $values;
}
@ -477,6 +485,22 @@ class BasicChart extends Widget
],
];
$types_graph = [
'area' => __('Area'),
'line' => __('Wire'),
];
$inputs['inputs']['row1'][] = [
'label' => __('Type graph'),
'arguments' => [
'type' => 'select',
'fields' => $types_graph,
'name' => 'type_graph',
'selected' => $values['type_graph'],
'return' => true,
],
];
$inputs['inputs']['row2'][] = [
'label' => __('Show Value'),
'arguments' => [
@ -520,6 +544,18 @@ class BasicChart extends Widget
],
];
$inputs['inputs']['row2'][] = [
'label' => __('Graph line size'),
'arguments' => [
'name' => 'line_width',
'type' => 'number',
'value' => (empty($values['line_width']) === true) ? 3 : $values['line_width'],
'return' => true,
'min' => 2,
'max' => 10,
],
];
return $inputs;
}
@ -546,6 +582,8 @@ class BasicChart extends Widget
$values['colorChart'] = \get_parameter('colorChart');
$values['formatData'] = \get_parameter_switch('formatData');
$values['label'] = \get_parameter('label');
$values['type_graph'] = \get_parameter('type_graph');
$values['line_width'] = \get_parameter('line_width');
return $values;
}
@ -606,6 +644,8 @@ class BasicChart extends Widget
'title' => $module_name,
'unit' => $units_name,
'only_image' => false,
'type_graph' => $this->values['type_graph'],
'line_width' => (empty($this->values['line_width']) === true) ? 3 : $this->values['line_width'],
'menu' => false,
'vconsole' => true,
'return_img_base_64' => false,

View File

@ -351,6 +351,7 @@ span.span1 {
font-family: "lato-bolder";
color: #fff;
margin-right: 30px;
text-shadow: 2px 2px #000;
}
span.span2 {
@ -361,6 +362,7 @@ span.span2 {
font-family: "lato-bolder";
color: #fff;
margin-right: 30px;
text-shadow: 2px 2px #000;
}
div.img_banner_login img {

View File

@ -4210,13 +4210,6 @@ div.simple_value > a > span.text p {
}
.modalokbutton {
transition-property: background-color, color;
transition-duration: 1s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color, color;
-webkit-transition-duration: 1s;
-o-transition-property: background-color, color;
-o-transition-duration: 1s;
cursor: pointer;
text-align: center;
margin-right: 45px;
@ -4227,44 +4220,24 @@ div.simple_value > a > span.text p {
border-radius: 3px;
width: 90px;
height: 30px;
background-color: white;
border: 1px solid #82b92e;
background-color: var(--primary-color);
border: 1px solid var(--primary-color);
border-radius: 6px;
}
.modalokbuttontext {
transition-property: background-color, color;
transition-duration: 1s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color, color;
-webkit-transition-duration: 1s;
-o-transition-property: background-color, color;
-o-transition-duration: 1s;
color: #82b92e;
color: #fff;
font-size: 10pt;
position: relative;
top: 6px;
}
.modalokbutton:hover {
transition-property: background-color, color;
transition-duration: 1s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color, color;
-webkit-transition-duration: 1s;
-o-transition-property: background-color, color;
-o-transition-duration: 1s;
background-color: #82b92e;
background-color: var(--primary-color);
}
.modalokbutton:hover .modalokbuttontext {
transition-property: background-color, color;
transition-duration: 1s;
transition-timing-function: ease-out;
-webkit-transition-property: background-color, color;
-webkit-transition-duration: 1s;
-o-transition-property: background-color, color;
-o-transition-duration: 1s;
color: white;
color: #fff;
}
.modaldeletebutton {
@ -7623,6 +7596,10 @@ div.graph div.legend table {
padding-bottom: 10px !important;
}
.pdd_b_15px_important {
padding-bottom: 15px !important;
}
.pdd_b_20px {
padding-bottom: 20px;
}
@ -7701,6 +7678,10 @@ div.graph div.legend table {
padding-top: 15px;
}
.pdd_t_15px_important {
padding-top: 15px !important;
}
.pdd_t_20px {
padding-top: 20px;
}
@ -11666,14 +11647,14 @@ p.trademark-copyright {
}
.show-hide-pass {
position: relative;
right: 40px;
position: absolute;
right: 9px;
top: 4px;
border: 0;
outline: none;
margin: 0;
height: 30px;
width: 30px;
width: 40px;
cursor: pointer;
display: inline-block;
}
@ -12342,3 +12323,10 @@ tr[id^="network_component-plugin-wmi-fields-dynamicMacroRow-"] input,
tr[id^="network_component-plugin-snmp-fields-dynamicMacroRow-"] input {
width: 100% !important;
}
.start-end-date-log-viewer {
display: flex;
flex-direction: row !important;
flex-wrap: nowrap;
justify-content: flex-start !important;
}

View File

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

View File

@ -60,15 +60,13 @@ class Home
'icon' => 'ui-icon-menu-group ui-widget-icon-floatbeginning ui-icon-menu-square',
];
if ((bool) $system->getConfig('legacy_vc', false) === false) {
// Show Visual consoles only if new system is enabled.
$items['visualmaps'] = [
'name' => __('Visual consoles'),
'filename' => 'visualmaps.php',
'menu_item' => true,
'icon' => 'ui-icon-menu-visual_console ui-widget-icon-floatbeginning ui-icon-menu-square',
];
}
// Show Visual consoles only if new system is enabled.
$items['visualmaps'] = [
'name' => __('Visual consoles'),
'filename' => 'visualmaps.php',
'menu_item' => true,
'icon' => 'ui-icon-menu-visual_console ui-widget-icon-floatbeginning ui-icon-menu-square',
];
$items['alerts'] = [
'name' => __('Alerts'),

View File

@ -258,7 +258,8 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che
);
}
if ($print_agent === true) {
/*
if ($print_agent === true) {
array_push(
$column_names,
['text' => 'Agent']
@ -268,11 +269,12 @@ if ((bool) check_acl($config['id_user'], $id_group, 'LW') === true || (bool) che
$columns,
['agent_name']
);
}
}*/
}
array_push(
$column_names,
['text' => 'Agent'],
['text' => 'Module'],
['text' => 'Template'],
[
@ -286,6 +288,7 @@ array_push(
$columns = array_merge(
$columns,
['agent_name'],
['agent_module_name'],
['template_name'],
['action'],

View File

@ -256,152 +256,165 @@ if ($new_networkmap || $save_networkmap) {
$name = (string) get_parameter('name');
// Default size values.
$width = $config['networkmap_max_width'];
$height = $config['networkmap_max_width'];
$method = (string) get_parameter('method', 'fdp');
$recon_task_id = (int) get_parameter(
'recon_task_id',
0
$exist = db_get_row_filter(
'tmap',
[
'name' => $name,
'id_group_map' => $id_group_map,
],
);
$ip_mask = get_parameter(
'ip_mask',
''
);
$source = (string) get_parameter('source', 'group');
$dont_show_subgroups = (int) get_parameter_checkbox(
'dont_show_subgroups',
0
);
$node_radius = (int) get_parameter('node_radius', 40);
$description = get_parameter('description', '');
hd('Entraaaa', true);
hd($exist, true);
if ($exist !== false) {
$result_txt = ui_print_error_message(__('Another network map already exists with this name and group.'));
} else {
// Default size values.
$width = $config['networkmap_max_width'];
$height = $config['networkmap_max_width'];
$offset_x = get_parameter('pos_x', 0);
$offset_y = get_parameter('pos_y', 0);
$scale_z = get_parameter('scale_z', 0.5);
$method = (string) get_parameter('method', 'fdp');
$node_sep = get_parameter('node_sep', '0.25');
$rank_sep = get_parameter('rank_sep', ($method === 'twopi') ? '1.0' : '0.5');
$mindist = get_parameter('mindist', '1.0');
$kval = get_parameter('kval', '0.3');
$refresh_time = get_parameter('refresh_time', '300');
$values = [];
$values['name'] = $name;
$values['id_group'] = implode(',', $id_group);
$values['source_period'] = 60;
$values['width'] = $width;
$values['height'] = $height;
$values['id_user'] = $config['id_user'];
$values['description'] = $description;
$values['id_group_map'] = $id_group_map;
$values['refresh_time'] = $refresh_time;
switch ($method) {
case 'twopi':
$values['generation_method'] = LAYOUT_RADIAL;
break;
case 'dot':
$values['generation_method'] = LAYOUT_FLAT;
break;
case 'circo':
$values['generation_method'] = LAYOUT_CIRCULAR;
break;
case 'neato':
$values['generation_method'] = LAYOUT_SPRING1;
break;
case 'fdp':
$values['generation_method'] = LAYOUT_SPRING2;
break;
case 'radial_dinamic':
$values['generation_method'] = LAYOUT_RADIAL_DYNAMIC;
break;
default:
$values['generation_method'] = LAYOUT_RADIAL;
break;
}
if ($source == 'group') {
$values['source'] = 0;
$values['source_data'] = implode(',', $id_group);
} else if ($source == 'recon_task') {
$values['source'] = 1;
$values['source_data'] = $recon_task_id;
} else if ($source == 'ip_mask') {
$values['source'] = 2;
$values['source_data'] = $ip_mask;
}
if ($networkmap_write === false && $networkmap_manage === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access networkmap'
$recon_task_id = (int) get_parameter(
'recon_task_id',
0
);
include 'general/noaccess.php';
return;
}
$filter = [];
$filter['dont_show_subgroups'] = $dont_show_subgroups;
$filter['node_radius'] = $node_radius;
$filter['x_offs'] = $offset_x;
$filter['y_offs'] = $offset_y;
$filter['z_dash'] = $scale_z;
$filter['node_sep'] = $node_sep;
$filter['rank_sep'] = $rank_sep;
$filter['mindist'] = $mindist;
$filter['kval'] = $kval;
$values['filter'] = json_encode($filter);
$result = false;
if (!empty($name)) {
$result = db_process_sql_insert(
'tmap',
$values
$ip_mask = get_parameter(
'ip_mask',
''
);
}
$source = (string) get_parameter('source', 'group');
$dont_show_subgroups = (int) get_parameter_checkbox(
'dont_show_subgroups',
0
);
$node_radius = (int) get_parameter('node_radius', 40);
$description = get_parameter('description', '');
$result_txt = ui_print_result_message(
$result,
__('Succesfully created'),
__('Could not be created'),
'',
true
);
$offset_x = get_parameter('pos_x', 0);
$offset_y = get_parameter('pos_y', 0);
$scale_z = get_parameter('scale_z', 0.5);
$id = $result;
define('_id_', $id);
$node_sep = get_parameter('node_sep', '0.25');
$rank_sep = get_parameter('rank_sep', ($method === 'twopi') ? '1.0' : '0.5');
if ($result !== false) {
$tab = 'view';
if ($values['generation_method'] == LAYOUT_RADIAL_DYNAMIC) {
$tab = 'r_dinamic';
define('_activeTab_', 'radial_dynamic');
$url = 'index.php?sec=network&sec2=operation/agentes/networkmap.dinamic&activeTab=radial_dynamic';
header(
'Location: '.ui_get_full_url(
$url.'&id_networkmap='.$id
)
$mindist = get_parameter('mindist', '1.0');
$kval = get_parameter('kval', '0.3');
$refresh_time = get_parameter('refresh_time', '300');
$values = [];
$values['name'] = $name;
$values['id_group'] = implode(',', $id_group);
$values['source_period'] = 60;
$values['width'] = $width;
$values['height'] = $height;
$values['id_user'] = $config['id_user'];
$values['description'] = $description;
$values['id_group_map'] = $id_group_map;
$values['refresh_time'] = $refresh_time;
switch ($method) {
case 'twopi':
$values['generation_method'] = LAYOUT_RADIAL;
break;
case 'dot':
$values['generation_method'] = LAYOUT_FLAT;
break;
case 'circo':
$values['generation_method'] = LAYOUT_CIRCULAR;
break;
case 'neato':
$values['generation_method'] = LAYOUT_SPRING1;
break;
case 'fdp':
$values['generation_method'] = LAYOUT_SPRING2;
break;
case 'radial_dinamic':
$values['generation_method'] = LAYOUT_RADIAL_DYNAMIC;
break;
default:
$values['generation_method'] = LAYOUT_RADIAL;
break;
}
if ($source == 'group') {
$values['source'] = 0;
$values['source_data'] = implode(',', $id_group);
} else if ($source == 'recon_task') {
$values['source'] = 1;
$values['source_data'] = $recon_task_id;
} else if ($source == 'ip_mask') {
$values['source'] = 2;
$values['source_data'] = $ip_mask;
}
if ($networkmap_write === false && $networkmap_manage === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access networkmap'
);
} else {
$url = 'index.php?sec=network&sec2=operation/agentes/pandora_networkmap';
header(
'Location: '.ui_get_full_url(
$url.'&tab='.$tab.'&id_networkmap='.$id
)
include 'general/noaccess.php';
return;
}
$filter = [];
$filter['dont_show_subgroups'] = $dont_show_subgroups;
$filter['node_radius'] = $node_radius;
$filter['x_offs'] = $offset_x;
$filter['y_offs'] = $offset_y;
$filter['z_dash'] = $scale_z;
$filter['node_sep'] = $node_sep;
$filter['rank_sep'] = $rank_sep;
$filter['mindist'] = $mindist;
$filter['kval'] = $kval;
$values['filter'] = json_encode($filter);
$result = false;
if (!empty($name)) {
$result = db_process_sql_insert(
'tmap',
$values
);
}
$result_txt = ui_print_result_message(
$result,
__('Succesfully created'),
__('Could not be created'),
'',
true
);
$id = $result;
define('_id_', $id);
if ($result !== false) {
$tab = 'view';
if ($values['generation_method'] == LAYOUT_RADIAL_DYNAMIC) {
$tab = 'r_dinamic';
define('_activeTab_', 'radial_dynamic');
$url = 'index.php?sec=network&sec2=operation/agentes/networkmap.dinamic&activeTab=radial_dynamic';
header(
'Location: '.ui_get_full_url(
$url.'&id_networkmap='.$id
)
);
} else {
$url = 'index.php?sec=network&sec2=operation/agentes/pandora_networkmap';
header(
'Location: '.ui_get_full_url(
$url.'&tab='.$tab.'&id_networkmap='.$id
)
);
}
}
}
}
}
@ -464,70 +477,81 @@ else if ($update_networkmap || $copy_networkmap || $delete) {
}
$name = (string) get_parameter('name', '');
$recon_task_id = (int) get_parameter(
'recon_task_id',
0
$exist = db_get_row_filter(
'tmap',
[
'name' => $name,
'id_group_map' => $id_group_map,
],
);
$source = (string) get_parameter('source', 'group');
$offset_x = get_parameter('pos_x', 0);
$offset_y = get_parameter('pos_y', 0);
$scale_z = get_parameter('scale_z', 0.5);
$refresh_time = get_parameter('refresh_time', '300');
$values = [];
$values['name'] = $name;
$values['id_group'] = implode(',', $id_group);
$values['id_group_map'] = $id_group_map;
$description = get_parameter('description', '');
$values['description'] = $description;
$values['refresh_time'] = $refresh_time;
$dont_show_subgroups = (int) get_parameter('dont_show_subgroups', 0);
$node_radius = (int) get_parameter('node_radius', 40);
$row = db_get_row('tmap', 'id', $id);
$filter = json_decode($row['filter'], true);
$filter['dont_show_subgroups'] = $dont_show_subgroups;
$filter['node_radius'] = $node_radius;
$filter['x_offs'] = $offset_x;
$filter['y_offs'] = $offset_y;
$filter['z_dash'] = $scale_z;
$values['filter'] = json_encode($filter);
$result = false;
if (empty($name) === false) {
$result = db_process_sql_update(
'tmap',
$values,
['id' => $id]
if ($exist !== false) {
$result_txt = ui_print_error_message(__('Another network map already exists with this name and group.'));
} else {
$recon_task_id = (int) get_parameter(
'recon_task_id',
0
);
ui_update_name_fav_element($id, 'Network_map', $name);
}
$result_txt = ui_print_result_message(
$result,
__('Succesfully updated'),
__('Could not be updated'),
'',
true
);
$source = (string) get_parameter('source', 'group');
if ($result) {
// If change the group, the map must be regenerated
if ($id_group != $id_group_old) {
networkmap_delete_nodes($id);
// Delete relations.
networkmap_delete_relations($id);
$offset_x = get_parameter('pos_x', 0);
$offset_y = get_parameter('pos_y', 0);
$scale_z = get_parameter('scale_z', 0.5);
$refresh_time = get_parameter('refresh_time', '300');
$values = [];
$values['name'] = $name;
$values['id_group'] = implode(',', $id_group);
$values['id_group_map'] = $id_group_map;
$description = get_parameter('description', '');
$values['description'] = $description;
$values['refresh_time'] = $refresh_time;
$dont_show_subgroups = (int) get_parameter('dont_show_subgroups', 0);
$node_radius = (int) get_parameter('node_radius', 40);
$row = db_get_row('tmap', 'id', $id);
$filter = json_decode($row['filter'], true);
$filter['dont_show_subgroups'] = $dont_show_subgroups;
$filter['node_radius'] = $node_radius;
$filter['x_offs'] = $offset_x;
$filter['y_offs'] = $offset_y;
$filter['z_dash'] = $scale_z;
$values['filter'] = json_encode($filter);
$result = false;
if (empty($name) === false) {
$result = db_process_sql_update(
'tmap',
$values,
['id' => $id]
);
ui_update_name_fav_element($id, 'Network_map', $name);
}
$networkmap_write = $networkmap_write_new;
$networkmap_manage = $networkmap_manage_new;
$result_txt = ui_print_result_message(
$result,
__('Succesfully updated'),
__('Could not be updated'),
'',
true
);
if ($result) {
// If change the group, the map must be regenerated
if ($id_group != $id_group_old) {
networkmap_delete_nodes($id);
// Delete relations.
networkmap_delete_relations($id);
}
$networkmap_write = $networkmap_write_new;
$networkmap_manage = $networkmap_manage_new;
}
}
}

View File

@ -15,13 +15,8 @@
// The session is configured and started inside the config process.
require_once '../../include/config.php';
$legacy = (bool) get_parameter('legacy', $config['legacy_vc']);
if (is_metaconsole() === true) {
$config['requirements_use_base_url'] = true;
}
if ($legacy === false) {
include_once $config['homedir'].'/operation/visual_console/public_view.php';
} else {
include_once $config['homedir'].'/operation/visual_console/legacy_public_view.php';
}
require_once $config['homedir'].'/operation/visual_console/public_view.php';

View File

@ -13,9 +13,4 @@
// GNU General Public License for more details.
global $config;
$legacy = (bool) get_parameter('legacy', $config['legacy_vc']);
if ($legacy === false) {
include_once $config['homedir'].'/operation/visual_console/view.php';
} else {
include_once $config['homedir'].'/operation/visual_console/legacy_view.php';
}
require_once $config['homedir'].'/operation/visual_console/view.php';

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.772
%define release 230724
%define release 230727
# User and Group under which Apache is running
%define httpd_name httpd
@ -15,7 +15,7 @@ Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Vendor: Artica ST <info@artica.es>
Vendor: Pandora FMS <info@pandorafms.com>
#Source0: %{name}-%{version}-%{revision}.tar.gz
Source0: %{name}-%{version}.tar.gz
URL: http://www.pandorafms.com

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.772
%define release 230724
%define release 230727
# User and Group under which Apache is running
%define httpd_name httpd
@ -15,7 +15,7 @@ Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Vendor: Artica ST <info@artica.es>
Vendor: Pandora FMS <info@pandorafms.com>
#Source0: %{name}-%{version}-%{revision}.tar.gz
Source0: %{name}-%{version}.tar.gz
URL: http://www.pandorafms.com

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.772
%define release 230724
%define release 230727
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
@ -18,7 +18,7 @@ Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Vendor: Artica ST <info@artica.es>
Vendor: Pandora FMS <info@pandorafms.com>
Source0: %{name}-%{version}.tar.gz
URL: http://www.pandorafms.org
Group: System/Monitoring

View File

@ -39,7 +39,7 @@ if [[ -z ${PANDORA_RB_PRODUCT_NAME} ]]; then
PANDORA_RB_PRODUCT_NAME="Pandora FMS"
fi
if [[ -z ${PANDORA_RB_COPYRIGHT_NOTICE} ]]; then
PANDORA_RB_COPYRIGHT_NOTICE="Artica ST"
PANDORA_RB_COPYRIGHT_NOTICE="Pandora FMS"
fi
export PANDORA_RB_PRODUCT_NAME=$PANDORA_RB_PRODUCT_NAME

View File

@ -7,7 +7,7 @@
"php"
],
"readme": "README.md",
"homepage": "https://artica.es/",
"homepage": "https://pandorafms.com/",
"type": "package",
"version": "v1.0.2",
"license": "AGPL-3.0-or-later",

View File

@ -629,7 +629,7 @@
}
],
"description": "PHP library for ChartJS",
"homepage": "https://artica.es/",
"homepage": "https://pandorafms.com/",
"keywords": [
"chartjs",
"graph",

View File

@ -1,10 +1,10 @@
package: pandorafms-server
Version: 7.0NG.772-230724
Version: 7.0NG.772-230727
Architecture: all
Priority: optional
Section: admin
Installed-Size: 640
Maintainer: ÁRTICA ST <info@artica.es>
Maintainer: Pandora FMS <info@pandorafms.com>
Homepage: http://pandorafms.org/
Depends: perl (>= 5.8), libdbi-perl, libdbd-mysql-perl, libtime-format-perl, libnetaddr-ip-perl, libtime-format-perl, libxml-simple-perl, libxml-twig-perl, libhtml-parser-perl, snmp, snmpd, traceroute, nmap, sudo, libwww-perl, libsocket6-perl, libio-socket-inet6-perl, libio-socket-ssl-perl, snmp-mibs-downloader, libjson-perl, libnet-telnet-perl, libencode-locale-perl, libgeo-ip-perl
Description: Pandora FMS is a monitoring system for big IT environments. It uses remote tests, or local agents to grab information. Pandora supports all standard OS (Linux, AIX, HP-UX, Solaris and Windows XP,2000/2003), and support multiple setups in HA enviroments. This is the server package. Server makes the remote checks and process information transfer by Pandora FMS agents to the server.

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.772-230724"
pandora_version="7.0NG.772-230727"
package_cpan=0
package_pandora=1

View File

@ -17,7 +17,7 @@ WriteMakefile(
NAME => 'PandoraFMS',
VERSION_FROM => 'lib/PandoraFMS/Config.pm',
AUTHOR => 'Artica ST <info@artica.es>',
AUTHOR => 'Pandora FMS <info@pandorafms.com>',
PREREQ_PM => {
NetAddr::IP => 0,
DBI => 0,

View File

@ -46,7 +46,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.772";
my $pandora_build = "230724";
my $pandora_build = "230727";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -1535,7 +1535,7 @@ sub pandora_get_initial_product_name {
sub pandora_get_initial_copyright_notice {
# PandoraFMS product name
my $name = $ENV{'PANDORA_RB_COPYRIGHT_NOTICE'};
return 'Artica ST' unless (defined ($name) && $name ne '');
return 'Pandora FMS' unless (defined ($name) && $name ne '');
return $name;
}

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.772";
my $pandora_build = "230724";
my $pandora_build = "230727";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

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

View File

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

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.772"
PI_BUILD="230724"
PI_BUILD="230727"
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.772 Build 230724";
my $version = "7.0NG.772 Build 230727";
# Pandora server configuration
my %conf;
@ -1252,6 +1252,9 @@ sub pandoradb_main {
# Maintain Referential integrity and other stuff
pandora_checkdb_integrity ($conf, $dbh);
# Close and open error log blocks
handle_error_log_block($conf, $dbh);
# Move old data to the history DB
if (defined ($history_dbh)) {
undef ($history_dbh) unless defined (enterprise_hook ('pandora_historydb', [$dbh, $history_dbh, $conf->{'_history_db_days'}, $conf->{'_history_db_step'}, $conf->{'_history_db_delay'}, $conf->{'_history_db_string_days'}, $conf->{'_history_db_adv'}]));
@ -1327,6 +1330,23 @@ sub pandora_check_forgotten_discovery_tasks {
log_message('FORGOTTEN DISCOVERY TASKS', 'Step ended');
}
###############################################################################
# Opening and closing of error log blocks
###############################################################################
sub handle_error_log_block {
my ($conf, $dbh) = @_;
my $is_open = get_db_value ($dbh,"SELECT `value` FROM `tconfig` WHERE `token` = 'open_error_log'");
open (STDERR, ">> " . $conf->{'errorlog_file'}) or die " [ERROR] " . pandora_get_initial_product_name() . " can't write to Errorlog. Aborting : \n $! \n";
if (!defined ($is_open)) {
db_do($dbh, "INSERT INTO `tconfig`(`token`, `value`) VALUES ('open_error_log', 1)");
} elsif ($is_open eq 1){
print STDERR strftime ("%Y-%m-%d %H:%M:%S", localtime()) . ' - ' . $conf->{'servername'} . " pandora_db: pandora_db maintenance tasks ends\n";
}
print STDERR strftime ("%Y-%m-%d %H:%M:%S", localtime()) . ' - ' . $conf->{'servername'} . " pandora_db: pandora_db maintenance tasks starts\n";
close (STDERR);
}
# Init
pandora_init_pdb(\%conf);

View File

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

View File

@ -15,7 +15,7 @@ WriteMakefile(
) :(),
NAME => 'PandoraFMS',
AUTHOR => 'Artica ST <info@artica.es>',
AUTHOR => 'Pandora FMS <info@pandorafms.com>',
EXE_FILES => [ @exe_files ],
PMLIBDIRS => [ 'lib' ],
'dist' => { 'TAR' => 'tar', 'TARFLAGS' => 'cvfz', 'SUFFIX' => '.gz', 'COMPRESS' => 'gzip'}