Merge branch 'develop' into ent-9771-discovery-2-0-sistema-de-extensiones-disco-para-el-discovery

This commit is contained in:
Daniel Cebrian 2023-07-26 15:58:26 +02:00
commit 2c9f7e026e
114 changed files with 2572 additions and 891 deletions

View File

@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2023050901'
S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
@ -285,8 +285,7 @@ console_dependencies=" \
mod_ssl \
libzstd \
openldap-clients \
chromium \
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
chromium"
execute_cmd "yum install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
@ -313,7 +312,6 @@ server_dependencies=" \
bind-utils \
whois \
cpanminus \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos7/pandorawmic-1.0.0-1.x86_64.rpm"
execute_cmd "yum install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -341,7 +339,6 @@ execute_cmd "yum install -y $oracle_dependencies || yum reinstall -y $oracle_dep
#ipam dependencies
ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
@ -719,6 +716,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
systemctl enable pandora_agent_daemon &>> $LOGFILE
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
# Enable postrix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)

View File

@ -14,7 +14,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
S_VERSION='2023050901'
S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
@ -344,8 +344,7 @@ console_dependencies=" \
http://firefly.pandorafms.com/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
http://firefly.pandorafms.com/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm"
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm"
execute_cmd "dnf install -y $console_dependencies" "Installing Pandora FMS Console dependencies"
# Server dependencies
@ -371,7 +370,7 @@ server_dependencies=" \
java \
bind-utils \
whois \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
libnsl \
http://firefly.pandorafms.com/centos7/wmic-1.4-1.el7.x86_64.rpm \
https://firefly.pandorafms.com/centos8/pandorawmic-1.0.0-1.x86_64.rpm"
execute_cmd "dnf install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -399,7 +398,6 @@ execute_cmd "dnf install -y $oracle_dependencies" "Installing Oracle Instant cli
#ipam dependencies
ipam_dependencies=" \
http://firefly.pandorafms.com/centos7/xprobe2-0.3-12.2.x86_64.rpm \
perl(NetAddr::IP) \
perl(Sys::Syslog) \
perl(DBI) \
@ -622,8 +620,9 @@ sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini
sed -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini
sed -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
#adding 900s to httpd timeout
#adding 900s to httpd timeout and 300 to ProxyTimeout
echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
echo 'ProxyTimeout 300' >> /etc/httpd/conf.d/timeout.conf
cat > /var/www/html/index.html << EOF_INDEX
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
@ -787,6 +786,9 @@ echo "* * * * * root wget -q -O - --no-check-certificate --load-cookies /tmp/cro
systemctl enable pandora_agent_daemon &>> "$LOGFILE"
execute_cmd "systemctl start pandora_agent_daemon" "Starting Pandora FMS Agent"
# Enable postfix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)

View File

@ -17,7 +17,7 @@ PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
WORKDIR=/opt/pandora/deploy
S_VERSION='2023050901'
S_VERSION='2023062901'
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
rm -f $LOGFILE &> /dev/null # remove last log before start
@ -265,7 +265,6 @@ server_dependencies=" \
openssh-client \
postfix \
unzip \
xprobe \
coreutils \
libio-compress-perl \
libmoosex-role-timer-perl \
@ -287,6 +286,7 @@ server_dependencies=" \
libgeo-ip-perl \
arping \
snmp-mibs-downloader \
libnsl2 \
openjdk-8-jdk "
execute_cmd "apt install -y $server_dependencies" "Installing Pandora FMS Server dependencies"
@ -299,17 +299,7 @@ echo -en "${cyan}Installing wmic and pandorawmic...${reset}"
chmod +x pandorawmic wmic &>> "$LOGFILE" && \
cp -a wmic /usr/bin/ &>> "$LOGFILE" && \
cp -a pandorawmic /usr/bin/ &>> "$LOGFILE"
check_cmd_status "Error Installing phanromjs"
# phantomjs
echo -en "${cyan}Installing phantomjs...${reset}"
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
export OPENSSL_CONF=/etc/ssl
curl -LSs -O "https://firefly.pandorafms.com/pandorafms/utils/$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
tar xvjf "$PHANTOM_JS.tar.bz2" &>> "$LOGFILE" && \
mv $PHANTOM_JS/bin/phantomjs /usr/bin &>> "$LOGFILE" && \
/usr/bin/phantomjs --version &>> "$LOGFILE"
check_cmd_status "Error Installing phanromjs"
check_cmd_status "Error Installing pandorawmic/wmic"
# create symlink for fping
rm -f /usr/sbin/fping &>> "$LOGFILE"
@ -370,7 +360,6 @@ source '/root/.profile' &>> "$LOGFILE"
#ipam dependencies
ipam_dependencies=" \
xprobe \
libnetaddr-ip-perl \
coreutils \
libdbd-mysql-perl \
@ -619,8 +608,9 @@ sed --follow-symlinks -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.i
sed --follow-symlinks -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini
sed --follow-symlinks -i -e "s/^disable_functions/;disable_functions/" /etc/php.ini
#adding 900s to httpd timeout
#echo 'TimeOut 900' > /etc/httpd/conf.d/timeout.conf
#adding 900s to httpd timeout and 300 to ProxyTimeout
echo 'TimeOut 900' > /etc/apache2/conf-enabled/timeout.conf
echo 'ProxyTimeout 300' >> /etc/apache2/conf-enabled/timeout.conf
cat > /var/www/html/index.html << EOF_INDEX
<meta HTTP-EQUIV="REFRESH" content="0; url=/pandora_console/">
@ -792,6 +782,9 @@ systemctl enable pandora_agent_daemon &>> "$LOGFILE"
#fix path phantomjs
sed --follow-symlinks -i -e "s/^openssl_conf = openssl_init/#openssl_conf = openssl_init/g" /etc/ssl/openssl.cnf &>> "$LOGFILE"
# Enable postfix
systemctl enable postfix --now &>> "$LOGFILE"
#SSH banner
[ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me)

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-230718
Version: 7.0NG.772-230726
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-230718"
pandora_version="7.0NG.772-230726"
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 => '230718';
use constant AGENT_BUILD => '230726';
# 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 230718
%define release 230726
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 230718
%define release 230726
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.772"
PI_BUILD="230718"
PI_BUILD="230726"
OS_NAME=`uname -s`
FORCE=0
@ -541,8 +541,17 @@ install () {
then
echo "Define 'pandora_agent=\"YES\"' in /etc/rc.conf to enable the daemon."
else
echo "Check your startup configuration to be sure Pandora FMS Agent is ready "
echo "to start automatically when system restarts":
# Enable startup service
if [ `command -v systemctl` ]
then
systemctl enable pandora_agent_daemon
elif [ `command -v chkconfig` ]
then
chkconfig pandora_agent_daemon on
else
echo "Check your startup configuration to be sure Pandora FMS Agent is ready "
echo "to start automatically when system restarts":
fi
fi
# Restore the daemon script

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{230718}
{230726}
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 230718")
#define PANDORA_VERSION ("7.0NG.772 Build 230726")
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 230718))"
VALUE "ProductVersion", "(7.0NG.772(Build 230726))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,10 +1,10 @@
package: pandorafms-console
Version: 7.0NG.772-230718
Version: 7.0NG.772-230726
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-230718"
pandora_version="7.0NG.772-230726"
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

@ -89,7 +89,7 @@ if (is_ajax() === true) {
[
'id' => 'agent_modules_affected_planned_downtime',
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'godmode/agentes/planned_downtime.list',

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

@ -187,7 +187,7 @@ try {
[
'id' => 'list_agents_tactical',
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columnNames,
'return' => true,

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

@ -167,7 +167,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

@ -560,7 +560,14 @@ if (empty($create) === false || empty($view) === false) {
// $data[0] = html_print_div(['id' => 'command_preview', 'class' => 'mono'], true);
$data[0] = html_print_label_input_block(
__('Command preview'),
html_print_div(['id' => 'command_preview', 'class' => 'mono'], true)
html_print_div(
[
'id' => 'command_preview',
'class' => 'mono',
'style' => 'max-width: 1050px;overflow-wrap: break-word;',
],
true
)
);
$table->data['plugin_preview_inputs'] = $data;
$table->colspan['plugin_preview_inputs'][0] = 2;

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

@ -210,7 +210,7 @@ if (is_ajax() === true) {
// Ldapsearch timeout.
// Default Ldapsearch timeout.
set_when_empty($config['ldap_searh_timeout'], 5);
set_when_empty($config['ldap_search_timeout'], 5);
$row = [];
$row['name'] = __('Ldap search timeout (secs)');
$row['control'] = html_print_input_text(
@ -558,7 +558,13 @@ echo '</form>';
if ($('input[type=checkbox][name=secondary_ldap_enabled]:checked').val() == 1) {
$("tr[id*='ldap_'][id$='_secondary']").show();
} else {
$( "tr[id*='ldap_'][id$='_secondary']" ).hide();
$( "tr[id*='ldap_'][id$='_secondary']" ).hide();
}
if ($('input[type=checkbox][name=secondary_active_directory]:checked').val() == 1) {
$("tr[id*='ad_'][id$='_secondary']").show();
} else {
$( "tr[id*='ad_'][id$='_secondary']" ).hide();
}
}
$( document ).ready(function() {

View File

@ -747,6 +747,16 @@ $table->data[$i][] = html_print_label_input_block(
)
);
$table->data[$i][] = html_print_label_input_block(
__('Show experimental features'),
html_print_checkbox_switch(
'show_experimental_features',
1,
$config['show_experimental_features'],
true
)
);
echo '<form class="max_floating_element_size" id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&amp;section=general&amp;pure='.$config['pure'].'">';
echo '<fieldset class="margin-bottom-10">';

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

@ -50,7 +50,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/update_manager',

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();
}
@ -290,6 +295,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) {
// --------------------------------
@ -355,6 +364,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(
@ -1145,9 +1158,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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 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

@ -237,8 +237,13 @@ function process_user_login_remote($login, $pass, $api=false)
// Active Directory.
case 'ad':
if (enterprise_hook('ad_process_user_login', [$login, $pass]) === false) {
$config['auth_error'] = 'User not found in database or incorrect password';
$sr = enterprise_hook('ad_process_user_login', [$login, $pass]);
// Try with secondary server.
if ($sr === false && (bool) $config['secondary_active_directory'] === true) {
$sr = enterprise_hook('ad_process_user_login', [$login, $pass, true]);
}
if ($sr === false) {
return false;
}
break;

View File

@ -178,7 +178,7 @@ class AuditLog extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,
@ -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

@ -1040,7 +1040,7 @@ class CalendarManager
'id' => 'templates_alerts_special_days',
'return' => true,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'godmode/alerts/alert_special_days',

View File

@ -612,7 +612,7 @@ class ConfigPEN extends HTML
'id' => $tableId,
'return' => true,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -1807,7 +1807,8 @@ class ConsoleSupervisor
$this->cleanNotifications('NOTIF.PHP.SERIALIZE_PRECISION');
}
if (version_compare('8.1', PHP_VERSION) >= 0) {
// If PHP_VERSION is lower than 8.0.27 version_compare() returns 1.
if (version_compare('8.0.27', PHP_VERSION) === 1) {
$url = 'https://www.php.net/supported-versions.php';
$this->notify(
[

View File

@ -827,7 +827,7 @@ class CredentialStore extends Wizard
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -1579,7 +1579,7 @@ class Diagnostics extends Wizard
[
'id' => $tableId,
'class' => 'info_table caption_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columnNames,
'ajax_data' => [
@ -1591,6 +1591,7 @@ class Diagnostics extends Wizard
'no_sortable_columns' => [-1],
'caption' => $title,
'print' => true,
'mini_csv' => true,
]
);
} else {

View File

@ -320,7 +320,7 @@ class EventSound extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -162,7 +162,7 @@ class SatelliteAgent extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -142,7 +142,7 @@ class SatelliteCollection extends HTML
[
'id' => $this->tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -326,7 +326,7 @@ class SnmpConsole extends HTML
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $this->ajaxController,

View File

@ -475,7 +475,7 @@ class TipsWindow
[
'id' => 'list_tips_windows',
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'dom_elements' => 'lpfti',
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'columns' => $columns,

View File

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

View File

@ -2770,6 +2770,69 @@ function agents_delete_agent($id_agents, $disableACL=false)
enterprise_include_once('include/functions_agents.php');
enterprise_hook('agent_delete_from_cache', [$id_agent]);
// Delete agent from visual console.
db_process_sql_delete(
'tlayout_data',
['id_agent' => $id_agent]
);
// Delete agent from visual dashboards.
db_process_sql(
'UPDATE twidget_dashboard
SET options = NULL
WHERE options LIKE ("%\"agentid\":\"'.$id_agent.'\"%")'
);
// Delete agent from treport.
db_process_sql_delete(
'treport_content',
['id_agent' => $id_agent]
);
// Delete rules from tevent alerts (correlative alerts)
db_process_sql_delete(
'tevent_rule',
[
'agent' => $id_agent,
'operator_agent' => '==',
]
);
db_process_sql_delete(
'tevent_rule',
[
'log_agent' => $id_agent,
'operator_log_agent' => '==',
]
);
// Delete from gis maps history
db_process_sql_delete(
'tgis_data_history',
['tagente_id_agente' => $id_agent]
);
// Delete from policies.
db_process_sql_delete(
'tpolicy_agents',
['id_agent' => $id_agent]
);
// Delete from tnetwork maps
db_process_sql_delete(
'titem',
['source_data' => $id_agent]
);
db_process_sql_delete(
'trel_item',
[
'id_parent_source_data' => $id_agent,
'id_child_source_data' => $id_agent,
],
'OR'
);
// Delete agent from fav menu.
db_process_sql_delete(
'tfavmenu_user',

View File

@ -378,6 +378,10 @@ function config_update_config()
$error_update[] = __('keep_in_process_status_extra_id');
}
if (config_update_value('show_experimental_features', get_parameter('show_experimental_features'), true) === false) {
$error_update[] = __('show_experimental_features');
}
if (config_update_value('console_log_enabled', get_parameter('console_log_enabled'), true) === false) {
$error_update[] = __('Console log enabled');
}
@ -627,6 +631,30 @@ function config_update_config()
$error_update[] = __('Domain');
}
if (config_update_value('secondary_active_directory', get_parameter('secondary_active_directory'), true) === false) {
$error_update[] = __('Secondary active directory');
}
if (config_update_value('ad_server_secondary', get_parameter('ad_server_secondary'), true) === false) {
$error_update[] = __('Secondary active directory server');
}
if (config_update_value('ad_port_secondary', get_parameter('ad_port_secondary'), true) === false) {
$error_update[] = __('Secondary active directory port');
}
if (config_update_value('ad_start_tls_secondary', get_parameter('ad_start_tls_secondary'), true) === false) {
$error_update[] = __('Secondary start TLS');
}
if (config_update_value('ad_search_timeout', get_parameter('ad_search_timeout'), true) === false) {
$error_update[] = __('AD search timeout');
}
if (config_update_value('ad_domain_secondary', get_parameter('ad_domain_secondary'), true) === false) {
$error_update[] = __('Secondary domain');
}
if (config_update_value('ad_adv_perms', get_parameter('ad_adv_perms'), true) === false) {
$error_update[] = __('Advanced Permisions AD');
}
@ -2377,6 +2405,10 @@ function config_process_config()
config_update_value('keep_in_process_status_extra_id', 0);
}
if (!isset($config['show_experimental_features'])) {
config_update_value('show_experimental_features', 0);
}
if (!isset($config['console_log_enabled'])) {
config_update_value('console_log_enabled', 0);
}
@ -3100,6 +3132,14 @@ function config_process_config()
config_update_value('ad_port', 389);
}
if (!isset($config['ad_server_secondary'])) {
config_update_value('ad_server_secondary', 'localhost');
}
if (!isset($config['ad_port_secondary'])) {
config_update_value('ad_port_secondary', 389);
}
if (!isset($config['ad_start_tls'])) {
config_update_value('ad_start_tls', 0);
}
@ -3439,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

@ -4624,7 +4624,10 @@ function graph_netflow_circular_mesh($data)
include_once $config['homedir'].'/include/graphs/functions_d3.php';
return d3_relationship_graph($data['elements'], $data['matrix'], 900, true);
$width = (empty($data['width']) === false) ? $data['width'] : 900;
$height = (empty($data['height']) === false) ? $data['height'] : 900;
return d3_relationship_graph($data['elements'], $data['matrix'], $width, true, $height);
}
@ -4983,19 +4986,18 @@ function graph_monitor_wheel($width=550, $height=600, $filter=false)
$filter_module_group = (!empty($filter) && !empty($filter['module_group'])) ? $filter['module_group'] : false;
if ($filter['group'] != 0) {
$filter_subgroups = '';
if (!$filter['dont_show_subgroups']) {
$filter_subgroups = ' || parent IN ('.$filter['group'].')';
if ($filter['dont_show_subgroups'] === false) {
$groups = groups_get_children($filter['group']);
$groups_ax = [];
foreach ($groups as $g) {
$groups_ax[$g['id_grupo']] = $g;
}
$groups = $groups_ax;
} else {
$groups = groups_get_group_by_id($filter['group']);
$groups[$group['id_grupo']] = $group;
}
$groups = db_get_all_rows_sql('SELECT * FROM tgrupo where id_grupo IN ('.$filter['group'].') '.$filter_subgroups);
$groups_ax = [];
foreach ($groups as $g) {
$groups_ax[$g['id_grupo']] = $g;
}
$groups = $groups_ax;
} else {
$groups = users_get_groups(false, 'AR', false, true, (!empty($filter) && isset($filter['group']) ? $filter['group'] : null));
}

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

@ -1233,7 +1233,9 @@ function netflow_draw_item(
$max_aggregates,
$connection_name='',
$output='HTML',
$address_resolution=false
$address_resolution=false,
$width_content=false,
$height_content=false
) {
$aggregate = $filter['aggregate'];
$interval = ($end_date - $start_date);
@ -1432,6 +1434,9 @@ function netflow_draw_item(
netflow_aggregate_is_ip($aggregate)
);
$data_circular['width'] = $width_content;
$data_circular['height'] = $height_content;
$html = '<div class="center">';
$html .= graph_netflow_circular_mesh($data_circular);
$html .= '</div>';

View File

@ -3742,28 +3742,71 @@ function ui_progress_extend(
* Generate needed code to print a datatables jquery plugin.
*
* @param array $parameters All desired data using following format:
* [
* 'print' => true (by default printed)
* 'id' => datatable id.
* 'class' => datatable class.
* 'style' => datatable style.
* 'order' => [
* 'field' => column name
* 'direction' => asc or desc
* ],
* 'default_pagination' => integer, default pagination is set to block_size
* 'ajax_url' => 'include/ajax.php' ajax_url.
* 'ajax_data' => [ operation => 1 ] extra info to be sent.
* 'ajax_postprocess' => a javscript function to postprocess data received
* by ajax call. It is applied foreach row and must
* use following format:
* * [code]
* * function (item) {
* * // Process received item, for instance, name:
* * tmp = '<span class=label>' + item.name + '</span>';
* * item.name = tmp;
* * }
* * [/code]
*
* ```php
* $parameters = [
* // JS Parameters
* 'serverside' => true,
* 'paging' => true,
* 'default_pagination' => $config['block_size'],
* 'searching' => false,
* 'dom_elements' => "plfrtiB",
* 'pagination_options' => [default_pagination, 5, 10, 20, 100, 200, 500, 1000, "All"],
* 'ordering' => true,
* 'order' => [[0, "asc"]], //['field' => 'column_name', 'direction' => 'asc/desc']
* 'zeroRecords' => "No matching records found",
* 'emptyTable' => "No data available in table",
* 'no_sortable_columns' => [], //Allows the column name (db) from "columns" parameter
* 'csv_field_separator' => ",",
* 'csv_header' => true,
* 'mini_csv' => false,
* 'mini_pagination' => false,
* 'mini_search' => false,
* 'drawCallback' => undefined, //'console.log(123),'
* 'data_element' => undefined, //Rows processed
* 'ajax_postprocess' => undefined, //'process_datatables_item(item)'
* 'ajax_data' => undefined, //Extra data to be sent ['field1' => 1, 'field2 => 0]
* 'ajax_url' => undefined,
* 'caption' => undefined,
*
* // PHP Parameters
* 'id' => undefined, //Used for table and form id,
* 'columns' =>,
* 'column_names' =>,
* 'filter_main_class' =>,
* 'toggle_collapsed' =>true,
* 'search_button_class' => 'sub filter',
* 'csv' =>=1,
* 'form' =>
* ..[
* ....'id' => $form_id,
* ....'class' => 'flex-row',
* ....'style' => 'width: 100%,',
* ....'js' => '',
* ....'html' => $filter,
* ....'inputs' => [],
* ....'extra_buttons' => $buttons,
* ..],
* 'no_toggle' => false,
* 'form_html' => undefined,
* 'toggle_collapsed' => true,
* 'class' => "", //Datatable class.
* 'style' => "" ,//Datatable style.
* 'return' => false,
* 'print' => true,
* ]
*
* ```
*
* ```php
* ajax_postprocess => a javscript function to postprocess data received
* by ajax call. It is applied foreach row and must
* use following format:
* function (item) {
* // Process received item, for instance, name:
* tmp = '<span class=label>' + item.name + '</span>';
* item.name = tmp;
* }
* 'columns_names' => [
* 'column1' :: Used as th text. Direct text entry. It could be array:
* OR
@ -3780,7 +3823,6 @@ function ui_progress_extend(
* 'column2',
* ...
* ],
* 'no_sortable_columns' => [ indexes ] 1,2... -1 etc. Avoid sorting.
* 'form' => [
* 'html' => 'html code' a directly defined inputs in HTML.
* 'extra_buttons' => [
@ -3812,12 +3854,7 @@ function ui_progress_extend(
* ]
* ],
* 'extra_html' => HTML content to be placed after 'filter' section.
* 'drawCallback' => function to be called after draw. Sample in:
* https://datatables.net/examples/advanced_init/row_grouping.html
* ]
* 'zeroRecords' => Message when zero records obtained from filter.(Leave blank for default).
* 'emptyTable' => Message when table data empty.(Leave blank for default).
* End.
* ```
*
* @return string HTML code with datatable.
* @throws Exception On error.
@ -3834,6 +3871,9 @@ function ui_print_datatable(array $parameters)
$form_id = uniqid('datatable_filter_');
}
$parameters['table_id'] = $table_id;
$parameters['form_id'] = $form_id;
if (!isset($parameters['columns']) || !is_array($parameters['columns'])) {
throw new Exception('[ui_print_datatable]: You must define columns for datatable');
}
@ -3853,10 +3893,6 @@ function ui_print_datatable(array $parameters)
$parameters['default_pagination'] = $config['block_size'];
}
if (!isset($parameters['paging'])) {
$parameters['paging'] = true;
}
if (!isset($parameters['filter_main_class'])) {
$parameters['filter_main_class'] = '';
}
@ -3865,13 +3901,9 @@ function ui_print_datatable(array $parameters)
$parameters['toggle_collapsed'] = true;
}
$no_sortable_columns = json_encode([]);
if (isset($parameters['no_sortable_columns'])) {
$no_sortable_columns = json_encode($parameters['no_sortable_columns']);
}
if (!is_array($parameters['order'])) {
$order = '0, "asc"';
$order = 0;
$direction = 'asc';
} else {
if (!isset($parameters['order']['direction'])) {
$direction = 'asc';
@ -3890,47 +3922,35 @@ function ui_print_datatable(array $parameters)
}
}
$order .= ', "'.$parameters['order']['direction'].'"';
$direction = $parameters['order']['direction'];
}
if (!isset($parameters['ajax_data'])) {
$parameters['ajax_data'] = '';
$parameters['order']['order'] = $order;
$parameters['order']['direction'] = $direction;
foreach ($parameters['no_sortable_columns'] as $key => $find) {
$found = array_search(
$parameters['no_sortable_columns'][$key],
$parameters['columns']
);
if ($found !== false) {
unset($parameters['no_sortable_columns'][$key]);
array_push($parameters['no_sortable_columns'], $found);
}
if (is_int($parameters['no_sortable_columns'][$key]) === false) {
unset($parameters['no_sortable_columns'][$key]);
}
}
$search_button_class = 'sub filter';
$parameters['csvTextInfo'] = __('Export current page to CSV');
$parameters['csvFileTitle'] = sprintf(__('export_%s_current_page_%s'), $table_id, date('Y-m-d'));
if (isset($parameters['search_button_class'])) {
$search_button_class = $parameters['search_button_class'];
}
if (isset($parameters['pagination_options'])) {
$pagination_options = $parameters['pagination_options'];
} else {
$pagination_options = [
[
// There is a limit of (2^32)^2 (18446744073709551615) rows in a MyISAM table, show for show all use max nrows.
// -1 Retun error or only 1 row.
$parameters['default_pagination'],
5,
10,
25,
100,
200,
500,
1000,
18446744073709551615,
],
[
$parameters['default_pagination'],
5,
10,
25,
100,
200,
500,
1000,
'All',
],
];
$search_button_class = 'sub filter';
}
if (isset($parameters['datacolumns']) === false
@ -3943,16 +3963,12 @@ function ui_print_datatable(array $parameters)
$parameters['csv'] = 1;
}
$dom_elements = '"plfrtiB"';
if (isset($parameters['dom_elements'])) {
$dom_elements = '"'.$parameters['dom_elements'].'"';
}
$filter = '';
// Datatable filter.
if (isset($parameters['form']) && is_array($parameters['form'])) {
if (isset($parameters['form']['id'])) {
$form_id = $parameters['form']['id'];
$parameters['form_id'] = $form_id;
}
if (isset($parameters['form']['class'])) {
@ -4070,10 +4086,13 @@ function ui_print_datatable(array $parameters)
)
);
$processing .= '</div>';
$parameters['processing'] = $processing;
$zeroRecords = isset($parameters['zeroRecords']) === true ? $parameters['zeroRecords'] : __('No matching records found');
$emptyTable = isset($parameters['emptyTable']) === true ? $parameters['emptyTable'] : __('No data available in table');
$parameters['zeroRecords'] = $zeroRecords;
$parameters['emptyTable'] = $emptyTable;
// Extra html.
$extra = '';
if (isset($parameters['extra_html']) && !empty($parameters['extra_html'])) {
@ -4082,8 +4101,8 @@ function ui_print_datatable(array $parameters)
// Base table.
$table = '<table id="'.$table_id.'" ';
$table .= 'class="'.$parameters['class'].' invisible"';
$table .= 'style="'.$parameters['style'].'">';
$table .= 'class="'.$parameters['class'].'"';
$table .= 'style="box-sizing: border-box;'.$parameters['style'].'">';
$table .= '<thead><tr class="datatables_thead_tr">';
if (isset($parameters['column_names'])
@ -4110,336 +4129,60 @@ function ui_print_datatable(array $parameters)
}
$table .= '</tr></thead>';
if (isset($parameters['data_element']) === true) {
$table .= '<tbody>';
foreach ($parameters['data_element'] as $row) {
$table .= '<tr>';
foreach ($row as $td_data) {
$table .= '<td>'.$td_data.'</td>';
}
$table .= '</tr>';
}
$table .= '</tbody>';
$js = '<script>
$.fn.dataTable.ext.classes.sPageButton = "pandora_pagination mini-pandora-pagination"
var table = $("#'.$table_id.'").DataTable({
"dom": "'.$parameters['dom_elements'].'"
});
$("div.spinner-fixed").hide();
$("table#'.$table_id.'").removeClass("invisible");
$("#'.$table_id.'_filter > label > input").addClass("mini-search-input");
if (table.page.info().pages == 1) {
$("#'.$table_id.'_paginate").hide();
}
</script>';
}
$table .= '</table>';
$pagination_class = 'pandora_pagination';
if (!empty($parameters['pagination_class'])) {
$pagination_class = $parameters['pagination_class'];
$parameters['ajax_url_full'] = ui_get_full_url('ajax.php', false, false, false);
$parameters['spinnerLoading'] = html_print_image(
'images/spinner.gif',
true,
[
'id' => $form_id.'_loading',
'class' => 'loading-search-datatables-button',
]
);
$language = substr(get_user_language(), 0, 2);
if (is_metaconsole() === false) {
$parameters['language'] = 'include/javascript/i18n/dataTables.'.$language.'.json';
} else {
$parameters['language'] = '../../include/javascript/i18n/dataTables.'.$language.'.json';
}
$columns = '';
for ($i = 1; $i <= (count($parameters['columns']) - 3); $i++) {
if ($i != (count($parameters['columns']) - 3)) {
$columns .= $i.',';
} else {
$columns .= $i;
}
$parameters['phpDate'] = date('Y-m-d');
$parameters['dataElements'] = json_encode($parameters['data_element']);
// * START JAVASCRIPT.
if (is_metaconsole() === false) {
$file_path = ui_get_full_url('include/javascript/datatablesFunction.js');
} else {
$file_path = ui_get_full_url('../../include/javascript/datatablesFunction.js');
}
$export_columns = '';
if (isset($parameters['csv_exclude_latest']) === true
&& $parameters['csv_exclude_latest'] === true
) {
$export_columns = ',columns: \'th:not(:last-child)\'';
}
$file_content = file_get_contents($file_path);
$json_data = json_encode($parameters);
$json_config = json_encode($config);
if (isset($parameters['data_element']) === false || isset($parameters['print_pagination_search_csv'])) {
if (isset($parameters['ajax_url'])) {
$type_data = 'ajax: {
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
type: "POST",
dataSrc: function (json) {
if($("#'.$form_id.'_search_bt") != undefined) {
$("#'.$form_id.'_loading").remove();
}
$js = '<script>';
$js .= 'var dt = '.$json_data.';';
$js .= 'var config = '.$json_config.';';
$js .= '</script>';
if (json.error) {
console.error(json.error);
$("#error-'.$table_id.'").html(json.error);
$("#error-'.$table_id.'").dialog({
title: "Filter failed",
width: 630,
resizable: true,
draggable: true,
modal: false,
closeOnEscape: true,
buttons: {
"Ok" : function () {
$(this).dialog("close");
}
}
}).parent().addClass("ui-state-error");
} else {';
if (isset($parameters['ajax_return_operation']) === true
&& empty($parameters['ajax_return_operation']) === false
&& isset($parameters['ajax_return_operation_function']) === true
&& empty($parameters['ajax_return_operation_function']) === false
) {
$type_data .= '
if (json.'.$parameters['ajax_return_operation'].' !== undefined) {
'.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].');
}
';
}
if (isset($parameters['ajax_postprocess'])) {
$type_data .= '
if (json.data) {
json.data.forEach(function(item) {
'.$parameters['ajax_postprocess'].'
});
} else {
json.data = {};
}';
}
$type_data .= '
return json.data;
}
},
data: function (data) {
if($("#button-'.$form_id.'_search_bt") != undefined) {
var loading = \''.html_print_image(
'images/spinner.gif',
true,
[
'id' => $form_id.'_loading',
'class' => 'loading-search-datatables-button',
]
).'\';
$("#button-'.$form_id.'_search_bt").parent().append(loading);
}
inputs = $("#'.$form_id.' :input");
values = {};
inputs.each(function() {
values[this.name] = $(this).val();
})
$.extend(data, {
filter: values,'."\n";
if (is_array($parameters['ajax_data'])) {
foreach ($parameters['ajax_data'] as $k => $v) {
$type_data .= $k.':'.json_encode($v).",\n";
}
}
$type_data .= 'page: "'.$parameters['ajax_url'].'"
});
return data;
}
},';
} else {
$type_data = 'data: '.json_encode($parameters['data_element']).',';
}
$serverside = 'true';
if (isset($parameters['data_element'])) {
$serverside = 'false';
}
// Javascript controller.
$js = '<script type="text/javascript">
$(document).ready(function(){
$.fn.dataTable.ext.errMode = "none";
$.fn.dataTable.ext.classes.sPageButton = "'.$pagination_class.'";
var settings_datatable = {
drawCallback: function(settings) {';
if (!isset($parameters['data_element'])) {
$js .= 'if (dt_'.$table_id.'.page.info().pages > 1) {
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").show()
} else {
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").hide()
}';
}
$js .= 'if ($("#'.$table_id.' tr td").length == 1) {
$(".datatable-msg-info-'.$table_id.'").show();
$(".datatable-msg-info-'.$table_id.'").removeClass(\'invisible_important\');
$("table#'.$table_id.'").hide();
$("div.dataTables_paginate").hide();
$("div.dataTables_info").hide();
$("div.dataTables_length").hide();
$("div.dt-buttons").hide();
if (dt_'.$table_id.'.page.info().pages > 1) {
$(".dataTables_paginate.paging_simple_numbers").show()
}
} else {
$(".datatable-msg-info-'.$table_id.'").hide();
$("table#'.$table_id.'").show();
$("div.dataTables_paginate").show();
$("div.dataTables_info").hide();
$("div.dataTables_length").show();
$("div.dt-buttons").show();
if (dt_'.$table_id.'.page.info().pages == 1) {
$(".dataTables_paginate.paging_simple_numbers").hide()
}
}';
if (isset($parameters['drawCallback'])) {
$js .= $parameters['drawCallback'];
}
$searching = 'false';
if (isset($parameters['searching']) && $parameters['searching'] === true) {
$searching = 'true';
}
$ordering = 'true';
if (isset($parameters['ordering']) && $parameters['ordering'] === false) {
$ordering = 'false';
}
$js .= '},';
$languaje = substr(get_user_language(), 0, 2);
$js .= '
processing: true,
serverSide: '.$serverside.',
paging: '.$parameters['paging'].',
pageLength: '.$parameters['default_pagination'].',
searching: '.$searching.',
responsive: true,
dom: '.$dom_elements.',
language: {
url: "/pandora_console/include/javascript/i18n/dataTables.'.$languaje.'.json",
processing:"'.$processing.'",
zeroRecords:"'.$zeroRecords.'",
emptyTable:"'.$emptyTable.'",
},
buttons: '.$parameters['csv'].'== 1 ? [
{
extend: "csv",
text : "'.__('Export current page to CSV').'",
titleAttr: "'.__('Export current page to CSV').'",
title: "export_'.$parameters['id'].'_current_page_'.date('Y-m-d').'",
fieldSeparator: "'.$config['csv_divider'].'",
action: function ( e, dt, node, config ) {
blockResubmit(node);
// Call the default csvHtml5 action method to create the CSV file
$.fn.dataTable.ext.buttons.csvHtml5.action.call(this, e, dt, node, config);
},
exportOptions : {
modifier : {
// DataTables core
order : "current",
page : "All",
search : "applied"
}'.$export_columns.'
},
}
] : [],
lengthMenu: '.json_encode($pagination_options).',
columnDefs: [
{ className: "no-class", targets: "_all" },
{ bSortable: false, targets: '.$no_sortable_columns.' }
],
ordering: '.$ordering.',
initComplete: function(settings, json) {
// Move elements to table_action_buttons bar.
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
$(".action_buttons_right_content").html("<div class=\"pagination-child-div\"></div>");
let original_styles = $("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").attr("style");
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").attr("style", original_styles + " margin-right: 10px;"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_length"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dt-buttons"));
$(".pagination-child-div").append($("#'.$table_id.'_wrapper > .dataTables_filter"));
$("div.spinner-fixed").hide();
},
columns: [';
foreach ($parameters['datacolumns'] as $data) {
if (is_array($data)) {
$js .= '{data : "'.$data['text'].'",className: "'.$data['class'].'"},';
} else {
$js .= '{data : "'.$data.'",className: "no-class"},';
}
}
$js .= '
],
order: [[ '.$order.' ]],';
$js .= $type_data;
$js .= '
};
dt_'.$table_id.' = $("#'.$table_id.'").DataTable(settings_datatable);
$("#button-'.$form_id.'_search_bt").click(function (){
dt_'.$table_id.'.draw().page(0)
});
';
if (isset($parameters['caption']) === true
&& empty($parameters['caption']) === false
) {
$js .= '$("#'.$table_id.'").append("<caption>'.$parameters['caption'].'</caption>");';
$js .= '$(".datatables_thead_tr").css("height", 0);';
}
if (isset($parameters['csv']) === true) {
$js."'$('#".$table_id."').on( 'buttons-processing', function ( e, indicator ) {
if ( indicator ) {
console.log('a');
}
else {
console.log('b');
}";
}
$js .= '$("table#'.$table_id.'").removeClass("invisible");
});';
$js .= '
$(function() {
$(document).on("preInit.dt", function (ev, settings) {
$("div.dataTables_length").hide();
$("div.dt-buttons").hide();
});
});
';
$js .= '</script>';
}
// Order.
$js .= '<script>';
$js .= 'function '.$table_id.'(dt, config) { ';
$js .= $file_content;
$js .= '}';
$js .= $table_id.'(dt, config)';
$js .= '</script>';
// * END JAVASCRIPT.
$info_msg_arr = [];
$info_msg_arr['message'] = $emptyTable;
$info_msg_arr['div_class'] = 'info_box_container invisible_important datatable-msg-info-'.$table_id;
$spinner = '<div class="spinner-fixed"><span></span><span></span><span></span><span></span></div>';
$spinner = '<div id="'.$table_id.'-spinner" class="spinner-fixed"><span></span><span></span><span></span><span></span></div>';
$info_msg = '<div>'.ui_print_info_message($info_msg_arr).'</div>';
$err_msg = '<div id="error-'.$table_id.'"></div>';
$output = $info_msg.$err_msg.$filter.$extra.$spinner.$table.$js;
if (is_ajax() === false) {
@ -4463,7 +4206,7 @@ function ui_print_datatable(array $parameters)
false,
false
);
$output .= '?v='.$config['current_package'].'"/>';
$output .= '"/>';
// Load tables.css.
$output .= '<link rel="stylesheet" href="';
$output .= ui_get_full_url(

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

@ -57,7 +57,7 @@ function include_javascript_d3($return=false)
}
function d3_relationship_graph($elements, $matrix, $width=700, $return=false)
function d3_relationship_graph($elements, $matrix, $width=700, $return=false, $height=700)
{
global $config;
@ -72,7 +72,7 @@ function d3_relationship_graph($elements, $matrix, $width=700, $return=false)
$output = '<div id="chord_diagram"></div>';
$output .= include_javascript_d3(true);
$output .= "<script language=\"javascript\" type=\"text/javascript\">
chordDiagram('#chord_diagram', $elements, $matrix, $width);
chordDiagram('#chord_diagram', $elements, $matrix, $width, $height);
</script>";
if (!$return) {

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

@ -22,7 +22,7 @@
// matrix = [[0, 0, 2], // a[a => a, a => b, a => c]
// [5, 0, 1], // b[b => a, b => b, b => c]
// [2, 3, 0]]; // c[c => a, c => b, c => c]
function chordDiagram(recipient, elements, matrix, width) {
function chordDiagram(recipient, elements, matrix, width, height) {
d3.chart = d3.chart || {};
d3.chart.chordWheel = function(options) {
// Default values
@ -59,10 +59,13 @@ function chordDiagram(recipient, elements, matrix, width) {
.enter()
.append("svg:svg")
.attr("width", width)
.attr("height", width)
.attr("height", height)
.attr("class", "dependencyWheel")
.append("g")
.attr("transform", "translate(" + width / 2 + "," + width / 2 + ")");
.attr(
"transform",
"translate(" + width / 2 + "," + height / 2 + ") scale(1.2)"
);
var arc = d3.svg
.arc()
@ -206,8 +209,8 @@ function chordDiagram(recipient, elements, matrix, width) {
.on("mousemove", move_tooltip);
function move_tooltip(d) {
x = d3.event.pageX + 10;
y = d3.event.pageY + 10;
x = d3.event.layerX + 10;
y = d3.event.layerY + 10;
$("#tooltip").css("left", x + "px");
$("#tooltip").css("top", y + "px");

View File

@ -0,0 +1,378 @@
var dt = dt;
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);
} else {
datacolumnsTemp = { data: column, className: "no-class" };
datacolumns.push(datacolumnsTemp);
}
});
var paginationClass = "pandora_pagination";
if (typeof dt.pagination_class !== "undefined") {
paginationClass = dt.pagination_class;
}
var processing = "";
if (typeof dt.processing === "undefined") {
processing = dt.processing;
}
var ajaxReturn = "";
var ajaxReturnFunction = "";
if (
typeof dt.ajax_return_operation !== "undefined" &&
dt.ajax_return_operation !== "" &&
typeof dt.ajax_return_operation_function !== "undefined" &&
dt.ajax_return_operation_function !== ""
) {
ajaxReturn = dt.ajax_return_operation;
ajaxReturnFunction = dt.ajax_return_operation_function;
}
var serverSide = true;
if (typeof dt.data_element !== "undefined") {
serverSide = false;
}
var paging = true;
if (typeof dt.paging !== "undefined") {
paging = dt.paging;
}
var pageLength = parseInt(dt.default_pagination);
var searching = false;
if (typeof dt.searching !== "undefined" && dt.searching === true) {
searching = dt.searching;
}
var dom = "plfrtiB";
if (typeof dt.dom_elements !== "undefined") {
dom = dt.dom_elements;
}
var lengthMenu = [
[pageLength, 5, 10, 20, 100, 200, 500, 1000, -1],
[pageLength, 5, 10, 20, 100, 200, 500, 1000, "All"]
];
if (typeof dt.pagination_options !== "undefined") {
lengthMenu = dt.pagination_options;
}
var ordering = true;
if (typeof dt.ordering !== "undefined" && dt.ordering === false) {
ordering = dt.ordering;
}
var order = [[0, "asc"]];
if (typeof dt.order !== "undefined") {
order = [[dt.order.order, dt.order.direction]];
}
var zeroRecords = "";
if (typeof dt.zeroRecords !== "undefined") {
zeroRecords = `${dt.zeroRecords}`;
}
var emptyTable = "";
if (typeof dt.emptyTable !== "undefined") {
emptyTable = `${dt.emptyTable}`;
}
var no_sortable_columns = [];
if (typeof dt.no_sortable_columns !== "undefined") {
no_sortable_columns = Object.values(dt.no_sortable_columns);
}
var columnDefs = [];
if (typeof dt.columnDefs === "undefined") {
columnDefs = [
{ className: "no-class", targets: "_all" },
{ bSortable: false, targets: no_sortable_columns }
];
} else {
columnDefs = dt.columnDefs;
}
var csvClassName = "csv-button";
if (dt.mini_csv === true) {
csvClassName = "mini-csv-button";
}
var csvFieldSeparator = ";";
if (typeof dt.csv_field_separator !== "undefined") {
csvFieldSeparator = dt.csv_field_separator;
}
var csvHeader = true;
if (dt.csv_header === false) {
csvHeader = false;
}
var csvExcludeLast = "";
if (dt.csv_exclude_latest === true) {
csvExcludeLast = "th:not(:last-child)";
}
var ajaxData = "";
if (typeof dt.ajax_data !== "undefined") {
ajaxData = dt.ajax_data;
}
$(document).ready(function() {
function checkPages() {
if (dt_table.page.info().pages > 1) {
$(
"div.pagination-child-div > .dataTables_paginate.paging_simple_numbers"
).show();
$(`#${dt.id}_paginate`).show();
} else {
$(
"div.pagination-child-div > .dataTables_paginate.paging_simple_numbers"
).hide();
$(`#${dt.id}_paginate`).hide();
}
}
function moveElementsToActionButtons() {
$(".action_buttons_right_content").html(
'<div class="pagination-child-div"></div>'
);
$(".pagination-child-div").append(
$(`#${dt.id}_wrapper > .dataTables_paginate.paging_simple_numbers`).attr(
"style",
"margin-right: 10px;"
)
);
$(".pagination-child-div").append(
$(`#${dt.id}_wrapper > .dataTables_length`)
);
$(".pagination-child-div").append($(`#${dt.id}_wrapper > .dt-buttons`));
$(".pagination-child-div").append(
$(`#${dt.id}_wrapper > .dataTables_filter`)
);
}
$.fn.dataTable.ext.errMode = "none";
$.fn.dataTable.ext.classes.sPageButton = paginationClass;
if (dt.mini_pagination === true) {
$.fn.dataTable.ext.classes.sPageButton = `${paginationClass} mini-pandora-pagination`;
}
var settings_datatable = {
processing: true,
responsive: true,
serverSide,
paging,
pageLength,
searching,
dom,
lengthMenu,
ordering,
order,
columns: eval(datacolumns),
columnDefs,
language: {
url: dt.language,
processing,
zeroRecords,
emptyTable
},
buttons:
dt.csv == 1
? [
{
extend: "csv",
className: csvClassName,
text: dt.csvTextInfo,
titleAttr: dt.csvTextInfo,
title: dt.csvFileTitle,
fieldSeparator: csvFieldSeparator,
header: csvHeader,
action: function(e, dt, node, config) {
blockResubmit(node);
// Call the default csvHtml5 action method to create the CSV file
$.fn.dataTable.ext.buttons.csvHtml5.action.call(
this,
e,
dt,
node,
config
);
},
exportOptions: {
modifier: {
// DataTables core
order: "current",
page: "All",
search: "applied"
},
columns: csvExcludeLast
}
}
]
: [],
initComplete: function(settings, json) {
moveElementsToActionButtons();
checkPages();
$(`div#${dt.id}-spinner`).hide();
},
drawCallback: function(settings) {
if ($(`#${dt.id} tr td`).length == 1) {
$(`.datatable-msg-info-${dt.id}`)
.removeClass("invisible_important")
.show();
$(`table#${dt.id}`).hide();
$("div.pagination-child-div").hide();
$("div.dataTables_info").hide();
$(`#${dt.id}_wrapper`).hide();
$(`.action_buttons_right_content .pagination-child-div`).hide();
} else {
$(`.datatable-msg-info-${dt.id}`).hide();
$(`table#${dt.id}`).show();
$("div.pagination-child-div").show();
$("div.dataTables_info").show();
$(`#${dt.id}_wrapper`).show();
if (typeof dt.drawCallback !== "undefined") {
eval(dt.drawCallback);
}
}
$(`div#${dt.id}-spinner`).hide();
checkPages();
}
};
var ajaxOrData = {};
if (typeof dt.data_element == "undefined") {
ajaxOrData = {
ajax: {
url: dt.ajax_url_full,
type: "POST",
dataSrc: function(json) {
if ($(`#${dt.form_id}_search_bt`) != undefined) {
$(`#${dt.form_id}_loading`).remove();
}
if (json.error) {
console.error(json.error);
$(`#error-${dt.id}`).html(json.error);
$(`#error-${dt.id}`)
.dialog({
title: "Filter failed",
width: 630,
resizable: true,
draggable: true,
modal: false,
closeOnEscape: true,
buttons: {
Ok: function() {
$(this).dialog("close");
}
}
})
.parent()
.addClass("ui-state-error");
} else {
if (json.ajaxReturn !== "undefined") {
eval(`${ajaxReturnFunction}(${json.ajaxReturn})`);
}
if (typeof dt.ajax_postprocess !== "undefined") {
if (json.data) {
json.data.forEach(function(item) {
eval(dt.ajax_postprocess);
});
} else {
json.data = {};
}
}
return json.data;
}
},
data: function(data) {
$(`div#${dt.id}-spinner`).show();
if ($(`#button-${dt.form_id}_search_bt`) != undefined) {
var loading = `<img src="images/spinner.gif" id="${dt.form_id}_loading" class="loading-search-datatables-button" />`;
$(`#button-${dt.form_id}_search_bt`)
.parent()
.append(loading);
}
var inputs = $(`#${dt.form_id} :input`);
var values = {};
inputs.each(function() {
values[this.name] = $(this).val();
});
$.extend(data, ajaxData);
$.extend(data, {
filter: values,
page: dt.ajax_url
});
return data;
}
}
};
} else {
ajaxOrData = { data: dt.data_element };
}
$.extend(settings_datatable, ajaxOrData);
var dt_table = $(`#${dt.table_id}`).DataTable(settings_datatable);
$(`#button-${dt.form_id}_search_bt`).click(function() {
dt_table.draw().page(0);
});
if (typeof dt.caption !== "undefined" && dt.caption !== "") {
$(`#${dt.table_id}`).append(`<caption>${dt.caption}</caption>`);
$(".datatables_thead_tr").css("height", 0);
}
$(function() {
$(document).on("init.dt", function(ev, settings) {
if (dt.mini_search === true) {
$(`#${dt.id}_filter > label > input`).addClass("mini-search-input");
}
$("div.dataTables_length").show();
$("div.dataTables_filter").show();
$("div.dt-buttons").show();
if (dt_table.page.info().pages === 0) {
$(`.action_buttons_right_content .pagination-child-div`).hide();
}
if (dt_table.page.info().pages === 1) {
$(`div.pagination-child-div > #${dt.table_id}_paginate`).hide();
} else {
$(`div.pagination-child-div > #${dt.table_id}_paginate`).show();
}
});
});
});
$(function() {
$(document).on("preInit.dt", function(ev, settings) {
$(`#${dt.id}_wrapper div.dataTables_length`).hide();
$(`#${dt.id}_wrapper div.dataTables_filter`).hide();
$(`#${dt.id}_wrapper div.dt-buttons`).hide();
});
});

View File

@ -6,7 +6,6 @@
"infoThousands": ",",
"lengthMenu": "Show _MENU_ entries",
"loadingRecords": "Loading...",
"processing": "Processing...",
"search": "Search:",
"zeroRecords": "No matching records found",
"thousands": ",",

View File

@ -416,6 +416,10 @@ class Widget
$className .= '\OsQuickReportWidget';
break;
case 'netflow':
$className .= '\Netflow';
break;
case 'GroupedMeterGraphs':
case 'ColorModuleTabs':
case 'BlockHistogram':

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

@ -520,7 +520,7 @@ class DataMatrix extends Widget
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/module',

View File

@ -438,7 +438,7 @@ class ModulesByStatus extends Widget
[
'id' => $tableId,
'class' => 'info_table align-left-important',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/module',

View File

@ -0,0 +1,465 @@
<?php
/**
* Widget Netflow Pandora FMS Console
*
* @category Console Class
* @package Pandora FMS
* @subpackage Widget Netflow
* @version 1.0.0
* @license See below
*
* ______ ___ _______ _______ ________
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation for version 2.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ============================================================================
*/
namespace PandoraFMS\Dashboard;
/**
* Netflow.
*/
class Netflow extends Widget
{
/**
* Name widget.
*
* @var string
*/
protected $name;
/**
* Title widget.
*
* @var string
*/
protected $title;
/**
* Page widget;
*
* @var string
*/
protected $page;
/**
* Class name widget.
*
* @var [type]
*/
protected $className;
/**
* Values options for each widget.
*
* @var [type]
*/
protected $values;
/**
* Configuration required.
*
* @var boolean
*/
protected $configurationRequired;
/**
* Error load widget.
*
* @var boolean
*/
protected $loadError;
/**
* Width.
*
* @var integer
*/
protected $width;
/**
* Heigth.
*
* @var integer
*/
protected $height;
/**
* Grid Width.
*
* @var integer
*/
protected $gridWidth;
/**
* Construct.
*
* @param integer $cellId Cell ID.
* @param integer $dashboardId Dashboard ID.
* @param integer $widgetId Widget ID.
* @param integer|null $width New width.
* @param integer|null $height New height.
* @param integer|null $gridWidth Grid width.
*/
public function __construct(
int $cellId,
int $dashboardId=0,
int $widgetId=0,
?int $width=0,
?int $height=0,
?int $gridWidth=0
) {
global $config;
// Includes.
include_once $config['homedir'].'/include/functions_graph.php';
include_once $config['homedir'].'/include/class/NetworkMap.class.php';
// WARNING: Do not edit. This chunk must be in the constructor.
parent::__construct(
$cellId,
$dashboardId,
$widgetId
);
// Width.
$this->width = $width;
// Height.
$this->height = $height;
// Grid Width.
$this->gridWidth = $gridWidth;
// Options.
$this->values = $this->getOptionsWidget();
// Positions.
$this->position = $this->getPositionWidget();
// Page.
$this->page = basename(__FILE__);
// ClassName.
$class = new \ReflectionClass($this);
$this->className = $class->getShortName();
// Title.
$this->title = __('Netflow');
// Name.
if (empty($this->name) === true) {
$this->name = 'netflow';
}
}
/**
* Generates inputs for form (specific).
*
* @return array Of inputs.
*
* @throws Exception On error.
*/
public function getFormInputs(): array
{
$values = $this->values;
// Retrieve global - common inputs.
$inputs = parent::getFormInputs();
// Default values.
if (isset($values['quantity']) === false) {
$values['quantity'] = 5;
}
// Default values.
if (isset($values['period']) === false) {
$values['period'] = SECONDS_1WEEK;
}
// Default values.
if (isset($values['max_values']) === false) {
$values['max_values'] = 10;
}
// Period.
$inputs[] = [
'label' => __('Interval'),
'arguments' => [
'name' => 'period',
'type' => 'interval',
'value' => $values['period'],
'nothing' => __('None'),
'nothing_value' => 0,
'style_icon' => 'flex-grow: 0',
],
];
$chart_types = netflow_get_chart_types();
$chart_types['usage_map'] = __('Usage map');
$inputs[] = [
'label' => __('Type graph'),
'arguments' => [
'name' => 'chart_type',
'type' => 'select',
'fields' => $chart_types,
'selected' => $values['chart_type'],
],
];
$aggregate_list = [
'srcip' => __('Src Ip Address'),
'dstip' => __('Dst Ip Address'),
'srcport' => __('Src Port'),
'dstport' => __('Dst Port'),
];
$inputs[] = [
'label' => __('Aggregated by'),
'id' => 'aggregated',
'arguments' => [
'name' => 'aggregate',
'type' => 'select',
'fields' => $aggregate_list,
'selected' => $values['aggregate'],
],
];
$inputs[] = [
'label' => __('Data to show'),
'id' => 'data_to_show',
'arguments' => [
'name' => 'action',
'type' => 'select',
'fields' => network_get_report_actions(),
'selected' => $values['action'],
],
];
$max_values = [
'2' => '2',
'5' => '5',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'50' => '50',
];
$inputs[] = [
'label' => __('Max values'),
'arguments' => [
'name' => 'max_values',
'type' => 'select',
'fields' => $max_values,
'selected' => $values['max_values'],
],
];
return $inputs;
}
/**
* Get Post for widget.
*
* @return array
*/
public function getPost():array
{
// Retrieve global - common inputs.
$values = parent::getPost();
$values['period'] = \get_parameter('period', 0);
$values['chart_type'] = \get_parameter('chart_type', '');
$values['aggregate'] = \get_parameter('aggregate');
$values['max_values'] = \get_parameter('max_values', 10);
$values['action'] = \get_parameter('action', 'srcip');
return $values;
}
/**
* Draw widget.
*
* @return string
*/
public function load()
{
ui_require_css_file('netflow_widget', 'include/styles/', true);
global $config;
$output = '';
$size = parent::getSize();
$start_date = (time() - $this->values['period']);
$end_date = time();
if ($this->values['chart_type'] === 'usage_map') {
$map_data = netflow_build_map_data(
$start_date,
$end_date,
$this->values['max_values'],
($this->values['action'] === 'talkers') ? 'srcip' : 'dstip'
);
$has_data = !empty($map_data['nodes']);
if ($has_data === true) {
$map_manager = new \NetworkMap($map_data);
$map_manager->printMap();
} else {
ui_print_info_message(__('No data to show'));
}
} else {
$netflowContainerClass = ($this->values['chart_type'] === 'netflow_data' || $this->values['chart_type'] === 'netflow_summary' || $this->values['chart_type'] === 'netflow_top_N') ? '' : 'white_box';
$filter = [
'aggregate' => $this->values['aggregate'],
'netflow_monitoring_interval' => 300,
];
$output .= html_print_input_hidden(
'selected_style_theme',
$config['style'],
true
);
$style = 'width:100%; height: 100%; border: none;';
if ($this->values['chart_type'] !== 'netflow_area') {
$style .= ' width: 95%;';
}
if ($size['width'] > $size['height']) {
$size['width'] = $size['height'];
}
// Draw the netflow chart.
$output .= html_print_div(
[
'class' => $netflowContainerClass,
'style' => $style,
'content' => netflow_draw_item(
$start_date,
$end_date,
12,
$this->values['chart_type'],
$filter,
$this->values['max_values'],
'',
'HTML',
0,
($size['width'] - 50),
($size['height'] - 20),
),
],
true
);
}
return $output;
}
/**
* Return aux javascript code for forms.
*
* @return string
*/
public function getFormJS()
{
return '
$(document).ready(function(){
//Limit 1 week
$("#period_select option").each(function(key, element){
if(element.value > 604800){
$(element).remove();
}
})
$("#period_manual option").each(function(key, element){
if(element.value > 604800){
$(element).remove();
}
});
$("#period_manual input").on("change", function(e){
if($("#hidden-period").val() > 604800) {
$(this).val(1);
$("#hidden-period").val(604800);
$("#period_manual select option").removeAttr("selected");
setTimeout(() => {
$("#period_default select option[value=\'604800\']").attr("selected", "selected");
$("#period_manual select option[value=\'604800\']").attr("selected", "selected");
$("#period_manual select").val(604800);
}, 500);
}
});
if($("#chart_type").val() === "usage_map") {
$("#data_to_show").show();
$("#aggregated").hide();
} else {
$("#data_to_show").hide();
$("#aggregated").show();
}
$("#chart_type").on("change", function(e){
if(this.value === "usage_map") {
$("#data_to_show").show();
$("#aggregated").hide();
} else {
$("#data_to_show").hide();
$("#aggregated").show();
}
});
});
';
}
/**
* Get description.
*
* @return string.
*/
public static function getDescription()
{
return __('Netflow');
}
/**
* Get Name.
*
* @return string.
*/
public static function getName()
{
return 'netflow';
}
/**
* Get size Modal Configuration.
*
* @return array
*/
public function getSizeModalConfiguration(): array
{
$size = [
'width' => 400,
'height' => 530,
];
return $size;
}
}

View File

@ -395,7 +395,9 @@ class SystemGroupStatusWidget extends Widget
$user_groups = users_get_groups(false, 'AR', $return_all_group);
$selected_groups = explode(',', $this->values['groupId'][0]);
$all_group_selected = false;
if (in_array(0, $selected_groups) === true) {
$all_group_selected = true;
$selected_groups = [];
foreach (groups_get_all() as $key => $name_group) {
$selected_groups[] = groups_get_id($name_group);
@ -480,7 +482,12 @@ class SystemGroupStatusWidget extends Widget
}
}
$this->values['groupId'] = $selected_groups;
if ($all_group_selected === true && $this->values['groupRecursion'] === true) {
$this->values['groupId'] = array_keys($result_groups);
} else {
$this->values['groupId'] = $selected_groups;
}
$this->values['status'] = explode(',', $this->values['status'][0]);
$style = 'font-size: 1.5em; font-weight: bolder;text-align: center;';

View File

@ -365,3 +365,7 @@ form#modal_form_feedback > ul > li > textarea {
form#modal_form_feedback > ul > li:not(:first-child) > label {
margin-top: 20px !important;
}
table.dataTable {
box-sizing: border-box !important;
}

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

@ -0,0 +1,13 @@
.menu_graph {
display: none;
}
.parent_graph {
width: 97% !important;
}
#image_hide_show_labels {
display: none !important;
}
.select2-search--dropdown .select2-search__field {
padding: 0px !important;
}

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;
}
@ -11665,14 +11646,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;
}
@ -11948,7 +11929,7 @@ span.help_icon_15px > img {
/* ==== Spinner ==== */
.spinner-fixed {
position: absolute;
left: 40%;
left: 45%;
top: 40%;
z-index: 1;
width: 100px;
@ -11958,6 +11939,7 @@ span.help_icon_15px > img {
animation: animate 1.2s linear infinite;
margin: auto;
margin-bottom: 40px;
text-align: initial;
}
.spinner-fixed span {
position: absolute;
@ -12340,3 +12322,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

@ -383,15 +383,35 @@ a.pandora_pagination.current:hover {
cursor: pointer;
}
.dt-button.buttons-csv.buttons-html5.mini-csv-button {
background-image: url(../../images/file-csv.svg);
background-position: 4px center;
height: 26px;
width: 31px;
margin-left: 10px;
box-shadow: 0px 0px 0px #00000000;
border: 0px;
border-radius: 0px;
}
.dt-button.buttons-csv.buttons-html5:hover {
color: #1d7873 !important;
border: 2px solid #1d7873 !important;
}
.dt-button.buttons-csv.buttons-html5.mini-csv-button:hover {
color: #00000000 !important;
border: 0px !important;
}
.dt-button.buttons-csv.buttons-html5:before {
content: "csv";
}
.dt-button.buttons-csv.buttons-html5.mini-csv-button:before {
content: "";
}
.dt-button.buttons-csv.buttons-html5 span {
font-size: 0;
}

View File

@ -712,7 +712,6 @@ if (isset($config['id_user']) === false) {
login_check_failed($nick);
}
$config['auth_error'] = __('User is blocked');
$login_failed = true;
}

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'>
<?php
$version = '7.0NG.772';
$build = '230718';
$build = '230726';
$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'],
@ -359,7 +362,7 @@ if ($agent_view_page === true) {
[
'id' => 'alerts_status_datatable',
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'no_sortable_columns' => $no_sortable_columns,

View File

@ -205,9 +205,15 @@ if ($edit_networkmap) {
$button = [];
if ($edit_networkmap === true) {
if (empty($method) === false && $method === 'radial_dinamic') {
$url = 'index.php?sec=network&sec2=operation/agentes/networkmap.dinamic&activeTab=radial_dynamic&id_networkmap='.$id;
} else {
$url = 'index.php?sec=network&sec2=operation/agentes/pandora_networkmap&tab=view&id_networkmap='.$id;
}
$button['map'] = [
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/pandora_networkmap&tab=view&id_networkmap='.$id.'">'.html_print_image(
'text' => '<a href="'.$url.'">'.html_print_image(
'images/network@svg.svg',
true,
[

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

@ -2560,7 +2560,7 @@ try {
[
'id' => $table_id,
'class' => 'info_table events',
'style' => 'width: 99%;',
'style' => 'width: 100%;',
'ajax_url' => 'operation/events/events',
'ajax_data' => [
'get_events' => 1,

View File

@ -804,7 +804,7 @@ if ($inventory_module !== 'basic') {
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
@ -919,7 +919,7 @@ if ($inventory_module !== 'basic') {
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
@ -1083,7 +1083,7 @@ if ($inventory_module !== 'basic') {
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
@ -1173,7 +1173,7 @@ if ($inventory_module !== 'basic') {
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
@ -1188,6 +1188,8 @@ if ($inventory_module !== 'basic') {
'emptyTable' => __('No inventory found'),
'return' => true,
'no_sortable_columns' => [],
'mini_search' => true,
'mini_pagination' => true,
]
);
@ -1204,7 +1206,7 @@ if ($inventory_module !== 'basic') {
[
'id' => $id_table,
'class' => 'info_table w100p',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $columns,
'no_sortable_columns' => [],
@ -1233,7 +1235,7 @@ if ($inventory_module !== 'basic') {
$agentes = [];
$data = [];
$class = 'info_table';
$style = 'width: 99%';
$style = 'width: 100%';
$ordering = true;
$searching = false;

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 230718
%define release 230726
# 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 230718
%define release 230726
# 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 230718
%define release 230726
%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

@ -105,7 +105,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $ajax_url,

View File

@ -82,7 +82,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $model->ajaxController,

View File

@ -86,7 +86,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 99%',
'style' => 'width: 100%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/consoles.ajax',

View File

@ -1,10 +1,10 @@
package: pandorafms-server
Version: 7.0NG.772-230718
Version: 7.0NG.772-230726
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-230718"
pandora_version="7.0NG.772-230726"
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 = "230718";
my $pandora_build = "230726";
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

@ -1040,8 +1040,12 @@ sub pandora_execute_alert {
$event_generated = 1;
$monitoring_event_custom_data = $custom_data;
}
if($alert_mode == FIRED_ALERT || ($alert_mode == RECOVERED_ALERT && $action->{'recovered'} == 0)) {
pandora_execute_action ($pa_config, $data, $agent, $alert, $alert_mode, $action, $module, $dbh, $timestamp, $extra_macros, $monitoring_event_custom_data);
}else{
logger ($pa_config, "Skipping recover action " . safe_output($action->{'name'}) . " for alert '" . safe_output($alert->{'name'}) . "' module '" . safe_output($module->{'nombre'}) . "'.", 10);
}
if($alert_mode == RECOVERED_ALERT) {
# Reset action thresholds and set recovered

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

Some files were not shown because too many files have changed in this diff Show More