Merge remote-tracking branch 'origin/develop' into features/oracle

This commit is contained in:
Alejandro Gallardo Escobar 2015-06-18 20:02:01 +02:00
commit 3b037caf32
222 changed files with 3634 additions and 3474 deletions

View File

@ -0,0 +1,49 @@
%define name wmic
%define version 4.0.0tp4.rbn
Summary: Linux WMI client to do WMI querys using DCOM http://samba.org
Name: %{name}
Version: %{version}
Release: 1
License: GPL2
Group: System/Management
Packager: Robert B. Nelson <robertn@the-nelsons.org>
Source: http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
Patch1: http://www.openvas.org/download/wmi/openvas-wmi-1.3.14.patch
Patch2: http://www.openvas.org/download/wmi/openvas-wmi-1.3.14.patch2
Patch3: http://www.openvas.org/download/wmi/openvas-wmi-1.3.14.patch3v2
Patch4: http://www.openvas.org/download/wmi/openvas-wmi-1.3.14.patch4
Patch5: http://www.openvas.org/download/wmi/openvas-wmi-1.3.14.patch5
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReq: 1
Provides: %{name}-%{version}
%description
Linux WMI client to do WMI querys. More information at SAMBA4 project at http://www.samba.org/
%prep
rm -rf $RPM_BUILD_ROOT
%setup -n wmi-1.3.14
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
cd Samba/source
./autogen.sh
./configure --without-readline --enable-debug
make "CPP=gcc -E -ffreestanding" proto bin/wmic
%install
mkdir -p $RPM_BUILD_ROOT/usr/bin/
install Samba/source/bin/wmic $RPM_BUILD_ROOT%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%{_bindir}/wmic

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 6.0dev-150602 Version: 6.0dev-150618
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

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

View File

@ -68,40 +68,43 @@ server_port 41121
# Transfer mode: tentacle, ftp, ssh or local # Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle transfer_mode tentacle
# timeout in seconds for file transfer programs execution (30 by default)
#transfer_timeout 30
# Server password (Tentacle or FTP). Leave empty for no password (default). # Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword #server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default). # Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no #server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5"). # Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts #server_opts
# delayed_startup defines number of seconds before start execution # delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent # for first time when startup Pandora FMS Agent
# delayed_startup 10 #delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution # Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default) # A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0 #pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use # Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode. # of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler # This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe. # is much more safe.
# cron_mode #cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version) # If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1 #remote_config 1
# If set to 1 start Drone Agent's Proxy Mode # If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1 #proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10) # Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10 #proxy_max_connection 10
# Proxy timeout (by default 1s) # Proxy timeout (by default 1s)
# proxy_timeout 1 #proxy_timeout 1
# Number of threads to execute modules in parallel # Number of threads to execute modules in parallel
#agent_threads 1 #agent_threads 1
@ -109,20 +112,21 @@ transfer_mode tentacle
# User the agent will run as # User the agent will run as
#pandora_user root #pandora_user root
# Secondary server configuration #Secondary server configuration
# ============================== #==============================
# If secondary_mode is set to on_error, data files are copied to the secondary # If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are # server only if the primary server fails. If set to always, data files are
# always copied to the secondary server. # always copied to the secondary server.
# secondary_mode on_error #secondary_mode on_error
# secondary_server_ip localhost #secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in #secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121 #secondary_server_port 41121
# secondary_transfer_mode tentacle #secondary_transfer_mode tentacle
# secondary_server_pwd mypassword #secondary_transfer_timeout 30
# secondary_server_ssl no #secondary_server_pwd mypassword
# secondary_server_opts #secondary_server_ssl no
#secondary_server_opts
# Module Definition # Module Definition
# ================= # =================

View File

@ -94,6 +94,9 @@ server_port 41121
# Transfer mode: tentacle, ftp, ssh or local # Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle transfer_mode tentacle
# timeout in seconds for file transfer programs execution (30 by default)
#transfer_timeout 30
# Server password (Tentacle or FTP). Leave empty for no password (default). # Server password (Tentacle or FTP). Leave empty for no password (default).
#server_pwd mypassword #server_pwd mypassword
@ -154,6 +157,7 @@ temporal_min_size 1024
#secondary_server_path /var/spool/pandora/data_in #secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121 #secondary_server_port 41121
#secondary_transfer_mode tentacle #secondary_transfer_mode tentacle
#secondary_transfer_timeout 30
#secondary_server_pwd mypassword #secondary_server_pwd mypassword
#secondary_server_ssl no #secondary_server_ssl no
#secondary_server_opts #secondary_server_opts

View File

@ -64,40 +64,43 @@ server_port 41121
# Transfer mode: tentacle, ftp, ssh or local # Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle transfer_mode tentacle
# timeout in seconds for file transfer programs execution (30 by default)
#transfer_timeout 30
# Server password (Tentacle or FTP). Leave empty for no password (default). # Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword #server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default). # Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no #server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5"). # Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts #server_opts
# delayed_startup defines number of seconds before start execution # delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent # for first time when startup Pandora FMS Agent
# delayed_startup 10 #delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution # Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default) # A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0 #pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use # Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode. # of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler # This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe. # is much more safe.
# cron_mode #cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version) # If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1 #remote_config 1
# If set to 1 start Drone Agent's Proxy Mode # If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1 #proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10) # Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10 #proxy_max_connection 10
# Proxy timeout (by default 1s) # Proxy timeout (by default 1s)
# proxy_timeout 1 #proxy_timeout 1
# Number of threads to execute modules in parallel # Number of threads to execute modules in parallel
#agent_threads 1 #agent_threads 1
@ -111,14 +114,15 @@ transfer_mode tentacle
# If secondary_mode is set to on_error, data files are copied to the secondary # If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are # server only if the primary server fails. If set to always, data files are
# always copied to the secondary server. # always copied to the secondary server.
# secondary_mode on_error #secondary_mode on_error
# secondary_server_ip localhost #secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in #secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121 #secondary_server_port 41121
# secondary_transfer_mode tentacle #secondary_transfer_mode tentacle
# secondary_server_pwd mypassword #secondary_transfer_timeout 30
# secondary_server_ssl no #secondary_server_pwd mypassword
# secondary_server_opts #secondary_server_ssl no
#secondary_server_opts
# Module Definition # Module Definition
# ================= # =================

View File

@ -58,40 +58,43 @@ server_port 41121
# Transfer mode: tentacle, ftp, ssh or local # Transfer mode: tentacle, ftp, ssh or local
transfer_mode tentacle transfer_mode tentacle
# timeout in seconds for file transfer programs execution (30 by default)
#transfer_timeout 30
# Server password (Tentacle or FTP). Leave empty for no password (default). # Server password (Tentacle or FTP). Leave empty for no password (default).
# server_pwd mypassword #server_pwd mypassword
# Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default). # Set to yes/no to enable/disable OpenSSL support for Tentacle (disabled by default).
# server_ssl no #server_ssl no
# Extra options for the Tentacle client (for example, server_opts "-v -r 5"). # Extra options for the Tentacle client (for example, server_opts "-v -r 5").
# server_opts #server_opts
# delayed_startup defines number of seconds before start execution # delayed_startup defines number of seconds before start execution
# for first time when startup Pandora FMS Agent # for first time when startup Pandora FMS Agent
# delayed_startup 10 #delayed_startup 10
# Pandora nice defines priority of execution. Less priority means more intensive execution # Pandora nice defines priority of execution. Less priority means more intensive execution
# A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default) # A recommended value is 10. 0 priority means no Pandora CPU protection enabled (default)
# pandora_nice 0 #pandora_nice 0
# Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use # Cron mode replace Pandora FMS own task schedule each XX interval seconds by the use
# of old style cron. You should add to crontab Pandora FMS agent script to use this mode. # of old style cron. You should add to crontab Pandora FMS agent script to use this mode.
# This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler # This is disabled by default, and is not recommended. Use Pandora FMS internal scheduler
# is much more safe. # is much more safe.
# cron_mode #cron_mode
# If set to 1 allows the agent to be configured via the web console (Only Enterprise version) # If set to 1 allows the agent to be configured via the web console (Only Enterprise version)
# remote_config 1 #remote_config 1
# If set to 1 start Drone Agent's Proxy Mode # If set to 1 start Drone Agent's Proxy Mode
# proxy_mode 1 #proxy_mode 1
# Max number of simmultaneus connection for proxy (by default 10) # Max number of simmultaneus connection for proxy (by default 10)
# proxy_max_connection 10 #proxy_max_connection 10
# Proxy timeout (by default 1s) # Proxy timeout (by default 1s)
# proxy_timeout 1 #proxy_timeout 1
# User the agent will run as # User the agent will run as
#pandora_user root #pandora_user root
@ -102,14 +105,15 @@ transfer_mode tentacle
# If secondary_mode is set to on_error, data files are copied to the secondary # If secondary_mode is set to on_error, data files are copied to the secondary
# server only if the primary server fails. If set to always, data files are # server only if the primary server fails. If set to always, data files are
# always copied to the secondary server. # always copied to the secondary server.
# secondary_mode on_error #secondary_mode on_error
# secondary_server_ip localhost #secondary_server_ip localhost
# secondary_server_path /var/spool/pandora/data_in #secondary_server_path /var/spool/pandora/data_in
# secondary_server_port 41121 #secondary_server_port 41121
# secondary_transfer_mode tentacle #secondary_transfer_mode tentacle
# secondary_server_pwd mypassword #secondary_transfer_timeout 30
# secondary_server_ssl no #secondary_server_pwd mypassword
# secondary_server_opts #secondary_server_ssl no
#secondary_server_opts
# Module Definition # Module Definition
# ================= # =================

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '6.0dev'; use constant AGENT_VERSION => '6.0dev';
use constant AGENT_BUILD => '150602'; use constant AGENT_BUILD => '150618';
# Commands to retrieve total memory information in kB # Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => { use constant TOTALMEMORY_CMDS => {
@ -510,6 +510,9 @@ sub parse_conf_modules($) {
# Make the module run the first time # Make the module run the first time
$module->{'counter'} = $module->{'intensive_interval'}; $module->{'counter'} = $module->{'intensive_interval'};
# Replace macros
replace_macros ($module);
push (@Modules, {%{$module}}); push (@Modules, {%{$module}});
} else { } else {
$module->{'func'} = \&module_plugin; $module->{'func'} = \&module_plugin;
@ -601,15 +604,19 @@ sub write_broker_conf($){
my ($broker_agent) = @_; my ($broker_agent) = @_;
my $content = ''; my $content = '';
# I don't think the following should be copied either: proxy_*
my %ignored_tokens = (
'broker_agent' => 1, 'agent_name_cmd' => 1, 'udp_server' => 1, 'cron_mode' => 1
);
open (CONF_FILE, "$ConfDir/$ConfFile") or error ("Could not open file '$ConfDir/$ConfFile': $!."); open (CONF_FILE, "$ConfDir/$ConfFile") or error ("Could not open file '$ConfDir/$ConfFile': $!.");
open (BROKER_FILE, ">$ConfDir/${broker_agent}.conf") or error ("Could not write configuration file: $!"); open (BROKER_FILE, ">$ConfDir/${broker_agent}.conf") or error ("Could not write configuration file: $!");
while (my $line = <CONF_FILE>){ while (my $line = <CONF_FILE>) {
# Skip broker definitions my ( $token ) = $line =~ m/^\s*(\S+)(\s.*)?$/;
if ($line =~ m/^\s*broker_agent/) { # Skip tokens which should not be copied to broker configuration
next; next if defined $ignored_tokens{$token};
}
# Change the agent name # Change the agent name
if ($line =~ m/^\s*#*\s*agent_name\s+/) { if ($line =~ m/^\s*#*\s*agent_name\s+/) {
@ -647,19 +654,6 @@ sub read_config (;$) {
# Replace CRLF with LF # Replace CRLF with LF
$line =~ s/\r\n/\n/g; $line =~ s/\r\n/\n/g;
# Store the custom fields
if (($line =~ m/^(custom_field\d+_name)\s+(.*)/) or ($line =~ m/^(custom_field\d+_value)\s+(.*)/)) {
$Customfields{$1} = $2;
next;
}
# Save global macros
if ($line =~ m/^macro(\S+)\s+(.*)/) {
$Macros{$1} = $2;
next;
}
# Token search # Token search
if (defined ($token)) { if (defined ($token)) {
if ($line =~ /^\s*(\S+)\s+(.*)$/ && $1 eq $token) { if ($line =~ /^\s*(\S+)\s+(.*)$/ && $1 eq $token) {
@ -675,6 +669,20 @@ sub read_config (;$) {
} }
next; next;
} }
# Store the custom fields
if (($line =~ m/^(custom_field\d+_name)\s+(.*)/) or ($line =~ m/^(custom_field\d+_value)\s+(.*)/)) {
$Customfields{$1} = $2;
next;
}
# Save global macros
if ($line =~ m/^macro(\S+)\s+(.*)/) {
$Macros{$1} = $2;
next;
}
next if ($line =~ /^module\s*\w*/); next if ($line =~ /^module\s*\w*/);
#Configuration token #Configuration token
@ -872,7 +880,7 @@ sub send_buffered_xml_files () {
while (my $xml_file = readdir(TEMPORAL)) { while (my $xml_file = readdir(TEMPORAL)) {
# Skip non data files and symlinks # Skip non data files and symlinks
next if ($xml_file !~ m/\.data$/ || -l "$Conf{'temporal'}/$xml_file"); next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$Conf{'temporal'}/$xml_file");
my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1); my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1);
unlink ("$Conf{'temporal'}/$xml_file") if ($rc == 0); unlink ("$Conf{'temporal'}/$xml_file") if ($rc == 0);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 6.0dev %define version 6.0dev
%define release 150602 %define release 150618
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}
@ -51,11 +51,6 @@ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_R
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
# Checking old config file (if exists)
if [ -f /etc/pandora/pandora_agent.conf ] ; then
mv /etc/pandora/pandora_agent.conf /etc/pandora/pandora_agent.conf.backup
fi
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 6.0dev %define version 6.0dev
%define release 150602 %define release 150618
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}
@ -51,16 +51,11 @@ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent_daemon $RPM_BUILD_R
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/pandora_agent.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/ cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/man/man1/tentacle_client.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
# Checking old config file (if exists)
if [ -f /etc/pandora/pandora_agent.conf ] ; then
mv /etc/pandora/pandora_agent.conf /etc/pandora/pandora_agent.conf.backup
fi
cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew cp -aRf $RPM_BUILD_ROOT%{prefix}/pandora_agent/Linux/pandora_agent.conf $RPM_BUILD_ROOT/usr/share/pandora_agent/pandora_agent.conf.rpmnew
if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then #if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec ] ; then
rm $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec # rm $RPM_BUILD_ROOT%{prefix}/pandora_agent/pandora_agent.spec
fi #fi
%clean %clean
rm -Rf $RPM_BUILD_ROOT rm -Rf $RPM_BUILD_ROOT

View File

@ -62,6 +62,9 @@ interval 300
transfer_mode tentacle transfer_mode tentacle
server_port 41121 server_port 41121
# timeout in seconds for file transfer programs execution (30 by default)
#transfer_timeout 30
# In case of using FTP or tentacle with password. User is always "pandora" # In case of using FTP or tentacle with password. User is always "pandora"
#server_pwd pandora #server_pwd pandora
@ -98,6 +101,7 @@ xml_buffer 1
#secondary_server_path /var/spool/pandora/data_in #secondary_server_path /var/spool/pandora/data_in
#secondary_server_port 41121 #secondary_server_port 41121
#secondary_transfer_mode tentacle #secondary_transfer_mode tentacle
#secondary_transfer_timeout 30
#secondary_server_pwd mypassword #secondary_server_pwd mypassword
#secondary_server_ssl no #secondary_server_ssl no
#secondary_server_opts #secondary_server_opts

View File

@ -107,7 +107,7 @@ read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
*/ */
int int
Pandora_Ftp_Client::ftpFileFilename (const string remote_filename, Pandora_Ftp_Client::ftpFileFilename (const string remote_filename,
const string filepath) const string filepath, int timeout)
{ {
FILE *fd; FILE *fd;
string operation1; string operation1;
@ -155,8 +155,8 @@ Pandora_Ftp_Client::ftpFileFilename (const string remote_filename,
curl_easy_setopt (this->curl, CURLOPT_UPLOAD, 1) ; curl_easy_setopt (this->curl, CURLOPT_UPLOAD, 1) ;
curl_easy_setopt (this->curl, CURLOPT_URL, url.c_str ()); curl_easy_setopt (this->curl, CURLOPT_URL, url.c_str ());
curl_easy_setopt (this->curl, CURLOPT_POSTQUOTE, headerlist); curl_easy_setopt (this->curl, CURLOPT_POSTQUOTE, headerlist);
curl_easy_setopt (this->curl, CURLOPT_TIMEOUT, 240); curl_easy_setopt (this->curl, CURLOPT_TIMEOUT, timeout * 4);
curl_easy_setopt (this->curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 60); curl_easy_setopt (this->curl, CURLOPT_FTP_RESPONSE_TIMEOUT, timeout);
curl_easy_setopt (this->curl, CURLOPT_READFUNCTION, read_func); curl_easy_setopt (this->curl, CURLOPT_READFUNCTION, read_func);
curl_easy_setopt (this->curl, CURLOPT_READDATA, fd); curl_easy_setopt (this->curl, CURLOPT_READDATA, fd);
curl_easy_setopt (curl, CURLOPT_INFILESIZE_LARGE, curl_easy_setopt (curl, CURLOPT_INFILESIZE_LARGE,

View File

@ -72,7 +72,7 @@ namespace FTP {
void disconnect (); void disconnect ();
int ftpFileFilename (const string remote_filename, int ftpFileFilename (const string remote_filename,
const string filepath); const string filepath, int timeout);
string getError (); string getError ();
}; };

View File

@ -79,10 +79,16 @@ Pandora_FTP_Test::test () {
char *err; char *err;
DIR *dir; DIR *dir;
FILE *conf_fh = NULL; FILE *conf_fh = NULL;
int timeout;
remote_host = this->conf->getValue ("server_ip"); remote_host = this->conf->getValue ("server_ip");
cout << "Connecting with " << remote_host << "..." << endl; cout << "Connecting with " << remote_host << "..." << endl;
password = this->conf->getValue ("server_pwd"); password = this->conf->getValue ("server_pwd");
timeout = atoi (conf->getValue ("transfer_timeout").c_str ());
if (timeout == 0) {
timeout = 30;
}
if (password == "") { if (password == "") {
cout << "FTP password not found in configuration file." << endl; cout << "FTP password not found in configuration file." << endl;
cout << "Check that server_pwd variable is set." << endl; cout << "Check that server_pwd variable is set." << endl;
@ -136,7 +142,7 @@ Pandora_FTP_Test::test () {
try { try {
ftp_client->ftpFileFilename (remote_filepath + tmp_filename, ftp_client->ftpFileFilename (remote_filepath + tmp_filename,
tmp_filepath); tmp_filepath, timeout);
} catch (FTP::Unknown_Host e) { } catch (FTP::Unknown_Host e) {
cout << "Failed when copying to " << remote_host << " (" << cout << "Failed when copying to " << remote_host << " (" <<
ftp_client->getError () << ")" << endl; ftp_client->getError () << ")" << endl;

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{150602} {150618}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("6.0dev(Build 150602)") #define PANDORA_VERSION ("6.0dev(Build 150618)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -687,14 +687,14 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
string port, string port,
string ssl, string ssl,
string pass, string pass,
string opts) string opts,
int timeout)
{ {
DWORD rc; DWORD rc;
string var, filepath; string var, filepath;
string tentacle_cmd, working_dir; string tentacle_cmd, working_dir;
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
STARTUPINFO si; STARTUPINFO si;
int tentacle_timeout = 0;
var = conf->getValue ("temporal"); var = conf->getValue ("temporal");
if (var[var.length () - 1] != '\\') { if (var[var.length () - 1] != '\\') {
@ -740,24 +740,25 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
CloseHandle (pi.hThread); CloseHandle (pi.hThread);
/* Timeout */ /* Timeout */
tentacle_timeout = atoi (conf->getValue ("tentacle_timeout").c_str ()); if (timeout <= 0) {
if (tentacle_timeout <= 0) { timeout = 30;
tentacle_timeout = INFINITE; }
} else { /* Convert to milliseconds */
/* Convert to milliseconds */ timeout *= 1000;
tentacle_timeout *= 1000;
}
if (WaitForSingleObject(pi.hProcess, tentacle_timeout) == WAIT_TIMEOUT) { if (WaitForSingleObject(pi.hProcess, timeout) == WAIT_TIMEOUT) {
TerminateProcess(pi.hProcess, STILL_ACTIVE); TerminateProcess(pi.hProcess, STILL_ACTIVE);
CloseHandle (pi.hProcess); CloseHandle (pi.hProcess);
pandoraLog ("Pandora Agent: Failed when copying to %s (tentacle timeout)", host.c_str ());
return -1; return -1;
} }
/* Get the return code of the tentacle client*/ /* Get the return code of the tentacle client*/
GetExitCodeProcess (pi.hProcess, &rc); GetExitCodeProcess (pi.hProcess, &rc);
if (rc != 0) { if (rc != 0) {
CloseHandle (pi.hProcess); CloseHandle (pi.hProcess);
pandoraLog ("Pandora Agent: Failed when copying to %s",
host.c_str ());
return -1; return -1;
} }
@ -770,6 +771,8 @@ Pandora_Windows_Service::copyScpDataFile (string host,
string remote_path, string remote_path,
string filename) string filename)
{ {
/* TODO: timeout implementation */
int rc = 0; int rc = 0;
SSH::Pandora_Ssh_Client ssh_client; SSH::Pandora_Ssh_Client ssh_client;
string tmp_dir, filepath,port_str; string tmp_dir, filepath,port_str;
@ -830,7 +833,8 @@ int
Pandora_Windows_Service::copyFtpDataFile (string host, Pandora_Windows_Service::copyFtpDataFile (string host,
string remote_path, string remote_path,
string filename, string filename,
string password) string password,
int timeout)
{ {
int rc = 0; int rc = 0;
FTP::Pandora_Ftp_Client ftp_client; FTP::Pandora_Ftp_Client ftp_client;
@ -856,7 +860,7 @@ Pandora_Windows_Service::copyFtpDataFile (string host,
password); password);
rc = ftp_client.ftpFileFilename (remote_path + filename, rc = ftp_client.ftpFileFilename (remote_path + filename,
filepath); filepath, timeout);
if (rc == UNKNOWN_HOST) { if (rc == UNKNOWN_HOST) {
pandoraLog ("Pandora Agent: Failed when copying to %s (%s)", pandoraLog ("Pandora Agent: Failed when copying to %s (%s)",
host.c_str (), ftp_client.getError ().c_str ()); host.c_str (), ftp_client.getError ().c_str ());
@ -882,13 +886,18 @@ Pandora_Windows_Service::copyFtpDataFile (string host,
int int
Pandora_Windows_Service::copyDataFile (string filename) Pandora_Windows_Service::copyDataFile (string filename)
{ {
int rc = 0; int rc = 0, timeout;
unsigned char copy_to_secondary = 0; unsigned char copy_to_secondary = 0;
string mode, host, remote_path; string mode, host, remote_path;
mode = conf->getValue ("transfer_mode"); mode = conf->getValue ("transfer_mode");
host = conf->getValue ("server_ip"); host = conf->getValue ("server_ip");
remote_path = conf->getValue ("server_path"); remote_path = conf->getValue ("server_path");
timeout = atoi (conf->getValue ("transfer_timeout").c_str ());
if (timeout == 0) {
timeout = 30;
}
// Fix remote path // Fix remote path
if (mode != "local" && remote_path[remote_path.length () - 1] != '/') { if (mode != "local" && remote_path[remote_path.length () - 1] != '/') {
remote_path += "/"; remote_path += "/";
@ -897,11 +906,11 @@ Pandora_Windows_Service::copyDataFile (string filename)
} }
if (mode == "ftp") { if (mode == "ftp") {
rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("server_pwd")); rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("server_pwd"), timeout);
} else if (mode == "tentacle" || mode == "") { } else if (mode == "tentacle" || mode == "") {
rc = copyTentacleDataFile (host, filename, conf->getValue ("server_port"), rc = copyTentacleDataFile (host, filename, conf->getValue ("server_port"),
conf->getValue ("server_ssl"), conf->getValue ("server_pwd"), conf->getValue ("server_ssl"), conf->getValue ("server_pwd"),
conf->getValue ("server_opts")); conf->getValue ("server_opts"), timeout);
} else if (mode == "ssh") { } else if (mode == "ssh") {
rc =copyScpDataFile (host, remote_path, filename); rc =copyScpDataFile (host, remote_path, filename);
} else if (mode == "local") { } else if (mode == "local") {
@ -932,6 +941,10 @@ Pandora_Windows_Service::copyDataFile (string filename)
mode = conf->getValue ("secondary_transfer_mode"); mode = conf->getValue ("secondary_transfer_mode");
host = conf->getValue ("secondary_server_ip"); host = conf->getValue ("secondary_server_ip");
remote_path = conf->getValue ("secondary_server_path"); remote_path = conf->getValue ("secondary_server_path");
timeout = atoi (conf->getValue ("secondary_transfer_timeout").c_str ());
if (timeout == 0) {
timeout = 30;
}
// Fix remote path // Fix remote path
if (mode != "local" && remote_path[remote_path.length () - 1] != '/') { if (mode != "local" && remote_path[remote_path.length () - 1] != '/') {
@ -942,11 +955,11 @@ Pandora_Windows_Service::copyDataFile (string filename)
// Send the file to the secondary server // Send the file to the secondary server
if (mode == "ftp") { if (mode == "ftp") {
rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("secondary_server_pwd")); rc = copyFtpDataFile (host, remote_path, filename, conf->getValue ("secondary_server_pwd"), timeout);
} else if (mode == "tentacle" || mode == "") { } else if (mode == "tentacle" || mode == "") {
rc = copyTentacleDataFile (host, filename, conf->getValue ("secondary_server_port"), rc = copyTentacleDataFile (host, filename, conf->getValue ("secondary_server_port"),
conf->getValue ("secondary_server_ssl"), conf->getValue ("secondary_server_pwd"), conf->getValue ("secondary_server_ssl"), conf->getValue ("secondary_server_pwd"),
conf->getValue ("secondary_server_opts")); conf->getValue ("secondary_server_opts"), timeout);
} else if (mode == "ssh") { } else if (mode == "ssh") {
rc = copyScpDataFile (host, remote_path, filename); rc = copyScpDataFile (host, remote_path, filename);
} else { } else {
@ -965,11 +978,14 @@ Pandora_Windows_Service::copyDataFile (string filename)
void void
Pandora_Windows_Service::recvTentacleDataFile (string host, Pandora_Windows_Service::recvTentacleDataFile (string host,
string filename) string filename,
int timeout)
{ {
int rc; DWORD rc;
string var; string var;
string tentacle_cmd; string tentacle_cmd;
PROCESS_INFORMATION pi;
STARTUPINFO si;
/* Change directory to "temporal" */ /* Change directory to "temporal" */
var = conf->getValue ("temporal"); var = conf->getValue ("temporal");
@ -1008,42 +1024,58 @@ Pandora_Windows_Service::recvTentacleDataFile (string host,
filename.c_str (), host.c_str ()); filename.c_str (), host.c_str ());
pandoraDebug ("Command %s", tentacle_cmd.c_str()); pandoraDebug ("Command %s", tentacle_cmd.c_str());
rc = system (tentacle_cmd.c_str()); ZeroMemory (&si, sizeof (si));
switch (rc) { ZeroMemory (&pi, sizeof (pi));
if (CreateProcess (NULL , (CHAR *)tentacle_cmd.c_str (), NULL, NULL, FALSE,
/* system() error */ CREATE_NO_WINDOW, NULL, NULL, &si, &pi) == 0) {
case -1: return;
pandoraLog ("Unable to receive file %s", filename.c_str ());
throw Pandora_Exception ();
/* tentacle_client.exe returned OK */
case 0:
break;
/* tentacle_client.exe error */
default:
pandoraDebug ("Tentacle client was unable to receive file %s",
filename.c_str ());
throw Pandora_Exception ();
} }
/* close thread handle, because it won't be used */
CloseHandle (pi.hThread);
/* Timeout */
if (timeout <= 0) {
timeout = 30;
}
/* Convert to milliseconds */
timeout *= 1000;
if (WaitForSingleObject(pi.hProcess, timeout) == WAIT_TIMEOUT) {
TerminateProcess(pi.hProcess, STILL_ACTIVE);
CloseHandle (pi.hProcess);
pandoraLog ("Unable to receive file %s (tentacle timeout)", filename.c_str ());
return;
}
/* Get the return code of the tentacle client*/
GetExitCodeProcess (pi.hProcess, &rc);
if (rc != 0) {
CloseHandle (pi.hProcess);
pandoraLog ("Unable to receive file %s", filename.c_str ());
return;
}
CloseHandle (pi.hProcess);
return; return;
} }
void void
Pandora_Windows_Service::recvDataFile (string filename) { Pandora_Windows_Service::recvDataFile (string filename) {
string mode, host, remote_path; string mode, host, remote_path;
int timeout;
mode = conf->getValue ("transfer_mode"); mode = conf->getValue ("transfer_mode");
host = conf->getValue ("server_ip"); host = conf->getValue ("server_ip");
remote_path = conf->getValue ("server_path"); remote_path = conf->getValue ("server_path");
timeout = atoi (conf->getValue ("transfer_timeout").c_str ());
if (remote_path[remote_path.length () - 1] != '/') { if (remote_path[remote_path.length () - 1] != '/') {
remote_path += "/"; remote_path += "/";
} }
try { try {
if (mode == "tentacle") { if (mode == "tentacle") {
recvTentacleDataFile (host, filename); recvTentacleDataFile (host, filename, timeout);
} else { } else {
pandoraLog ("Transfer mode %s does not support file retrieval.", mode.c_str () ); pandoraLog ("Transfer mode %s does not support file retrieval.", mode.c_str () );
throw Pandora_Exception (); throw Pandora_Exception ();

View File

@ -61,19 +61,22 @@ namespace Pandora {
string port, string port,
string ssl, string ssl,
string pass, string pass,
string opts); string opts,
int timeout);
int copyScpDataFile (string host, int copyScpDataFile (string host,
string remote_path, string remote_path,
string filename); string filename);
int copyFtpDataFile (string host, int copyFtpDataFile (string host,
string remote_path, string remote_path,
string filename, string filename,
string password); string password,
int timeout);
int copyLocalDataFile (string remote_path, int copyLocalDataFile (string remote_path,
string filename); string filename);
void recvDataFile (string filename); void recvDataFile (string filename);
void recvTentacleDataFile (string host, void recvTentacleDataFile (string host,
string filename); string filename,
int timeout);
int unzipCollection(string zip_path, string dest_dir); int unzipCollection(string zip_path, string dest_dir);
void checkCollections (); void checkCollections ();

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(6.0dev(Build 150602))" VALUE "ProductVersion", "(6.0dev(Build 150618))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -116,11 +116,8 @@ Pandora_Wmi::isServiceRunning (string service_name) {
if (str_state == "Running") { if (str_state == "Running") {
retval = 1; retval = 1;
} }
else if (str_state == "Stopped") {
retval = 0;
}
else { else {
retval = -1; retval = 0;
} }
dhFreeString (state); dhFreeString (state);

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 6.0dev-150602 Version: 6.0dev-150618
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="6.0dev-150602" pandora_version="6.0dev-150618"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -140,15 +140,17 @@ function mainAgentsModules() {
$filter_module_group['id_module_group'] = $modulegroup; $filter_module_group['id_module_group'] = $modulegroup;
} }
$count = 0; $count = 0;
foreach ($agents as $agent){ foreach ($agents as $agent) {
$module = agents_get_modules($agent, false, $filter_module_group, true, false); $module = agents_get_modules($agent, false,
if ($module == false){ $filter_module_group, true, false);
if ($module == false) {
unset($agents[$count]); unset($agents[$count]);
} }
$count++; $count++;
} }
$total_pagination = count($agents); $total_pagination = count($agents);
$all_modules = agents_get_modules($agents, false, $filter_module_group, true, false); $all_modules = agents_get_modules($agents, false,
$filter_module_group, true, false);
$modules_by_name = array(); $modules_by_name = array();
$name = ''; $name = '';

View File

@ -86,7 +86,7 @@ function main_net_tools () {
$principal_ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente"); $principal_ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente");
$list_address = db_get_all_rows_sql ("select id_a from taddress_agent where id_agent = " . $id_agente); $list_address = db_get_all_rows_sql ("select id_a from taddress_agent where id_agent = " . $id_agente);
foreach ($list_address as $address){ foreach ($list_address as $address) {
$ids []= join(",",$address); $ids []= join(",",$address);
} }
$ids_address = implode(",",$ids); $ids_address = implode(",",$ids);
@ -98,13 +98,13 @@ function main_net_tools () {
} }
echo " echo "
<script type='text/javascript'> <script type='text/javascript'>
function mostrarColumns(ValueSelect){ function mostrarColumns(ValueSelect) {
value = ValueSelect.value; value = ValueSelect.value;
if ( value==3 ) { if (value == 3) {
$('netToolTable').css('width','100%'); $('netToolTable').css('width','100%');
$('#snmpcolumn').show(); $('#snmpcolumn').show();
} }
else{ else {
$('netToolTable').css('width','100%'); $('netToolTable').css('width','100%');
$('#snmpcolumn').hide(); $('#snmpcolumn').hide();
} }
@ -116,7 +116,8 @@ function main_net_tools () {
echo "<table class='databox filters' width=100% id=netToolTable>"; echo "<table class='databox filters' width=100% id=netToolTable>";
echo "<tr><td>"; echo "<tr><td>";
echo __("Operation"); echo __("Operation");
ui_print_help_tip(__('You can set the command path in the menu Administration -&gt; Extensions -&gt; Config Network Tools')); ui_print_help_tip(
__('You can set the command path in the menu Administration -&gt; Extensions -&gt; Config Network Tools'));
echo "</td><td>"; echo "</td><td>";
echo "<select name='operation' onChange='mostrarColumns(this);'>"; echo "<select name='operation' onChange='mostrarColumns(this);'>";
echo "<option value='1'>" . __("Traceroute"); echo "<option value='1'>" . __("Traceroute");
@ -130,10 +131,11 @@ function main_net_tools () {
echo __("IP address"); echo __("IP address");
echo "</td><td>"; echo "</td><td>";
echo "<select name='select_ips'>"; echo "<select name='select_ips'>";
foreach($ips as $ip){ foreach ($ips as $ip) {
if ($ip['ip'] == $principal_ip){ if ($ip['ip'] == $principal_ip) {
echo "<option value='". $ip['ip'] ."' selected = 'selected'>" . $ip['ip']; echo "<option value='". $ip['ip'] ."' selected = 'selected'>" . $ip['ip'];
}else{ }
else {
echo "<option value='". $ip['ip'] ."'>" . $ip['ip']; echo "<option value='". $ip['ip'] ."'>" . $ip['ip'];
} }
} }
@ -172,7 +174,7 @@ function main_net_tools () {
ui_print_error_message(__('Ping executable does not exist.')); ui_print_error_message(__('Ping executable does not exist.'));
} }
else { else {
echo "<h3>".__("Ping to "). $ip. "</h3>"; echo "<h3>" . __("Ping to %s", $ip) . "</h3>";
echo "<pre>"; echo "<pre>";
echo system ("$ping -c 5 $ip"); echo system ("$ping -c 5 $ip");
echo "</pre>"; echo "</pre>";

View File

@ -76,11 +76,15 @@ function pluginreg_extension_main () {
$file_exec_path = $exec_path; $file_exec_path = $exec_path;
if (isset($ini_array["plugin_definition"]["execution_command"]) && ($ini_array["plugin_definition"]["execution_command"] != "")){ if (isset($ini_array["plugin_definition"]["execution_command"])
&& ($ini_array["plugin_definition"]["execution_command"] != "")) {
$exec_path = $ini_array["plugin_definition"]["execution_command"] . " " . $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"]; $exec_path = $ini_array["plugin_definition"]["execution_command"] . " " . $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"];
} }
if (isset($ini_array["plugin_definition"]["execution_postcommand"]) && ($ini_array["plugin_definition"]["execution_postcommand"] != "")){ if (isset($ini_array["plugin_definition"]["execution_postcommand"])
&& ($ini_array["plugin_definition"]["execution_postcommand"] != "")) {
$exec_path = $exec_path . " " .$ini_array["plugin_definition"]["execution_postcommand"]; $exec_path = $exec_path . " " .$ini_array["plugin_definition"]["execution_postcommand"];
} }

View File

@ -88,7 +88,7 @@ if (empty($data)) {
} }
echo '{ echo '{
"label": "' . $graph_title . '", "label": "' . $graph_title . '",
"data": [["' . time() . '", ' . $data . ']] "data": [["' . time() . '", ' . $data . ']]
}'; }';
?> ?>

View File

@ -27,10 +27,10 @@ function render_info_data ($query, $label) {
render_row ($info, $label); render_row ($info, $label);
} }
function render_row ($data, $label){ function render_row ($data, $label) {
global $console_mode; global $console_mode;
if ($console_mode == 1){ if ($console_mode == 1) {
echo $label; echo $label;
echo "|"; echo "|";
echo $data; echo $data;

View File

@ -136,6 +136,13 @@ UPDATE `trecon_script` SET
`macros` = '{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}' `macros` = '{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}'
WHERE `id_recon_script` = 2 AND `name` = 'IPMI&#x20;Recon'; WHERE `id_recon_script` = 2 AND `name` = 'IPMI&#x20;Recon';
-- ---------------------------------------------------------------------
-- Table `tnetwork_component`
-- ---------------------------------------------------------------------
UPDATE tnetwork_component SET snmp_oid ='SELECT&#x20;DNSHostName&#x20;FROM&#x20;Win32_ComputerSystem' WHERE id_nc = 204 AND name = 'Hostname';
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=207;
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=219;
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `tgis_map_has_tgis_map_con` (tgis_map_has_tgis_map_connection) -- Table `tgis_map_has_tgis_map_con` (tgis_map_has_tgis_map_connection)

View File

@ -109,3 +109,11 @@ UPDATE trecon_script SET
description = 'Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0', description = 'Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0',
macros = '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.:&#x20;192.168.100.0/24","value":"","hide":""},"2":{"macro":"_field2_","desc":"Username","help":"","value":"","hide":""},"3":{"macro":"_field3_","desc":"Password","help":"","value":"","hide":"1"},"4":{"macro":"_field4_","desc":"Additional&#x20;parameters","help":"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.","value":"","hide":""}}' macros = '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.:&#x20;192.168.100.0/24","value":"","hide":""},"2":{"macro":"_field2_","desc":"Username","help":"","value":"","hide":""},"3":{"macro":"_field3_","desc":"Password","help":"","value":"","hide":"1"},"4":{"macro":"_field4_","desc":"Additional&#x20;parameters","help":"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.","value":"","hide":""}}'
WHERE id_recon_script = 2 AND name = 'IPMI&#x20;Recon'; WHERE id_recon_script = 2 AND name = 'IPMI&#x20;Recon';
-- ---------------------------------------------------------------------
-- Table `tnetwork_component`
-- ---------------------------------------------------------------------
UPDATE tnetwork_component SET snmp_oid ='SELECT&#x20;DNSHostName&#x20;FROM&#x20;Win32_ComputerSystem' WHERE id_nc = 204 AND name = 'Hostname';
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=207;
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=219;

View File

@ -107,3 +107,11 @@ UPDATE "trecon_script"SET
"description" = 'Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0', "description" = 'Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0',
"macros" = '{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}' "macros" = '{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}'
WHERE "id_recon_script" = 2 AND "name" = 'IPMI&#x20;Recon'; WHERE "id_recon_script" = 2 AND "name" = 'IPMI&#x20;Recon';
-- ---------------------------------------------------------------------
-- Table `tnetwork_component`
-- ---------------------------------------------------------------------
UPDATE tnetwork_component SET snmp_oid ='SELECT&#x20;DNSHostName&#x20;FROM&#x20;Win32_ComputerSystem' WHERE id_nc = 204 AND name = 'Hostname';
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=207;
UPDATE `tnetwork_component` set `tcp_port`=0 WHERE id_nc=219;

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="index.php?sec=gagente&sec2=enterprise/godmode/agentes/collections&action=new">Crear una nueva colección</a> <a href="index.php?sec=gagente&sec2=enterprise/godmode/agentes/collections&action=new">Crear una nueva colección</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field">Crear un nuevo campo</a> <a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field">Crear un nuevo campo</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="?sec=gservers&sec2=godmode/reporting/visual_console_builder">Crear un mapa de consola</a> <a href="?sec=gservers&sec2=godmode/reporting/visual_console_builder">Crear un mapa de consola</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="index.php?sec=network&amp;sec2=operation/agentes/networkmap&add_networkmap=1&tab=groups">Crear un mapa de red de grupo</a> <a href="index.php?sec=network&amp;sec2=operation/agentes/networkmap&add_networkmap=1&tab=groups">Crear un mapa de red de grupo</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,23 +5,23 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="new_task"> <div class="new_task">
<div> <div>
<div class="title_task"> <?php echo __('There are no recon task defined yet'); ?> </div> <div class="title_task"> <?php echo __('There are no recon task defined yet'); ?> </div>
</div> </div>
<div> <div>
<div class="image_task"> <div class="image_task">
<?php echo html_print_image('images/icono_grande_reconserver.png', true, array("alt" => __('Recon server')));?> <?php echo html_print_image('images/icono_grande_reconserver.png', true, array("alt" => __('Recon server')));?>
</div> </div>
<div class="text_task"> <div class="text_task">
<h3> <?php echo __('Create Recon Task'); ?></h3> <h3> <?php echo __('Create Recon Task'); ?></h3>
<p id="description_task"> <?php echo __('The Recon Task definition of Pandora FMS is used to find new elements in the network. <p id="description_task"> <?php echo __('The Recon Task definition of Pandora FMS is used to find new elements in the network.
If it detects any item, it will add that item to the monitoring, and if that item it is already being monitored, then it will If it detects any item, it will add that item to the monitoring, and if that item it is already being monitored, then it will
ignore it or will update its information.There are three types of detection: Based on <strong id="fuerte"> ICMP </strong>(pings), ignore it or will update its information.There are three types of detection: Based on <strong id="fuerte"> ICMP </strong>(pings),
<strong id="fuerte">SNMP</strong> (detecting the topology of networks and their interfaces), and other <strong id="fuerte"> customized </strong> <strong id="fuerte">SNMP</strong> (detecting the topology of networks and their interfaces), and other <strong id="fuerte"> customized </strong>
type. You can define your own customized recon script.'); ?></p> type. You can define your own customized recon script.'); ?></p>
<form action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create" method="post"> <form action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask_form&create" method="post">
<button class="button_task" > <?php echo __('Create Recon Task'); ?></button> <button class="button_task" > <?php echo __('Create Recon Task'); ?></button>
</form> </form>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service">Crear un nuevo servicio</a> <a href="?sec=estado&sec2=enterprise/godmode/services/services.service&action=new_service">Crear un nuevo servicio</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1">Crear un nuevo filtro snmp</a> <a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter=-1">Crear un nuevo filtro snmp</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,40 +5,40 @@ ui_require_css_file ('firts_task');
?> ?>
<div class="Table"> <div class="Table">
<div class="Title"> <div class="Title">
<p>This is a Table</p> <p>This is a Table</p>
</div> </div>
<div class="Heading"> <div class="Heading">
<div class="Cell"> <div class="Cell">
<p>Heading 1</p> <p>Heading 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 2</p> <p>Heading 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Heading 3</p> <p>Heading 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<a href="index.php?sec=$sec&sec2=godmode/tag/edit_tag&action=new">Crear un nuevo tag</a> <a href="index.php?sec=$sec&sec2=godmode/tag/edit_tag&action=new">Crear un nuevo tag</a>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 2</p> <p>Row 1 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 1 Column 3</p> <p>Row 1 Column 3</p>
</div> </div>
</div> </div>
<div class="Row"> <div class="Row">
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 1</p> <p>Row 2 Column 1</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 2</p> <p>Row 2 Column 2</p>
</div> </div>
<div class="Cell"> <div class="Cell">
<p>Row 2 Column 3</p> <p>Row 2 Column 3</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -213,10 +213,12 @@ config_check();
$autorefresh_additional .= '</span>'; $autorefresh_additional .= '</span>';
unset ($values); unset ($values);
$autorefresh_link_open_img = '<a class="white autorefresh" href="' . ui_get_url_refresh ($ignored_params) . '">'; $autorefresh_link_open_img =
'<a class="white autorefresh" href="' . ui_get_url_refresh ($ignored_params) . '">';
if ($_GET['refr']) { if ($_GET['refr']) {
$autorefresh_link_open_txt = '<a class="white autorefresh autorefresh_txt" href="' . ui_get_url_refresh ($ignored_params) . '">'; $autorefresh_link_open_txt =
'<a class="white autorefresh autorefresh_txt" href="' . ui_get_url_refresh ($ignored_params) . '">';
} }
else { else {
$autorefresh_link_open_txt = '<a>'; $autorefresh_link_open_txt = '<a>';
@ -249,10 +251,18 @@ config_check();
$maintenance_title = __("System alerts detected - Please fix as soon as possible"); $maintenance_title = __("System alerts detected - Please fix as soon as possible");
$maintenance_class = $maintenance_id = 'show_systemalert_dialog white'; $maintenance_class = $maintenance_id = 'show_systemalert_dialog white';
$maintenance_link_open_txt = '<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '" id="show_systemalert_dialog">'; $maintenance_link_open_txt =
$maintenance_link_open_img = '<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '">'; '<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '" id="show_systemalert_dialog">';
$maintenance_link_close = '</a>'; $maintenance_link_open_img =
$maintenance_img = $maintenance_link_open_img . html_print_image ("images/header_yellow.png", true, array ("title" => __('You have %d warning(s)', $config["alert_cnt"]), "id" => "yougotalert", "class" => "bot")) . $maintenance_link_close; '<a href="' . $maintenance_link . '" title="' . $maintenance_title . '" class="' . $maintenance_class . '">';
$maintenance_link_close = '</a>';
$maintenance_img = $maintenance_link_open_img .
html_print_image("images/header_yellow.png",
true, array(
"title" => __('You have %d warning(s)',
$config["alert_cnt"]),
"id" => "yougotalert",
"class" => "bot")) . $maintenance_link_close;
} }
else { else {
$maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot")); $maintenance_img = html_print_image ("images/header_ready.png", true, array ("title" => __('There are not warnings'), "id" => "yougotalert", "class" => "bot"));

View File

@ -67,7 +67,8 @@ echo '<div class="databox_login" id="login">';
echo '<div id="login_inner">'; echo '<div id="login_inner">';
echo '<div id="login_in">'; echo '<div id="login_in">';
echo '<div class="version_login"><div style="padding-top: 2px; color: #FFF;">' . $pandora_version . '</div></div>'; echo '<div class="version_login">
<div style="padding-top: 2px; color: #FFF;">' . $pandora_version . '</div></div>';
echo '<form method="post" action="' . ui_get_full_url('index.php'.$url) . '" >'; echo '<form method="post" action="' . ui_get_full_url('index.php'.$url) . '" >';
//TODO: Put branding in variables (external file) or database //TODO: Put branding in variables (external file) or database

View File

@ -205,7 +205,7 @@ $(document).ready( function() {
show_menu(); show_menu();
openTime = new Date().getTime(); openTime = new Date().getTime();
} }
}).mouseleave(function(){ }).mouseleave(function() {
handsIn = 0; handsIn = 0;
setTimeout(function() { setTimeout(function() {
openedTime = new Date().getTime() - openTime; openedTime = new Date().getTime() - openTime;
@ -225,7 +225,7 @@ $(document).ready( function() {
$('#menu').css('width', '145px'); $('#menu').css('width', '145px');
$('li.menu_icon').addClass( " no_hidden_menu" ); $('li.menu_icon').addClass( " no_hidden_menu" );
$('ul.submenu').css('left', '144px'); $('ul.submenu').css('left', '144px');
}).mouseleave(function(){ }).mouseleave(function() {
handsInMenu = 0; handsInMenu = 0;
setTimeout(function() { setTimeout(function() {
openedMenu = new Date().getTime() - openTimeMenu; openedMenu = new Date().getTime() - openTimeMenu;
@ -238,7 +238,7 @@ $(document).ready( function() {
}, 1500); }, 1500);
}); });
} }
else{ else {
$('div#title_menu').hide(); $('div#title_menu').hide();
} }
}); });
@ -251,7 +251,7 @@ $(document).ready( function() {
handsIn = 0; handsIn = 0;
handsIn2 = 0; handsIn2 = 0;
$('.menu_icon').mouseenter(function(){ $('.menu_icon').mouseenter(function() {
table_hover = $(this); table_hover = $(this);
handsIn = 1; handsIn = 1;
openTime = new Date().getTime(); openTime = new Date().getTime();
@ -261,7 +261,7 @@ $(document).ready( function() {
if( typeof(table_noHover) != 'undefined') if( typeof(table_noHover) != 'undefined')
if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id ) if ( "ul#sub"+table_hover[0].id != "ul#sub"+table_noHover[0].id )
$("ul#sub"+table_noHover[0].id).hide(); $("ul#sub"+table_noHover[0].id).hide();
}).mouseleave(function(){ }).mouseleave(function() {
//$('div#menu').css('overflow', 'hidden'); //$('div#menu').css('overflow', 'hidden');
table_noHover = $(this); table_noHover = $(this);
handsIn = 0; handsIn = 0;
@ -275,7 +275,7 @@ $(document).ready( function() {
}); });
- $('.has_submenu').mouseenter(function(){ - $('.has_submenu').mouseenter(function() {
table_hover2 = $(this); table_hover2 = $(this);
handsIn2 = 1; handsIn2 = 1;
openTime2 = new Date().getTime(); openTime2 = new Date().getTime();
@ -283,7 +283,7 @@ $(document).ready( function() {
if( typeof(table_noHover2) != 'undefined') if( typeof(table_noHover2) != 'undefined')
if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id ) if ( "ul#sub"+table_hover2[0].id != "ul#sub"+table_noHover2[0].id )
$("ul#sub"+table_noHover2[0].id).hide(); $("ul#sub"+table_noHover2[0].id).hide();
}).mouseleave(function(){ }).mouseleave(function() {
table_noHover2 = table_hover2; table_noHover2 = table_hover2;
handsIn2 = 0; handsIn2 = 0;
setTimeout(function() { setTimeout(function() {
@ -295,8 +295,8 @@ $(document).ready( function() {
}, 3500); }, 3500);
}); });
$(document).ready(function(){ $(document).ready(function() {
$('#container').click(function(){ $('#container').click(function() {
openTime = 4000; openTime = 4000;
if( typeof(table_hover) != 'undefined') if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
@ -308,7 +308,7 @@ $(document).ready( function() {
$('div#title_menu').hide(); $('div#title_menu').hide();
}); });
$('div.menu>ul>li>ul>li>a').click(function(){ $('div.menu>ul>li>ul>li>a').click(function() {
openTime = 4000; openTime = 4000;
if( typeof(table_hover) != 'undefined') if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();
@ -319,7 +319,7 @@ $(document).ready( function() {
$('ul.submenu').css('left', '44px'); $('ul.submenu').css('left', '44px');
$('div#title_menu').hide(); $('div#title_menu').hide();
}); });
$('div.menu>ul>li>ul>li>ul>li>a').click(function(){ $('div.menu>ul>li>ul>li>ul>li>a').click(function() {
openTime = 4000; openTime = 4000;
if( typeof(table_hover) != 'undefined') if( typeof(table_hover) != 'undefined')
$("ul#sub"+table_hover[0].id).hide(); $("ul#sub"+table_hover[0].id).hide();

View File

@ -63,13 +63,13 @@ if (is_ajax()) {
} }
// Get critical events (realtime update) // Get critical events (realtime update)
if ($get_alerts_fired){ if ($get_alerts_fired) {
echo sc_get_alerts_fired(); echo sc_get_alerts_fired();
return; return;
} }
// Get critical events (realtime update) // Get critical events (realtime update)
if ($get_critical_events){ if ($get_critical_events) {
echo sc_get_critical_events(); echo sc_get_critical_events();
return; return;
} }
@ -107,7 +107,7 @@ function sc_get_critical_events () {
$shortcut_events_update = array(); $shortcut_events_update = array();
$critical_events_update = 0; $critical_events_update = 0;
foreach($shortcut_events_update as $event_update){ foreach ($shortcut_events_update as $event_update) {
if ($event_update['criticity'] == 4 and $event_update['estado'] == 0) { if ($event_update['criticity'] == 4 and $event_update['estado'] == 0) {
$critical_events_update++; $critical_events_update++;
} }

View File

@ -164,7 +164,7 @@ switch ($config["dbtype"]) {
$result = db_get_all_rows_sql ($sql); $result = db_get_all_rows_sql ($sql);
// Delete rnum row generated by oracle_recode_query() function // Delete rnum row generated by oracle_recode_query() function
if (($config["dbtype"] == 'oracle') && ($result !== false)){ if (($config["dbtype"] == 'oracle') && ($result !== false)) {
for ($i=0; $i < count($result); $i++) { for ($i=0; $i < count($result); $i++) {
unset($result[$i]['rnum']); unset($result[$i]['rnum']);
} }

View File

@ -66,7 +66,7 @@ if (is_ajax ()) {
$oid_snmp = array(); $oid_snmp = array();
$out = false; $out = false;
foreach ($idSNMP as $id) { foreach ($idSNMP as $id) {
foreach ($snmp[$id] as $key => $value){ foreach ($snmp[$id] as $key => $value) {
// Check if it has "ifXXXX" syntax and skip it // Check if it has "ifXXXX" syntax and skip it
if (! preg_match ( "/if/", $key)) { if (! preg_match ( "/if/", $key)) {
@ -246,7 +246,7 @@ $table->data[3][1] = html_print_select_groups(false, "AR", false, 'grupo', $grup
$table->data[4][0] = __('Interval'); $table->data[4][0] = __('Interval');
$table->data[4][1] = html_print_extended_select_for_time ('intervalo', $intervalo, '', '', '0', 10, true); $table->data[4][1] = html_print_extended_select_for_time ('intervalo', $intervalo, '', '', '0', 10, true);
if($intervalo<300){ if ($intervalo < SECONDS_5MINUTES) {
$table->data[4][1] .= clippy_context_help("interval_agent_min"); $table->data[4][1] .= clippy_context_help("interval_agent_min");
} }
$table->data[5][0] = __('OS'); $table->data[5][0] = __('OS');

View File

@ -1052,11 +1052,14 @@ $(document).ready (function () {
}); });
$("#submit-create_modules_btn").click(function () { $("#submit-create_modules_btn").click(function () {
if($("#module option").length == 0 || ($("#module option").length == 1 && $("#module option").eq(0).val() == 0)) { if ($("#module option").length == 0
|| ($("#module option").length == 1
&& $("#module option").eq(0).val() == 0)) {
alert('<?php echo __('Modules list is empty'); ?>'); alert('<?php echo __('Modules list is empty'); ?>');
return false; return false;
} }
$('#module option').map(function(){ $('#module option').map(function() {
$(this).attr('selected','selected'); $(this).attr('selected','selected');
}); });
}); });

View File

@ -355,7 +355,9 @@ if ($wmiexplore && !$fail) {
$table->data[2][1] .= '<div class="wizard_mode_form wizard_mode_disks wizard_mode_disks_arrow clickable">' . html_print_image('images/darrowright.png', true, array('title' => __('Add to modules list'))) . '</div>'; $table->data[2][1] .= '<div class="wizard_mode_form wizard_mode_disks wizard_mode_disks_arrow clickable">' . html_print_image('images/darrowright.png', true, array('title' => __('Add to modules list'))) . '</div>';
$table->data[2][1] .= '<br><br><div class="wizard_mode_delete_arrow clickable">' . html_print_image('images/cross.png', true, array('title' => __('Remove from modules list'))) . '</div>'; $table->data[2][1] .= '<br><br><div class="wizard_mode_delete_arrow clickable">' .
html_print_image('images/cross.png', true, array('title' => __('Remove from modules list'))) .
'</div>';
$table->cellstyle[2][1] = 'vertical-align: middle; text-align: center;'; $table->cellstyle[2][1] = 'vertical-align: middle; text-align: center;';
$table->data[2][2] = html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:300px; height: 100%;'); $table->data[2][2] = html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:300px; height: 100%;');
@ -490,7 +492,7 @@ $(document).ready (function () {
alert('<?php echo __('Modules list is empty'); ?>'); alert('<?php echo __('Modules list is empty'); ?>');
return false; return false;
} }
$('#module option').map(function(){ $('#module option').map(function() {
$(this).attr('selected','selected'); $(this).attr('selected','selected');
}); });
}); });

View File

@ -205,10 +205,11 @@ if ($create_agent) {
// Create custom fields for this agent // Create custom fields for this agent
foreach ($field_values as $key => $value) { foreach ($field_values as $key => $value) {
db_process_sql_insert ('tagent_custom_data', db_process_sql_insert ('tagent_custom_data',
array('id_field' => $key,'id_agent' => $id_agente, 'description' => $value)); array('id_field' => $key, 'id_agent' => $id_agente,
'description' => $value));
} }
// Create address for this agent in taddress // Create address for this agent in taddress
if ( $direccion_agente != ''){ if ( $direccion_agente != '') {
agents_add_address ($id_agente, $direccion_agente); agents_add_address ($id_agente, $direccion_agente);
} }

View File

@ -40,14 +40,15 @@ $display_on_front = (int) get_parameter ('display_on_front', 0);
/* Create field */ /* Create field */
if ($create_field) { if ($create_field) {
/*Check if name field is empty*/ /*Check if name field is empty*/
if ($name == ""){ if ($name == "") {
ui_print_error_message(__('The name must not be empty')); ui_print_error_message(__('The name must not be empty'));
} }
else if ($name == db_get_value ('name', 'tagent_custom_fields', 'name', $name)) { else if ($name == db_get_value ('name', 'tagent_custom_fields', 'name', $name)) {
ui_print_error_message(__('The name must be unique')); ui_print_error_message(__('The name must be unique'));
} }
else { else {
$result = db_process_sql_insert('tagent_custom_fields', array('name' => $name, 'display_on_front' => $display_on_front)); $result = db_process_sql_insert('tagent_custom_fields',
array('name' => $name, 'display_on_front' => $display_on_front));
ui_print_success_message(__('Field successfully created')); ui_print_success_message(__('Field successfully created'));
} }
} }
@ -74,7 +75,8 @@ if ($update_field) {
/* Delete field */ /* Delete field */
if ($delete_field) { if ($delete_field) {
$result = db_process_sql_delete('tagent_custom_fields', array('id_field' => $id_field)); $result = db_process_sql_delete('tagent_custom_fields',
array('id_field' => $id_field));
if (!$result) if (!$result)
ui_print_error_message(__('There was a problem deleting field')); ui_print_error_message(__('There was a problem deleting field'));

View File

@ -143,10 +143,10 @@ html_print_select_groups(false, "AR", $return_all_group, "ag_group", $ag_group,
echo "<td>"; echo "<td>";
echo __('Show Agents') . '&nbsp;'; echo __('Show Agents') . '&nbsp;';
$fields = array( $fields = array(
2 => __('Everyone'), 2 => __('Everyone'),
1 => __('Only disabled'), 1 => __('Only disabled'),
0 => __('Only enabled'), 0 => __('Only enabled'),
); );
html_print_select($fields,"disabled",$disabled,'this.form.submit()'); html_print_select($fields,"disabled",$disabled,'this.form.submit()');
echo "</td>"; echo "</td>";
@ -251,12 +251,12 @@ if ($search != "") {
LIKE '%$search%' OR direccion LIKE '%$search%') "; LIKE '%$search%' OR direccion LIKE '%$search%') ";
} }
if ($disabled==1) if ($disabled == 1)
{ {
$search_sql = " AND disabled = ". $disabled . $search_sql; $search_sql = " AND disabled = ". $disabled . $search_sql;
} }
else{ else {
if ($disabled==0){ if ($disabled == 0) {
$search_sql = " AND disabled = 0" . $search_sql; $search_sql = " AND disabled = 0" . $search_sql;
} }
} }

View File

@ -403,7 +403,8 @@ $table_advanced->colspan[4][4] = 3;
$table_advanced->data[5][0] = __('FF interval') . ' ' . ui_print_help_icon ('ff_interval', true); $table_advanced->data[5][0] = __('FF interval') . ' ' . ui_print_help_icon ('ff_interval', true);
$table_advanced->data[5][1] = html_print_input_text ('module_ff_interval', $ff_interval, $table_advanced->data[5][1] = html_print_input_text ('module_ff_interval', $ff_interval,
'', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution flip flop time interval (in secs).'), true); '', 5, 10, true, $disabledBecauseInPolicy) .
ui_print_help_tip (__('Module execution flip flop time interval (in secs).'), true);
$table_advanced->colspan[5][1] = 2; $table_advanced->colspan[5][1] = 2;
$table_advanced->data[5][3] = __('FF timeout') . ' ' . ui_print_help_icon ('ff_timeout', true); $table_advanced->data[5][3] = __('FF timeout') . ' ' . ui_print_help_icon ('ff_timeout', true);
@ -544,7 +545,8 @@ $table_advanced->colspan[12][4] = 3;
if (check_acl ($config['id_user'], 0, "PM")) { if (check_acl ($config['id_user'], 0, "PM")) {
$table_advanced->data[13][0] = __('Category'); $table_advanced->data[13][0] = __('Category');
$table_advanced->data[13][1] = html_print_select(categories_get_all_categories('forselect'), 'id_category', $id_category, '', __('None'), 0, true); $table_advanced->data[13][1] = html_print_select(
categories_get_all_categories('forselect'), 'id_category', $id_category, '', __('None'), 0, true);
$table_advanced->colspan[13][1] = 6; $table_advanced->colspan[13][1] = 6;
} }
else { else {
@ -725,13 +727,13 @@ $(document).ready (function () {
}); });
$("#submit-updbutton").click(function () { $("#submit-updbutton").click(function () {
$('#id_tag_selected option').map(function(){ $('#id_tag_selected option').map(function() {
$(this).attr('selected','selected'); $(this).attr('selected','selected');
}); });
}); });
$("#submit-crtbutton").click(function () { $("#submit-crtbutton").click(function () {
$('#id_tag_selected option').map(function(){ $('#id_tag_selected option').map(function() {
$(this).attr('selected','selected'); $(this).attr('selected','selected');
}); });
}); });
@ -770,7 +772,7 @@ $(document).ready (function () {
$("#id_module_type").trigger('change'); $("#id_module_type").trigger('change');
// Prevent the form submission when the user hits the enter button from the relationship autocomplete inputs // Prevent the form submission when the user hits the enter button from the relationship autocomplete inputs
$("#text-autocomplete_agent_name").keydown(function(event){ $("#text-autocomplete_agent_name").keydown(function(event) {
if(event.keyCode == 13) { // key code 13 is the enter button if(event.keyCode == 13) { // key code 13 is the enter button
event.preventDefault(); event.preventDefault();
} }
@ -839,7 +841,7 @@ function change_modules_autocomplete_input () {
if (data) { if (data) {
module_autocomplete.html(data); module_autocomplete.html(data);
// Prevent the form submission when the user hits the enter button from the relationship autocomplete inputs // Prevent the form submission when the user hits the enter button from the relationship autocomplete inputs
$("#text-autocomplete_module_name").keydown(function(event){ $("#text-autocomplete_module_name").keydown(function(event) {
if(event.keyCode == 13) { // key code 13 is the enter button if(event.keyCode == 13) { // key code 13 is the enter button
event.preventDefault(); event.preventDefault();
} }

View File

@ -544,10 +544,13 @@ else {
'&delete_downtime=1&id_downtime=' . $downtime['id'] . '&' . $filter_params_str . '">' . '&delete_downtime=1&id_downtime=' . $downtime['id'] . '&' . $filter_params_str . '">' .
html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))); html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
} }
elseif ($downtime["executed"] == 1 && $downtime['type_execution'] == 'once'){ elseif ($downtime["executed"] == 1
&& $downtime['type_execution'] == 'once') {
$data[8] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime.editor&amp;' . $data[8] = '<a href="index.php?sec=estado&amp;sec2=godmode/agentes/planned_downtime.editor&amp;' .
'edit_downtime=1&amp;id_downtime='.$downtime['id'].'">' . 'edit_downtime=1&amp;id_downtime=' . $downtime['id'] . '">' .
html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>'; html_print_image("images/config.png", true,
array("border" => '0', "alt" => __('Update'))) . '</a>';
$data[9]= "N/A"; $data[9]= "N/A";
} }
else { else {

View File

@ -73,9 +73,9 @@ if ($copy_action) {
$al_action = alerts_get_alert_action ($id); $al_action = alerts_get_alert_action ($id);
if ($al_action !== false){ if ($al_action !== false) {
// If user tries to copy an action with group=ALL // If user tries to copy an action with group=ALL
if ($al_action['id_group'] == 0){ if ($al_action['id_group'] == 0) {
// then must have "PM" access privileges // then must have "PM" access privileges
if (! check_acl ($config['id_user'], 0, "PM")) { if (! check_acl ($config['id_user'], 0, "PM")) {
db_pandora_audit("ACL Violation", db_pandora_audit("ACL Violation",

View File

@ -142,7 +142,8 @@ if ( defined("METACONSOLE") ) {
$form_filter .= "</td>"; $form_filter .= "</td>";
$form_filter .= "</tr>"; $form_filter .= "</tr>";
$form_filter .= "</table>"; $form_filter .= "</table>";
}else{ }
else {
$form_filter .= "</table>"; $form_filter .= "</table>";
$form_filter .= "<div style='text-align:right; height:100%;'>"; $form_filter .= "<div style='text-align:right; height:100%;'>";
$form_filter .= html_print_submit_button (__('Update'), '', false, 'class="sub upd"', true); $form_filter .= html_print_submit_button (__('Update'), '', false, 'class="sub upd"', true);
@ -497,7 +498,7 @@ foreach ($simple_alerts as $alert) {
else else
$data[2] .= __('On').' '.$action['fires_min']; $data[2] .= __('On').' '.$action['fires_min'];
} }
else if ($action['fires_min'] < $action['fires_max']){ else if ($action['fires_min'] < $action['fires_max']) {
if ($action['fires_min'] == 0) if ($action['fires_min'] == 0)
$data[2] .= __('Until').' '.$action['fires_max']; $data[2] .= __('Until').' '.$action['fires_max'];
else else
@ -698,7 +699,7 @@ if (isset($dont_display_alert_create_bttn))
if ($dont_display_alert_create_bttn) if ($dont_display_alert_create_bttn)
$display_create = false; $display_create = false;
if ($display_create && check_acl ($config['id_user'], 0, "LW")){ if ($display_create && check_acl ($config['id_user'], 0, "LW")) {
echo '<div class="action-buttons" style="width: ' . $table->width . '">'; echo '<div class="action-buttons" style="width: ' . $table->width . '">';
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'; echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');

View File

@ -124,7 +124,8 @@ if ($delete_alert) {
$id_agent_module = $temp["id_agent_module"]; $id_agent_module = $temp["id_agent_module"];
$alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template); $alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template);
$module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module);
$agent_name = agents_get_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); $agent_name = agents_get_name(
db_get_value("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
$result = alerts_delete_alert_agent_module ($id_alert_agent_module); $result = alerts_delete_alert_agent_module ($id_alert_agent_module);

View File

@ -231,7 +231,7 @@ $search_string = (string) get_parameter ('search_string');
$search_type = (string) get_parameter ('search_type'); $search_type = (string) get_parameter ('search_type');
$table->width = '98%'; $table->width = '98%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '96%'; $table->width = '96%';
$table->class = 'databox_filters'; $table->class = 'databox_filters';
$table->cellspacing = 0; $table->cellspacing = 0;
@ -242,7 +242,7 @@ $table->data = array ();
$table->head = array (); $table->head = array ();
$table->style = array (); $table->style = array ();
if (!defined("METACONSOLE")){ if (!defined("METACONSOLE")) {
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold';
} }
@ -258,13 +258,13 @@ $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false,
'class="sub search"', true); 'class="sub search"', true);
$table->data[0][4] .= '</div>'; $table->data[0][4] .= '</div>';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$filter = '<form class="filters_form" method="post" action="' . $url . '">'; $filter = '<form class="filters_form" method="post" action="' . $url . '">';
$filter .= html_print_table ($table,true); $filter .= html_print_table ($table,true);
$filter .= '</form>'; $filter .= '</form>';
ui_toggle($filter, __("Show Options")); ui_toggle($filter, __("Show Options"));
} }
else{ else {
echo '<form method="post" action="' . $url . '">'; echo '<form method="post" action="' . $url . '">';
html_print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';

View File

@ -431,13 +431,18 @@ $table->style[1] = 'width: 30%;';
$table->style[2] = 'width: 30%;'; $table->style[2] = 'width: 30%;';
$table->style[3] = 'font-weight: bold; width: 30%;'; $table->style[3] = 'font-weight: bold; width: 30%;';
$table->title = __('Firing fields') . ui_print_help_tip(__('Fields passed to the command executed by this action when the alert is fired'), true); $table->title = __('Firing fields') .
ui_print_help_tip(__('Fields passed to the command executed by this action when the alert is fired'), true);
$table->head[0] = __('Field') . ui_print_help_tip(__('Fields configured on the command associated to the action'), true); $table->head[0] = __('Field') .
$table->head[1] = __('Template fields') . ui_print_help_tip(__('Triggering fields configured in template'), true); ui_print_help_tip(__('Fields configured on the command associated to the action'), true);
$table->head[2] = __('Action fields') . ui_print_help_tip(__('Triggering fields configured in action'), true); $table->head[1] = __('Template fields') .
ui_print_help_tip(__('Triggering fields configured in template'), true);
$table->head[2] = __('Action fields') .
ui_print_help_tip(__('Triggering fields configured in action'), true);
$table->head[3] = __('Executed on firing') . ui_print_help_tip(__('Fields used on execution when the alert is fired'), true); $table->head[3] = __('Executed on firing') .
ui_print_help_tip(__('Fields used on execution when the alert is fired'), true);
$firing_fields = array(); $firing_fields = array();

View File

@ -302,13 +302,17 @@ $(document).ready (function () {
// Replace the old column with the new // Replace the old column with the new
$table_macros_field.replaceWith(field_row); $table_macros_field.replaceWith(field_row);
if (old_value != '' || old_recovery_value != ''){ if (old_value != '' || old_recovery_value != '') {
$("[name=field" + i + "_value]").val(old_value); $("[name=field" + i + "_value]").val(old_value);
$("[name=field" + i + "_recovery_value]").val(old_recovery_value); $("[name=field" + i + "_recovery_value]").val(old_recovery_value);
} }
else { else {
$("[name=field" + i + "_value]").val($("[name=field" + i + "_value]").val()); $("[name=field" + i + "_value]")
$("[name=field" + i + "_recovery_value]").val($("[name=field" + i + "_recovery_value]").val()); .val($("[name=field" + i + "_value]")
.val());
$("[name=field" + i + "_recovery_value]")
.val($("[name=field" + i + "_recovery_value]")
.val());
} }
// Add help hint only in first field // Add help hint only in first field
if (i == 1) { if (i == 1) {

View File

@ -119,7 +119,7 @@ if (!empty($fields_values)) {
} }
$table->width = '98%'; $table->width = '98%';
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if ($id) { if ($id) {
@ -133,7 +133,7 @@ if (defined('METACONSOLE')){
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
} }
$table->style = array (); $table->style = array ();
if (!defined('METACONSOLE')){ if (!defined('METACONSOLE')) {
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold';
} }

View File

@ -538,16 +538,18 @@ if ($step == 2) {
$table->data[4][0] = __('Default action'); $table->data[4][0] = __('Default action');
$usr_groups = implode(',', array_keys(users_get_groups($config['id_user'], 'LM', true))); $usr_groups = implode(',', array_keys(users_get_groups($config['id_user'], 'LM', true)));
switch ($config['dbtype']){ switch ($config['dbtype']) {
case "mysql": case "mysql":
case "postgresql": case "postgresql":
$sql_query = sprintf('SELECT id, name $sql_query = sprintf('
SELECT id, name
FROM talert_actions FROM talert_actions
WHERE id_group IN (%s) WHERE id_group IN (%s)
ORDER BY name', $usr_groups); ORDER BY name', $usr_groups);
break; break;
case "oracle": case "oracle":
$sql_query = sprintf('SELECT id, $sql_query = sprintf('
SELECT id,
dbms_lob.substr(name,4000,1) AS nombre dbms_lob.substr(name,4000,1) AS nombre
FROM talert_actions FROM talert_actions
WHERE id_group IN (%s) WHERE id_group IN (%s)
@ -557,7 +559,8 @@ if ($step == 2) {
$table->data[4][1] = html_print_select_from_sql ($sql_query, $table->data[4][1] = html_print_select_from_sql ($sql_query,
'default_action', $default_action, '', __('None'), 0, 'default_action', $default_action, '', __('None'), 0,
true, false, false) . true, false, false) .
ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true); ui_print_help_tip (
__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
$table->data[5][0] = __('Condition type'); $table->data[5][0] = __('Condition type');
$table->data[5][1] = html_print_select (alerts_get_alert_templates_types (), 'type', $table->data[5][1] = html_print_select (alerts_get_alert_templates_types (), 'type',

View File

@ -89,13 +89,14 @@ $result = false;
$result = categories_get_all_categories (); $result = categories_get_all_categories ();
// Form to add new categories or search categories // Form to add new categories or search categories
if(!defined('METACONSOLE')){ if (!defined('METACONSOLE')) {
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox' width=98%>"; echo "<table border=0 cellpadding=4 cellspacing=4 class='databox' width=98%>";
echo "<tr>"; echo "<tr>";
echo "<td align=right>"; echo "<td align=right>";
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">'; echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/category/edit_category&action=new&pure='.(int)$config['pure'].'">';
html_print_input_hidden ("create_category", "1", true); html_print_input_hidden ("create_category", "1", true);
html_print_submit_button (__('Create category'), 'create_button', false, 'class="sub next"'); html_print_submit_button (__('Create category'),
'create_button', false, 'class="sub next"');
echo "</form>"; echo "</form>";
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";
@ -133,12 +134,12 @@ if (!empty($result)) {
$data = array (); $data = array ();
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$data[0] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=" . $category["id"] . "&pure=" . (int)$config['pure'] . "'>" . $category["name"] . "</a>"; $data[0] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=" . $category["id"] . "&pure=" . (int)$config['pure'] . "'>" . $category["name"] . "</a>";
$data[1] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=".$category["id"] . "&pure=" . (int)$config['pure'] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a>&nbsp;&nbsp;"; $data[1] = "<a href='index.php?sec=advanced&sec2=godmode/category/edit_category&action=update&id_category=".$category["id"] . "&pure=" . (int)$config['pure'] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</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/cross.png", true, array("title" => "Delete")) . '</a>'; $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/cross.png", true, array("title" => "Delete")) . '</a>';
} }
else{ else {
$data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=" . $category["id"] . "&pure=" . (int)$config['pure'] . "'>" . $category["name"] . "</a>"; $data[0] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=" . $category["id"] . "&pure=" . (int)$config['pure'] . "'>" . $category["name"] . "</a>";
$data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category["id"] . "&pure=" . (int)$config['pure'] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a>&nbsp;&nbsp;"; $data[1] = "<a href='index.php?sec=gmodules&sec2=godmode/category/edit_category&action=update&id_category=".$category["id"] . "&pure=" . (int)$config['pure'] . "'>" . html_print_image("images/config.png", true, array("title" => "Edit")) . "</a>&nbsp;&nbsp;";
$data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category["id"] . '&pure='.(int)$config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">' . html_print_image("images/cross.png", true, array("title" => "Delete")) . '</a>'; $data[1] .= '<a href="index.php?sec=gmodules&sec2=godmode/category/category&delete_category='.$category["id"] . '&pure='.(int)$config['pure'].'"onclick="if (! confirm (\''.__('Are you sure?').'\')) return false">' . html_print_image("images/cross.png", true, array("title" => "Delete")) . '</a>';
@ -148,7 +149,7 @@ if (!empty($result)) {
html_print_table ($table); html_print_table ($table);
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>"; echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>";
echo "<tr>"; echo "<tr>";
echo "<td align=right>"; echo "<td align=right>";

View File

@ -42,7 +42,7 @@ if(defined('METACONSOLE')) {
'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int)$config['pure'].'">' . 'text' => '<a href="index.php?sec=advanced&sec2=godmode/category/category&tab=list&pure='.(int)$config['pure'].'">' .
html_print_image ("images/list.png", true, array ("title" => __('List categories'))) .'</a>')); html_print_image ("images/list.png", true, array ("title" => __('List categories'))) .'</a>'));
} }
else{ else {
$buttons = array( $buttons = array(
'list' => array( 'list' => array(
'active' => false, 'active' => false,
@ -131,7 +131,7 @@ if(!defined('METACONSOLE'))
echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=100%>"; echo "<table border=0 cellpadding=4 cellspacing=4 class=databox width=100%>";
else else
echo "<table border=0 cellpadding=4 cellspacing=4 class='databox data' width=100%>"; echo "<table border=0 cellpadding=4 cellspacing=4 class='databox data' width=100%>";
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
if ($action == "update") { if ($action == "update") {
echo "<thead> echo "<thead>
<tr> <tr>
@ -165,14 +165,15 @@ else
html_print_input_text ('name_category', $name_category); html_print_input_text ('name_category', $name_category);
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";
if(!defined('METACONSOLE')){ if (!defined('METACONSOLE')) {
echo "<tr>"; echo "<tr>";
if ($action == "update") { if ($action == "update") {
echo "<td align=center>"; echo "<td align=center>";
html_print_input_hidden ('update_category', 1); html_print_input_hidden ('update_category', 1);
echo "</td>"; echo "</td>";
echo "<td align=right>"; echo "<td align=right>";
html_print_submit_button (__('Update'), 'update_button', false, 'class="sub next"'); html_print_submit_button (__('Update'), 'update_button',
false, 'class="sub next"');
echo "</td>"; echo "</td>";
} }
if ($action == "new") { if ($action == "new") {
@ -186,17 +187,19 @@ else
echo "</tr>"; echo "</tr>";
} }
echo "</table>"; echo "</table>";
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>"; echo "<table border=0 cellpadding=0 cellspacing=0 class='' width=100%>";
echo "<tr>"; echo "<tr>";
echo "<td align=right>"; echo "<td align=right>";
if ($action == "update") { if ($action == "update") {
html_print_input_hidden ('update_category', 1); html_print_input_hidden ('update_category', 1);
html_print_submit_button (__('Update'), 'update_button', false, 'class="sub next"'); html_print_submit_button (__('Update'), 'update_button', false,
'class="sub next"');
} }
if ($action == "new") { if ($action == "new") {
html_print_input_hidden ('create_category', 1); html_print_input_hidden ('create_category', 1);
html_print_submit_button (__('Create'), 'create_button', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'create_button', false,
'class="sub next"');
} }
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";

View File

@ -61,7 +61,7 @@ $time["3month"] = $time["all"] - SECONDS_3MONTHS;
# ADQUIRE DATA PASSED AS FORM PARAMETERS # ADQUIRE DATA PASSED AS FORM PARAMETERS
# ====================================== # ======================================
# Purge data using dates # Purge data using dates
if (isset($_POST["purgedb"])){ # Fixed 2005-1-13, nil if (isset($_POST["purgedb"])) { # Fixed 2005-1-13, nil
$from_date = get_parameter_post("date_purge"); $from_date = get_parameter_post("date_purge");
$deleted = db_process_sql_delete('tsesion', array('utimestamp' => '< ' . $from_date)); $deleted = db_process_sql_delete('tsesion', array('utimestamp' => '< ' . $from_date));

View File

@ -18,7 +18,8 @@ global $config;
check_login (); check_login ();
ui_print_page_header (__('Database maintenance').' &raquo; '.__('Event database cleanup'), "images/gm_db.png", false, "", true); ui_print_page_header (__('Database maintenance').' &raquo; ' .
__('Event database cleanup'), "images/gm_db.png", false, "", true);
if (! check_acl ($config['id_user'], 0, "DM")) { if (! check_acl ($config['id_user'], 0, "DM")) {
db_pandora_audit("ACL Violation", "Trying to access Database Management Event"); db_pandora_audit("ACL Violation", "Trying to access Database Management Event");
@ -29,10 +30,11 @@ if (! check_acl ($config['id_user'], 0, "DM")) {
# ADQUIRE DATA PASSED AS FORM PARAMETERS # ADQUIRE DATA PASSED AS FORM PARAMETERS
# ====================================== # ======================================
# Purge data using dates # Purge data using dates
if (isset ($_POST["date_purge"])){ if (isset ($_POST["date_purge"])) {
$from_date = (int) get_parameter_post ("date_purge"); $from_date = (int) get_parameter_post ("date_purge");
$deleted = db_process_sql_delete('tevento', array('utimestamp' => '< ' . $from_date)); $deleted = db_process_sql_delete('tevento',
array('utimestamp' => '< ' . $from_date));
if ($deleted !== false) { if ($deleted !== false) {
ui_print_success_message(__('Successfully deleted old events')); ui_print_success_message(__('Successfully deleted old events'));
@ -43,7 +45,11 @@ if (isset ($_POST["date_purge"])){
} }
# End of get parameters block # End of get parameters block
$row = db_get_row_sql ("SELECT COUNT(*) AS total, MIN(timestamp) AS first_date, MAX(timestamp) AS latest_date FROM tevento"); $row = db_get_row_sql ("
SELECT COUNT(*) AS total,
MIN(timestamp) AS first_date,
MAX(timestamp) AS latest_date
FROM tevento");
$table->data = array (); $table->data = array ();
$table->cellpadding = 4; $table->cellpadding = 4;

View File

@ -178,12 +178,19 @@ foreach ($fields_available as $key=>$available) {
$table->data[0][0] = '<b>' . __('Fields available').'</b>'; $table->data[0][0] = '<b>' . __('Fields available').'</b>';
$table->data[1][0] = html_print_select ($fields_available, 'fields_available[]', true, '', '', '', true, true, false, '', false, 'width: 200px'); $table->data[1][0] = html_print_select ($fields_available, 'fields_available[]', true, '', '', '', true, true, false, '', false, 'width: 200px');
$table->data[1][1] = '<a href="javascript:">'.html_print_image('images/darrowright.png', true, array('id' => 'right', 'title' => __('Add fields to select'))).'</a>'; $table->data[1][1] = '<a href="javascript:">' .
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">'. html_print_image('images/darrowleft.png', true, array('id' => 'left', 'title' => __('Delete fields to select'))).'</a>'; html_print_image('images/darrowright.png', true,
array('id' => 'right', 'title' => __('Add fields to select'))) .
'</a>';
$table->data[1][1] .= '<br><br><br><br><a href="javascript:">' .
html_print_image('images/darrowleft.png', true,
array('id' => 'left', 'title' => __('Delete fields to select'))) .
'</a>';
$table->data[0][1] = ''; $table->data[0][1] = '';
$table->data[0][2] = '<b>' . __('Fields selected') . '</b>'; $table->data[0][2] = '<b>' . __('Fields selected') . '</b>';
$table->data[1][2] = html_print_select($result_selected, 'fields_selected[]', true, '', '', '', true, true, false, '', false, 'width: 200px'); $table->data[1][2] = html_print_select($result_selected,
'fields_selected[]', true, '', '', '', true, true, false, '', false, 'width: 200px');
echo '<form id="custom_events" method="post" action="index.php?sec=geventos&sec2=godmode/events/events&section=fields&amp;pure='.$config['pure'].'">'; echo '<form id="custom_events" method="post" action="index.php?sec=geventos&sec2=godmode/events/events&section=fields&amp;pure='.$config['pure'].'">';
html_print_table($table); html_print_table($table);
@ -212,7 +219,7 @@ $(document).ready (function () {
$("#left").click (function () { $("#left").click (function () {
jQuery.each($("select[name='fields_selected[]'] option:selected"), function (key, value) { jQuery.each($("select[name='fields_selected[]'] option:selected"), function (key, value) {
field_name = $(value).html(); field_name = $(value).html();
if (field_name != <?php echo "'".__('None')."'"; ?>){ if (field_name != <?php echo "'".__('None')."'"; ?>) {
id_field = $(value).attr('value'); id_field = $(value).attr('value');
$("select[name='fields_available[]']").append($("<option></option>").val(id_field).html('<i>' + field_name + '</i>')); $("select[name='fields_available[]']").append($("<option></option>").val(id_field).html('<i>' + field_name + '</i>'));
$("#fields_selected").find("option[value='" + id_field + "']").remove(); $("#fields_selected").find("option[value='" + id_field + "']").remove();

View File

@ -317,7 +317,7 @@ if (defined("METACONSOLE")) {
$table->data[13][1] .= html_print_input_hidden('tag_without', $table->data[13][1] .= html_print_input_hidden('tag_without',
$tag_without_base64, true); $tag_without_base64, true);
} }
else{ else {
$table->colspan[13][0] = '2'; $table->colspan[13][0] = '2';
$table->data[13][0] = '<b>' . __('Events with following tags') . '</b>'; $table->data[13][0] = '<b>' . __('Events with following tags') . '</b>';

View File

@ -28,7 +28,7 @@ if (! check_acl ($config["id_user"], 0, "EW")) {
$delete = (bool) get_parameter ('delete', 0); $delete = (bool) get_parameter ('delete', 0);
$multiple_delete = (bool)get_parameter('multiple_delete', 0); $multiple_delete = (bool)get_parameter('multiple_delete', 0);
if ($delete){ if ($delete) {
$id = (int) get_parameter('id'); $id = (int) get_parameter('id');

View File

@ -85,7 +85,7 @@ $table->data = array();
$defaultMapId = null; $defaultMapId = null;
if ($maps){ if ($maps) {
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
foreach ($maps as $map) { foreach ($maps as $map) {
if (!check_acl ($config["id_user"], $map["group_id"], "IW")) { if (!check_acl ($config["id_user"], $map["group_id"], "IW")) {

View File

@ -98,7 +98,7 @@ else {
$table->width = '98%'; $table->width = '98%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if ($id_group) if ($id_group)

View File

@ -323,11 +323,12 @@ foreach ($all_parents as $parent) {
$groups_count = count($groups); $groups_count = count($groups);
if (check_acl($config['id_user'], 0, "PM")) { if (check_acl($config['id_user'], 0, "PM")) {
if (!defined("METACONSOLE")){ if (!defined("METACONSOLE")) {
echo '<br />'; echo '<br />';
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group&pure='.$pure.'">'; echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/groups/configure_group&pure='.$pure.'">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_submit_button (__('Create group'), 'crt', false, 'class="sub next"'); html_print_submit_button(__('Create group'), 'crt', false,
'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
} }

View File

@ -306,7 +306,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["enterprise"] = $extension['enterprise']; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['subfatherId']]['sub2'][$extmenu['sec2']]["enterprise"] = $extension['enterprise'];
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
} }
else{ else {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0;
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];
@ -316,7 +316,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
$menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true; $menu_godmode[$extmenu['fatherId']]['hasExtensions'] = true;
} }
} }
else{ else {
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']); $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 0;
$menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon']; $menu_godmode[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];

View File

@ -45,7 +45,7 @@ else {
} }
$table->width = '98%'; $table->width = '98%';
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if ($id) { if ($id) {

View File

@ -442,12 +442,12 @@ $search_id_group = (int) get_parameter ('search_id_group');
$search_string = (string) get_parameter ('search_string'); $search_string = (string) get_parameter ('search_string');
$table->width = '98%'; $table->width = '98%';
if(defined("METACONSOLE")){ if(defined("METACONSOLE")) {
$table->width = '50%'; $table->width = '50%';
$table->class = 'databox_filters'; $table->class = 'databox_filters';
} }
$table->style = array (); $table->style = array ();
if (!defined('METACONSOLE')){ if (!defined('METACONSOLE')) {
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold';
} }
@ -501,14 +501,14 @@ $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false,
'class="sub search"', true); 'class="sub search"', true);
$table->data[0][4] .= '</div>'; $table->data[0][4] .= '</div>';
if(defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$filter = '<form class="filters_form" method="post" action="'.$url.'">'; $filter = '<form class="filters_form" method="post" action="'.$url.'">';
$filter .= html_print_table ($table,true); $filter .= html_print_table ($table,true);
$filter .= '</form>'; $filter .= '</form>';
ui_toggle($filter, __("Show Options")); ui_toggle($filter, __("Show Options"));
} }
else{ else {
echo '<form method="post" action="'.$url.'">'; echo '<form method="post" action="' . $url . '">';
html_print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';
} }
@ -517,7 +517,10 @@ $filter = array ();
if ($search_id_group) if ($search_id_group)
$filter['id_group'] = $search_id_group; $filter['id_group'] = $search_id_group;
if ($search_string != '') if ($search_string != '')
$filter[] = '(name LIKE "%'.$search_string.'%" OR description LIKE "%'.$search_string.'%" OR tcp_send LIKE "%'.$search_string.'%" OR tcp_rcv LIKE "%'.$search_string.'%")'; $filter[] = '(name LIKE "%' . $search_string . '%" ' .
'OR description LIKE "%'. $search_string . '%" ' .
'OR tcp_send LIKE "%' . $search_string . '%" ' .
'OR tcp_rcv LIKE "%' . $search_string . '%")';
$total_components = network_components_get_network_components (false, $filter, 'COUNT(*) AS total'); $total_components = network_components_get_network_components (false, $filter, 'COUNT(*) AS total');
$total_components = $total_components[0]['total']; $total_components = $total_components[0]['total'];

View File

@ -233,7 +233,7 @@ else {
echo '<form name="component" method="post">'; echo '<form name="component" method="post">';
/* $table came from manage_network_components_form_common.php */ /* $table came from manage_network_components_form_common.php */
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if ($id) { if ($id) {

View File

@ -267,10 +267,18 @@ if ($id_np > 0) {
$group_filter .= '</div></form>'; $group_filter .= '</div></form>';
if ($ncgroup > 0) { if ($ncgroup > 0) {
$sql = sprintf ("SELECT id_nc, name, id_group FROM tnetwork_component WHERE id_group = %d AND name LIKE '%".$ncfilter."%' ORDER BY name", $ncgroup); $sql = sprintf ("
SELECT id_nc, name, id_group
FROM tnetwork_component
WHERE id_group = %d AND name LIKE '%" . $ncfilter . "%'
ORDER BY name", $ncgroup);
} }
else { else {
$sql = "SELECT id_nc, name, id_group FROM tnetwork_component WHERE name LIKE '%".$ncfilter."%' ORDER BY name"; $sql = "
SELECT id_nc, name, id_group
FROM tnetwork_component
WHERE name LIKE '%" . $ncfilter . "%'
ORDER BY name";
} }
$result = db_get_all_rows_sql ($sql); $result = db_get_all_rows_sql ($sql);

View File

@ -112,7 +112,7 @@ if ($filters === false)
$filters = array (); $filters = array ();
$table->width = '90%'; $table->width = '90%';
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
} }
$table->head = array (); $table->head = array ();

View File

@ -173,7 +173,7 @@ $table->border = 0;
$table->cellspacing = 3; $table->cellspacing = 3;
$table->cellpadding = 5; $table->cellpadding = 5;
$table->class = "databox_color"; $table->class = "databox_color";
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if($id) if($id)
@ -183,7 +183,7 @@ if (defined('METACONSOLE')){
$table->head_colspan[0] = 5; $table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
} }
else{ else {
$table->style[0] = 'vertical-align: top;'; $table->style[0] = 'vertical-align: top;';
} }

View File

@ -195,14 +195,14 @@ $last_item = $item_max['id_rc'];
foreach ($reports_item as $item) { foreach ($reports_item as $item) {
$data = array (); $data = array ();
if (($item['id_rc'] == $first_item) && ($item['id_rc'] == $last_item)){ if (($item['id_rc'] == $first_item) && ($item['id_rc'] == $last_item)) {
$data[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>'; $data[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>';
} }
else if (($item['id_rc'] == $first_item) && ($item['id_rc'] != $last_item)){ else if (($item['id_rc'] == $first_item) && ($item['id_rc'] != $last_item)) {
$data[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>'; $data[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>';
$data[0] .= '<a href="' . $config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>'; $data[0] .= '<a href="' . $config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=down&id_rc='.$item['id_rc'].'">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
} }
else if (($item['id_rc'] == $last_item) && ($item['id_rc'] != $first_item)){ else if (($item['id_rc'] == $last_item) && ($item['id_rc'] != $first_item)) {
$data[0] = '<a href="' . $config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>'; $data[0] = '<a href="' . $config['homeurl'].'index.php?sec=netf&sec2=godmode/netflow/nf_item_list&id='.$item['id_report'].'&order=1&dir=up&id_rc='.$item['id_rc'].'">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
} }
else { else {

View File

@ -73,7 +73,7 @@ if ($editGraph) {
} }
// Modules table // Modules table
if(count($module_array) > 0){ if (count($module_array) > 0) {
echo "<table width='98%' cellpadding=4 cellpadding=4 class='databox'>"; echo "<table width='98%' cellpadding=4 cellpadding=4 class='databox'>";
echo "<tr> echo "<tr>
<th>".__('Agent')."</th> <th>".__('Agent')."</th>
@ -81,9 +81,9 @@ if(count($module_array) > 0){
<th>".__('Weight')."</th> <th>".__('Weight')."</th>
<th>".__('Delete')."</th>"; <th>".__('Delete')."</th>";
$color = 0; $color = 0;
for ($a = 0; $a < count($module_array); $a++){ for ($a = 0; $a < count($module_array); $a++) {
// Calculate table line color // Calculate table line color
if ($color == 1){ if ($color == 1) {
$tdcolor = "datos"; $tdcolor = "datos";
$color = 0; $color = 0;
} }

View File

@ -41,9 +41,9 @@ if (is_ajax ()) {
} }
return; return;
} }
return; return;
} }
check_login (); check_login ();

View File

@ -39,9 +39,9 @@ if (is_ajax ()) {
} }
return; return;
} }
return; return;
} }
check_login (); check_login ();

View File

@ -38,7 +38,7 @@ $buttons['graph_list'] = array('active' => true,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">' . 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">' .
html_print_image("images/list.png", true, array ("title" => __('Graph list'))) .'</a>'); html_print_image("images/list.png", true, array ("title" => __('Graph list'))) .'</a>');
if ($enterpriseEnable){ if ($enterpriseEnable) {
$buttons = reporting_enterprise_add_template_graph_tabs($buttons); $buttons = reporting_enterprise_add_template_graph_tabs($buttons);
} }

View File

@ -189,7 +189,7 @@ switch ($action) {
$idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule)); $idAgent = db_get_value_filter('id_agente', 'tagente_modulo', array('id_agente_modulo' => $idAgentModule));
$period = $item['period']; $period = $item['period'];
// 'top_n_value' field will be reused for projection report // 'top_n_value' field will be reused for projection report
if ($type == 'projection_graph'){ if ($type == 'projection_graph') {
$projection_period = $item['top_n_value']; $projection_period = $item['top_n_value'];
$period_pg = $item['period']; $period_pg = $item['period'];
} }
@ -545,16 +545,16 @@ else
?> ?>
<table style="" class="<?php echo $class;?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%"> <table style="" class="<?php echo $class;?>" id="" border="0" cellpadding="4" cellspacing="4" width="100%">
<?php <?php
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
echo "<thead> echo "<thead>
<tr> <tr>
<th align=center colspan=5> <th align=center colspan=5>
" . __('Item Editor') . " " . __('Item Editor') . "
</th> </th>
</tr> </tr>
</thead>"; </thead>";
} }
?> ?>
<tbody> <tbody>
<tr id="row_type" style="" class="datos"> <tr id="row_type" style="" class="datos">
<td style="vertical-align: top; width: 220px;"><?php echo __('Type'); ?></td> <td style="vertical-align: top; width: 220px;"><?php echo __('Type'); ?></td>
@ -962,8 +962,10 @@ else
$metaconsole_connections = array(); $metaconsole_connections = array();
} }
$result_servers = array(); $result_servers = array();
foreach ($metaconsole_connections as $metaconsole_element){ foreach ($metaconsole_connections as $metaconsole_element) {
$connection_data = enterprise_hook('metaconsole_get_connection', array($metaconsole_element)); $connection_data = enterprise_hook(
'metaconsole_get_connection',
array($metaconsole_element));
$result_servers[$connection_data['server_name']] = $connection_data['server_name']; $result_servers[$connection_data['server_name']] = $connection_data['server_name'];
} }
// Print select combo with metaconsole servers // Print select combo with metaconsole servers
@ -1710,7 +1712,7 @@ function edit_custom_graph() {
var id_element_graph; var id_element_graph;
var id_server; var id_server;
if (id_graph.indexOf("|") != -1){ if (id_graph.indexOf("|") != -1) {
agent_server_temp = id_graph.split('|'); agent_server_temp = id_graph.split('|');
id_element_graph = agent_server_temp[0]; id_element_graph = agent_server_temp[0];
id_server = agent_server_temp[1]; id_server = agent_server_temp[1];

View File

@ -279,7 +279,7 @@ $table->style[0] = 'text-align: right;';
if ($items) { if ($items) {
$table->width = '98%'; $table->width = '98%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = "databox data"; $table->class = "databox data";
} }
@ -448,7 +448,7 @@ foreach ($items as $item) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
} }
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
if ($items != false) { if ($items != false) {
ui_pagination ($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter); ui_pagination ($countItems, 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
html_print_table($table); html_print_table($table);
@ -491,13 +491,13 @@ $table->size[0] = '25%';
$table->size[1] = '25%'; $table->size[1] = '25%';
$table->size[2] = '25%'; $table->size[2] = '25%';
$table->size[3] = '25%'; $table->size[3] = '25%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->class = "databox data"; $table->class = "databox data";
$table->head[0] = __("Sort items"); $table->head[0] = __("Sort items");
$table->head_colspan[0] = 4; $table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
} }
else{ else {
$table->data[0][0] = "<b>". __("Sort items") . "</b>"; $table->data[0][0] = "<b>". __("Sort items") . "</b>";
} }
$table->data[1][0] = __('Sort selected items from position: '); $table->data[1][0] = __('Sort selected items from position: ');
@ -522,13 +522,13 @@ $table->size[0] = '25%';
$table->size[1] = '25%'; $table->size[1] = '25%';
$table->size[2] = '25%'; $table->size[2] = '25%';
$table->size[3] = '25%'; $table->size[3] = '25%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->class = "databox data"; $table->class = "databox data";
$table->head[0] = __("Delete items"); $table->head[0] = __("Delete items");
$table->head_colspan[0] = 4; $table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
} }
else{ else {
$table->data[0][0] = "<b>". __("Delete items") . "</b>"; $table->data[0][0] = "<b>". __("Delete items") . "</b>";
} }
$table->data[1][0] = __('Delete selected items from position: '); $table->data[1][0] = __('Delete selected items from position: ');
@ -594,6 +594,11 @@ function added_ids_sorted_items_to_hidden_input() {
function only_numbers(name) { function only_numbers(name) {
var value = $("input[name='" + name + "']").val(); var value = $("input[name='" + name + "']").val();
if (value == "") {
// Do none it is a empty field.
return;
}
value = parseInt(value); value = parseInt(value);
if (isNaN(value)) { if (isNaN(value)) {

View File

@ -47,7 +47,7 @@ $table->id = 'add_alert_table';
$table->class = 'databox'; $table->class = 'databox';
$table->head = array (); $table->head = array ();
if(defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->head[0] = __('Main data'); $table->head[0] = __('Main data');

View File

@ -374,7 +374,7 @@ switch ($action) {
$table_aux->class = 'databox filters'; $table_aux->class = 'databox filters';
$table_aux->cellpadding = 0; $table_aux->cellpadding = 0;
$table_aux->cellspacing = 0; $table_aux->cellspacing = 0;
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table_aux->class = 'databox_filters'; $table_aux->class = 'databox_filters';
$table_aux->width = '96%'; $table_aux->width = '96%';
$table_aux->cellpadding = 0; $table_aux->cellpadding = 0;
@ -390,14 +390,14 @@ switch ($action) {
$table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true); $table_aux->data[0][6] = html_print_submit_button(__('Search'), 'search_submit', false, 'class="sub upd"', true);
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$filter = "<form class ='filters_form' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure' $filter = "<form class ='filters_form' action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure'
method='post'>"; method='post'>";
$filter .= html_print_table($table_aux,true); $filter .= html_print_table($table_aux,true);
$filter .= "</form>"; $filter .= "</form>";
ui_toggle($filter, __("Show Option")); ui_toggle($filter, __("Show Option"));
} }
else{ else {
echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure' echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&id_group=$id_group&pure=$pure'
method='post'>"; method='post'>";
html_print_table($table_aux); html_print_table($table_aux);
@ -471,7 +471,7 @@ switch ($action) {
$table->class = 'databox data'; $table->class = 'databox data';
$table->cellpadding = 0; $table->cellpadding = 0;
$table->cellspacing = 0; $table->cellspacing = 0;
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->class = 'databox'; $table->class = 'databox';
$table->width = '100%'; $table->width = '100%';
} }
@ -656,7 +656,7 @@ switch ($action) {
} }
html_print_table ($table); html_print_table ($table);
} }
else{ else {
ui_print_info_message ( array ( 'no_close' => true, 'message' => __('No data found.') ) ); ui_print_info_message ( array ( 'no_close' => true, 'message' => __('No data found.') ) );
} }
if (check_acl ($config['id_user'], 0, "RW")) { if (check_acl ($config['id_user'], 0, "RW")) {
@ -853,7 +853,7 @@ switch ($action) {
$interval_max = get_parameter('max_interval'); $interval_max = get_parameter('max_interval');
$interval_min = get_parameter('min_interval'); $interval_min = get_parameter('min_interval');
// Checks intervals fields // Checks intervals fields
if (preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_max) and preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_min)){ if (preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_max) and preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_min)) {
$good_format = true; $good_format = true;
} }
$intervals = get_parameter('max_interval') . ';' . get_parameter('min_interval'); $intervals = get_parameter('max_interval') . ';' . get_parameter('min_interval');
@ -1115,7 +1115,7 @@ switch ($action) {
$interval_max = get_parameter('max_interval'); $interval_max = get_parameter('max_interval');
$interval_min = get_parameter('min_interval'); $interval_min = get_parameter('min_interval');
// Checks intervals fields // Checks intervals fields
if (preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_max) and preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_min)){ if (preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_max) and preg_match('/^(\-)*[0-9]*\.?[0-9]+$/', $interval_min)) {
$good_format = true; $good_format = true;
} }
$intervals = get_parameter('max_interval') . ';' . get_parameter('min_interval'); $intervals = get_parameter('max_interval') . ';' . get_parameter('min_interval');

View File

@ -263,12 +263,12 @@ if (($create != "") OR ($view != "")) {
$table->colspan['plugin_desc'][1] = 3; $table->colspan['plugin_desc'][1] = 3;
$table->data['plugin_desc'] = $data; $table->data['plugin_desc'] = $data;
if (!defined("METACONSOLE")){ if (!defined("METACONSOLE")) {
echo '<br>'; echo '<br>';
echo '<table class="databox" style="margin: 0 auto; width: 98%;"><tr><td>'; echo '<table class="databox" style="margin: 0 auto; width: 98%;"><tr><td>';
} }
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->head[0] = __('General'); $table->head[0] = __('General');
@ -276,8 +276,9 @@ if (($create != "") OR ($view != "")) {
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
echo '<br>'; echo '<br>';
html_print_table($table); html_print_table($table);
}else{ }
echo '<fieldset style="width:96%"><legend>'.__('General').'</legend>'; else {
echo '<fieldset style="width:96%"><legend>' . __('General') . '</legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
} }
@ -330,7 +331,7 @@ if (($create != "") OR ($view != "")) {
$data[1] = '<div id="command_preview" style="font-style:italic"></div>'; $data[1] = '<div id="command_preview" style="font-style:italic"></div>';
$table->data['plugin_preview'] = $data; $table->data['plugin_preview'] = $data;
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->head[0] = __('Command'); $table->head[0] = __('Command');
@ -338,8 +339,9 @@ if (($create != "") OR ($view != "")) {
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
echo '<br>'; echo '<br>';
html_print_table($table); html_print_table($table);
}else{ }
echo '<fieldset style="width:96%"><legend>'.__('Command').'</legend>'; else {
echo '<fieldset style="width:96%"><legend>' . __('Command') . '</legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
} }
@ -449,7 +451,7 @@ if (($create != "") OR ($view != "")) {
$table->data['plugin_action'] = $datam; $table->data['plugin_action'] = $datam;
} }
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
$table->head[0] = __('Parameters macros'); $table->head[0] = __('Parameters macros');
@ -457,8 +459,10 @@ if (($create != "") OR ($view != "")) {
$table->headstyle[0] = 'text-align: center'; $table->headstyle[0] = 'text-align: center';
echo '<br>'; echo '<br>';
html_print_table($table); html_print_table($table);
}else{ }
echo '<fieldset style="width:96%"><legend>'.__('Parameters macros').ui_print_help_icon ('macros', true).'</legend>'; else {
echo '<fieldset style="width:96%">' .
'<legend>' . __('Parameters macros') .ui_print_help_icon ('macros', true) . '</legend>';
html_print_table($table); html_print_table($table);
echo '</fieldset>'; echo '</fieldset>';
} }
@ -556,7 +560,8 @@ else {
$result = false; $result = false;
if ($values['name'] != '' && $values['execute'] != '') if ($values['name'] != '' && $values['execute'] != '')
$result = db_process_sql_update('tplugin', $values, array('id' => $plugin_id)); $result = db_process_sql_update('tplugin', $values,
array('id' => $plugin_id));
if (! $result) { if (! $result) {
ui_print_error_message(__('Problem updating plugin')); ui_print_error_message(__('Problem updating plugin'));

View File

@ -61,13 +61,13 @@ if ($create != "") {
$form_name = ""; $form_name = "";
$form_description = ""; $form_description = "";
$form_script = ""; $form_script = "";
$macros = ""; $macros = "";
} }
// SHOW THE FORM // SHOW THE FORM
// ================================================================= // =================================================================
if (($create != "") OR ($view != "")){ if (($create != "") OR ($view != "")) {
if ($create != "") if ($create != "")
ui_print_page_header (__('Recon script creation'), "images/gm_servers.png", false, "reconscript_definition", true); ui_print_page_header (__('Recon script creation'), "images/gm_servers.png", false, "reconscript_definition", true);
@ -215,7 +215,7 @@ if (($create != "") OR ($view != "")){
echo '<table width=98%>'; echo '<table width=98%>';
echo '<tr><td align="right">'; echo '<tr><td align="right">';
if ($create != ""){ if ($create != "") {
echo "<input name='crtbutton' type='submit' class='sub wand' value='".__('Create')."'>"; echo "<input name='crtbutton' type='submit' class='sub wand' value='".__('Create')."'>";
} }
else { else {
@ -332,7 +332,7 @@ else {
else { else {
ui_print_success_message(__('reconscript deleted successfully')); ui_print_success_message(__('reconscript deleted successfully'));
} }
if ($reconscript_id != 0){ if ($reconscript_id != 0) {
$result = db_process_sql_delete('trecon_task', $result = db_process_sql_delete('trecon_task',
array('id_recon_script' => $reconscript_id)); array('id_recon_script' => $reconscript_id));
} }

View File

@ -90,8 +90,8 @@ foreach ($servers as $server) {
} }
// Type // Type
$data[2] = '<span style="white-space:nowrap;">'.$server["img"]; $data[2] = '<span style="white-space:nowrap;">' . $server["img"];
if ($server["master"] == 1){ if ($server["master"] == 1) {
$data[2] .= ui_print_help_tip (__("This is a master server"), true); $data[2] .= ui_print_help_tip (__("This is a master server"), true);
} }
//$data[2] .= '</span> <span style="font-size:8px;"> v' .. '</span>'; //$data[2] .= '</span> <span style="font-size:8px;"> v' .. '</span>';
@ -117,7 +117,7 @@ foreach ($servers as $server) {
} }
$data[6] = $server['threads'].' : '.$server['queued_modules']; $data[6] = $server['threads'].' : '.$server['queued_modules'];
if ($server['queued_modules'] > 200){ if ($server['queued_modules'] > 200) {
$data[6] .= clippy_context_help("server_queued_modules"); $data[6] .= clippy_context_help("server_queued_modules");
} }
$data[7] = ui_print_timestamp ($server['keepalive'], true); $data[7] = ui_print_timestamp ($server['keepalive'], true);
@ -169,7 +169,7 @@ if ($tiny) {
if ($tiny) { if ($tiny) {
ui_toggle(html_print_table ($table,true), __('Tactical server information')); ui_toggle(html_print_table ($table,true), __('Tactical server information'));
} }
else{ else {
html_print_table ($table); html_print_table ($table);
} }
?> ?>

View File

@ -79,7 +79,9 @@ if ($mapsConnections !== false) {
ui_print_group_icon ($mapsConnection['group_id'], true), ui_print_group_icon ($mapsConnection['group_id'], true),
'<a href="index.php?sec=gsetup&sec2=godmode/setup/gis&amp;id_connection_map=' . '<a href="index.php?sec=gsetup&sec2=godmode/setup/gis&amp;id_connection_map=' .
$mapsConnection['id_tmap_connection'].'&amp;action=delete_connection" $mapsConnection['id_tmap_connection'].'&amp;action=delete_connection"
onClick="javascript: if (!confirm(\'' . __('Do you wan delete this connection?') . '\')) return false;">' . html_print_image ("images/cross.png", true).'</a>'); onClick="javascript: if (!confirm(\'' .
__('Do you wan delete this connection?') . '\')) return false;">' .
html_print_image ("images/cross.png", true).'</a>');
} }
} }

View File

@ -136,9 +136,9 @@ else { // Main list view for Links editor
echo "<th width='180px'>".__('Link name')."</th>"; echo "<th width='180px'>".__('Link name')."</th>";
echo "<th width='80px'>".__('Delete')."</th>"; echo "<th width='80px'>".__('Delete')."</th>";
$color=1; $color = 1;
foreach ($rows as $row) { foreach ($rows as $row) {
if ($color == 1){ if ($color == 1) {
$tdcolor = "datos"; $tdcolor = "datos";
$color = 0; $color = 0;
} }

View File

@ -27,12 +27,12 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us
enterprise_include_once ('godmode/setup/setup.php'); enterprise_include_once ('godmode/setup/setup.php');
/* /*
NOTICE FOR DEVELOPERS: NOTICE FOR DEVELOPERS:
Update operation is done in config_process.php Update operation is done in config_process.php
This is done in that way so the user can see the changes inmediatly. This is done in that way so the user can see the changes inmediatly.
If you added a new token, please check config_update_config() in functions_config.php If you added a new token, please check config_update_config() in functions_config.php
to add it there. to add it there.
*/ */
$table = new StdClass(); $table = new StdClass();

View File

@ -54,12 +54,12 @@ enterprise_include_once ('include/functions_setup.php');
enterprise_include_once ('godmode/setup/setup.php'); enterprise_include_once ('godmode/setup/setup.php');
/* /*
NOTICE FOR DEVELOPERS: NOTICE FOR DEVELOPERS:
Update operation is done in config_process.php Update operation is done in config_process.php
This is done in that way so the user can see the changes inmediatly. This is done in that way so the user can see the changes inmediatly.
If you added a new token, please check config_update_config() in functions_config.php If you added a new token, please check config_update_config() in functions_config.php
to add it there. to add it there.
*/ */
// Gets section to jump to another section // Gets section to jump to another section

View File

@ -98,7 +98,11 @@ $table->data[18][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button ('i
if ($config["integria_enabled"]) { if ($config["integria_enabled"]) {
require_once('include/functions_incidents.php'); require_once('include/functions_incidents.php');
$invent = incidents_call_api($config['integria_url']."/include/api.php?user=".$config['id_user']."&pass=".io_output_password($config['integria_api_password'])."&op=get_inventories"); $invent = incidents_call_api(
$config['integria_url'] . "/include/api.php?" .
"user=" . $config['id_user'] . "&" .
"pass=" . io_output_password($config['integria_api_password']) ."&" .
"op=get_inventories");
$bad_input = false; $bad_input = false;
// Wrong connection to api, bad password // Wrong connection to api, bad password
if (empty($invent)) { if (empty($invent)) {
@ -132,14 +136,17 @@ if ($config["integria_enabled"]) {
} }
} }
$table->data[20][0] = __('Integria URL') . ui_print_help_icon ("integria_url", true); $table->data[20][0] = __('Integria URL') . ui_print_help_icon ("integria_url", true);
$table->data[20][1] = html_print_input_text ('integria_url', $config["integria_url"], '', 25, 255, true); $table->data[20][1] = html_print_input_text('integria_url',
$config["integria_url"], '', 25, 255, true);
// If something goes wrong // If something goes wrong
if ($bad_input){ if ($bad_input) {
$table->data[20][1] .= html_print_image('images/error.png', true, array('title' => __('URL and/or Integria password are incorrect'))); $table->data[20][1] .= html_print_image('images/error.png',
true, array('title' => __('URL and/or Integria password are incorrect')));
} }
$table->data[21][0] = __('Integria API password'); $table->data[21][0] = __('Integria API password');
$table->data[21][1] = html_print_input_text ('integria_api_password', io_output_password($config["integria_api_password"]), '', 25, 25, true); $table->data[21][1] = html_print_input_text('integria_api_password',
io_output_password($config["integria_api_password"]), '', 25, 25, true);
if (!$bad_input) { if (!$bad_input) {
foreach ($invent as $inv) { foreach ($invent as $inv) {
@ -190,8 +197,11 @@ foreach ($timezones as $timezone) {
} }
} }
$table->data[23][0] = __('Timezone setup'). ' ' . ui_print_help_tip (__('Must have the same time zone as the system or database to avoid mismatches of time.'), true); $table->data[23][0] = __('Timezone setup'). ' ' . ui_print_help_tip(
$table->data[23][1] = html_print_input_text_extended ('timezone_text', $config["timezone"], 'text-timezone_text', '', 25, 25, false, '', 'readonly', true); __('Must have the same time zone as the system or database to avoid mismatches of time.'), true);
$table->data[23][1] = html_print_input_text_extended(
'timezone_text', $config["timezone"], 'text-timezone_text', '', 25,
25, false, '', 'readonly', true);
$table->data[23][1] .= '<a id="change_timezone">'.html_print_image ('images/pencil.png', true, array ('title' => __('Change timezone'))).'</a>'; $table->data[23][1] .= '<a id="change_timezone">'.html_print_image ('images/pencil.png', true, array ('title' => __('Change timezone'))).'</a>';
$table->data[23][1] .= "&nbsp;&nbsp;". html_print_select($zone_name, 'zone', $zone_selected, 'show_timezone();', '', '', true); $table->data[23][1] .= "&nbsp;&nbsp;". html_print_select($zone_name, 'zone', $zone_selected, 'show_timezone();', '', '', true);
$table->data[23][1] .= "&nbsp;&nbsp;". html_print_select($timezone_n, 'timezone', $config["timezone"], '', '', '', true); $table->data[23][1] .= "&nbsp;&nbsp;". html_print_select($timezone_n, 'timezone', $config["timezone"], '', '', '', true);
@ -310,14 +320,14 @@ function show_timezone () {
url: "ajax.php", url: "ajax.php",
data: "page=<?php echo $_GET['sec2']; ?>&select_timezone=1&zone=" + zone, data: "page=<?php echo $_GET['sec2']; ?>&select_timezone=1&zone=" + zone,
dataType: "json", dataType: "json",
success: function(data){ success: function(data) {
$("#timezone").empty(); $("#timezone").empty();
jQuery.each (data, function (id, value) { jQuery.each (data, function (id, value) {
timezone = value; timezone = value;
$("select[name='timezone']").append($("<option>").val(timezone).html(timezone)); $("select[name='timezone']").append($("<option>").val(timezone).html(timezone));
}); });
} }
}); });
} }
$(document).ready (function () { $(document).ready (function () {

817
pandora_console/godmode/setup/setup_visuals.php Normal file → Executable file
View File

@ -34,12 +34,12 @@ require_once("include/functions_post_process.php");
enterprise_include ('godmode/setup/setup_visuals.php'); enterprise_include ('godmode/setup/setup_visuals.php');
/* /*
NOTICE FOR DEVELOPERS: NOTICE FOR DEVELOPERS:
Update operation is done in config_process.php Update operation is done in config_process.php
This is done in that way so the user can see the changes inmediatly. This is done in that way so the user can see the changes inmediatly.
If you added a new token, please check config_update_config() in functions_config.php If you added a new token, please check config_update_config() in functions_config.php
to add it there. to add it there.
*/ */
require_once ('include/functions_themes.php'); require_once ('include/functions_themes.php');
@ -51,13 +51,439 @@ $table->data = array ();
$row = 0; $row = 0;
$table->data[$row][0] = __('Date format string') . ui_print_help_icon("date_format", true); //----------------------------------------------------------------------
$table->data[$row][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]); // BEHAVIOUR CONFIGURATION
$table->data[$row][1] .= html_print_input_text ('date_format', $config["date_format"], '', 30, 100, true); //----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('Behaviour configuration') . '<hr>';
$row++;
$table->data[$row][0] = __('Block size for pagination');
$table->data[$row][1] = html_print_input_text ('block_size', $config["global_block_size"], '', 5, 5, true);
$row++;
$values = array ();
$values[5] = human_time_description_raw (5);
$values[30] = human_time_description_raw (30);
$values[SECONDS_1MINUTE] = human_time_description_raw(SECONDS_1MINUTE);
$values[SECONDS_2MINUTES] = human_time_description_raw(SECONDS_2MINUTES);
$values[SECONDS_5MINUTES] = human_time_description_raw(SECONDS_5MINUTES);
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
$table->data[$row][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
$table->data[$row][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
$row++;
$table->data[$row][0] = __('Paginated module view');
$table->data[$row][1] = html_print_checkbox('paginate_module', 1,
$config['paginate_module'], true);
$row++;
$table->data[$row][0] = __('Render data of module type is proc.');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('render_proc', 1, '',
$config["render_proc"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('render_proc', 0, '',
$config["render_proc"], true);
$row++;
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// STYLE CONFIGURATION
//----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('Style configuration') . '<hr>';
$row++;
$table->data[$row][0] = __('Style template');
$table->data[$row][1] = html_print_select (themes_get_css (), 'style', $config["style"].'.css', '', '', '', true);
$row++;
$table->data[$row][0] = __('Status icon set');
$iconsets["default"] = __('Colors');
$iconsets["faces"] = __('Faces');
$iconsets["color_text"] = __('Colors and text');
$table->data[$row][1] = html_print_select ($iconsets, 'status_images_set', $config["status_images_set"], '', '', '', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'status_set_preview', false, '', '', true);
$row++;
$table->data[$row][0] = __('Login background') . ui_print_help_tip(__('You can place your custom images into the folder images/backgrounds/'), true);
$backgrounds_list_jpg = list_files("images/backgrounds", "jpg", 1, 0);
$backgrounds_list_gif = list_files("images/backgrounds", "gif", 1, 0);
$backgrounds_list_png = list_files("images/backgrounds", "png", 1, 0);
$backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png);
$backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif);
asort($backgrounds_list);
$table->data[$row][1] = html_print_select ($backgrounds_list,
'login_background', $config["login_background"], '', __('Default'),
'', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'login_background_preview', false, '', '', true);
$row++;
$table->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true);
$table->data[$row][1] = html_print_select(
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
$config["custom_logo"], '', '', '', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'custom_logo_preview', false, '', '', true);
$row++;
$table->data[$row][0] = __('Fixed header');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('fixed_header', 1, '', $config["fixed_header"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('fixed_header', 0, '', $config["fixed_header"], true);
$row++;
$table->data[$row][0] = __('Fixed menu');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('fixed_menu', 1, '', $config["fixed_menu"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
$row++;
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// GIS CONFIGURATION
//----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('GIS configuration') . '<hr>';
$row++;
$table->data[$row][0] = __('GIS Labels') .
ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
$row++;
$listIcons = gis_get_array_list_icons();
$arraySelectIcon = array();
foreach ($listIcons as $index => $value)
$arraySelectIcon[$index] = $index;
$table->data[$row][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
$table->data[$row][1] = html_print_select($arraySelectIcon,
"gis_default_icon", $config["gis_default_icon"], "", __('None'),
'', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'gis_icon_preview', false, '', '', true);
$row++;
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// FONT AND TEXT CONFIGURATION
//----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('Font and Text configuration') . '<hr>';
$row++;
$table->data[$row][0] = __('Font path');
$fonts = load_fonts();
$table->data[$row][1] = html_print_select($fonts, 'fontpath', $config["fontpath"], '', '', 0, true);
$row++; $row++;
if($config['prominent_time'] == 'comparation') { $table->data[$row][0] = __('Font size');
$font_size_array = array(
1 => 1,
2 => 2,
3 => 3,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
12 => 12,
13 => 13,
14 => 14,
15 => 15);
$table->data[$row][1] = html_print_select($font_size_array, 'font_size',
$config["font_size"], '', '', 0, true);
$row++;
$table->data[$row][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Item title size text') .
ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = html_print_input_text('item_title_size_text',
$config["item_title_size_text"], '', 3, 3, true);
$row++;
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// CHARS CONFIGURATION
//----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('Charts configuration') . '<hr>';
$row++;
$table->data[$row][0] = __('Graph color (min)');
$table->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color (avg)');
$table->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color (max)');
$table->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #4');
$table->data[$row][1] = html_print_input_text ('graph_color4', $config["graph_color4"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #5');
$table->data[$row][1] = html_print_input_text ('graph_color5', $config["graph_color5"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #6');
$table->data[$row][1] = html_print_input_text ('graph_color6', $config["graph_color6"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #7');
$table->data[$row][1] = html_print_input_text ('graph_color7', $config["graph_color7"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #8');
$table->data[$row][1] = html_print_input_text ('graph_color8', $config["graph_color8"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #9');
$table->data[$row][1] = html_print_input_text ('graph_color9', $config["graph_color9"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #10');
$table->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph resolution (1-low, 5-high)');
$table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Default line thickness for the Custom Graph.');
$table->data[$row][1] = html_print_input_text ('custom_graph_width',
$config["custom_graph_width"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Use round corners');
$table->data[$row][1] = __('Yes').'&nbsp;'.html_print_radio_button ('round_corner', 1, '', $config["round_corner"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No').'&nbsp;'.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
$row++;
$table->data[$row][0] = __('Interactive charts') .
ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
$table->data[$row][1] = __('Yes').'&nbsp;' .
html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No').'&nbsp;' .
html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
$row++;
if (!isset($config["short_module_graph_data"]))
$config["short_module_graph_data"] = true;
$table->data[$row][0] = __('Shortened module graph data');
$table->data[$row][0] .= ui_print_help_tip(__('The data number of the module graphs will be rounded and shortened'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('short_module_graph_data', 1, '',
$config["short_module_graph_data"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('short_module_graph_data', 0, '',
$config["short_module_graph_data"], true);
$row++;
$table->data[$row][0] = __('Type of module charts');
$table->data[$row][1] = __('Area').'&nbsp;' .
html_print_radio_button ('type_module_charts', 'area', '',
$config["type_module_charts"] == 'area', true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('Line').'&nbsp;' .
html_print_radio_button ('type_module_charts', 'line', '',
$config["type_module_charts"] != 'area', true);
$row++;
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// OTHER CONFIGURATION
//----------------------------------------------------------------------
$table->colspan[$row][0] = 2;
$table->data[$row][0] = __('Other configuration') . '<hr>';
$row++;
if (empty($config["vc_line_thickness"])) $config["vc_line_thickness"] = 2;
$table->data[$row][0] = __('Default line thickness for the Visual Console') . ui_print_help_tip(__('This interval will affect to the lines between elements on the Visual Console'), true);
$table->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
$row++;
// For 5.1 Autohidden menu feature
$table->data['autohidden'][0] = __('Autohidden menu');
$table->data['autohidden'][1] = html_print_checkbox('autohidden_menu',
1, $config['autohidden_menu'], true);
// Juanma (07/05/2014) New feature: Table for custom front page for reports
$table->data[$row][0] = __('Custom report front page') .
ui_print_help_tip(
__('Custom report front page. It will be applied to all reports and templates by default.'), true);
$table->data[$row][1] = html_print_checkbox('custom_report_front', 1,
$config['custom_report_front'], true);
$row++;
//----------------------------------------------------------------------
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
foreach ($dirItems as $entryDir) {
if (strstr($entryDir, '.jpg') !== false) {
$customLogos['images/custom_logo/' . $entryDir] = $entryDir;
}
}
$_fonts = array();
$dirFonts = scandir(_MPDF_TTFONTPATH);
foreach ($dirFonts as $entryDir) {
if (strstr($entryDir, '.ttf') !== false) {
$_fonts[$entryDir] = $entryDir;
}
}
// Font
$table->data['custom_report_front-font'][0] = __('Custom report front') . ' - ' . __('Font family');
$table->data['custom_report_front-font'][1] = html_print_select ($_fonts,
'custom_report_front_font', $config['custom_report_front_font'],
false, __('Default'), '', true);
// Logo
$table->data['custom_report_front-logo'][0] = __('Custom report front') . ' - ' .
__('Custom logo') .
ui_print_help_tip(
__("The dir of custom logos is in your www Pandora Console in \"images/custom_logo\". You can upload more files (ONLY JPEG) in upload tool in console."), true);
$table->data['custom_report_front-logo'][1] = html_print_select(
$customLogos,
'custom_report_front_logo',
$config['custom_report_front_logo'],
'showPreview()',
__('Default'),
'',
true);
// Preview
$table->data['custom_report_front-preview'][0] = __('Custom report front') . ' - ' . 'Preview';
if (empty($config['custom_report_front_logo'])) {
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
}
$table->data['custom_report_front-preview'][1] = '<span id="preview_image">' .
html_print_image ($config['custom_report_front_logo'], true) . '</span>';
// Header
$table->data['custom_report_front-header'][0] = __('Custom report front') . ' - ' . __('Header');
$table->data['custom_report_front-header'][1] = html_print_textarea('custom_report_front_header', 5, 15,
$config['custom_report_front_header'], 'style="width: 38em;"', true);
// First page
$table->data['custom_report_front-first_page'][0] = __('Custom report front') . ' - ' . __('First page');
$table->data['custom_report_front-first_page'][1] = html_print_textarea('custom_report_front_firstpage', 15, 15,
$config['custom_report_front_firstpage'], 'style="width: 38em; height: 20em;"', true);
// Footer
$table->data['custom_report_front-footer'][0] = __('Custom report front') . ' - ' . __('Footer');
$table->data['custom_report_front-footer'][1] = html_print_textarea('custom_report_front_footer', 5, 15,
$config['custom_report_front_footer'], 'style="width: 38em;"', true);
$table->data[$row][0] = __('Show QR Code icon in the header');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('show_qr_code_header', 1, '',
$config["show_qr_code_header"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('show_qr_code_header', 0, '',
$config["show_qr_code_header"], true);
$row++;
$table->data[$row][0] = __('Custom graphviz directory') .
ui_print_help_tip (__("Custom directory where the graphviz binaries are stored."), true);
$table->data[$row][1] = html_print_input_text ('graphviz_bin_dir',
$config["graphviz_bin_dir"], '', 50, 255, true);
$row++;
$table->data[$row][0] = __('Networkmap max width');
$table->data[$row][1] = html_print_input_text ('networkmap_max_width',
$config["networkmap_max_width"], '', 10, 20, true);
$row++;
$table->data[$row][0] = __('Show only the group name');
$table->data[$row][0] .= ui_print_help_tip(
__('Show the group name instead the group icon.'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('show_group_name', 1, '',
$config["show_group_name"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('show_group_name', 0, '',
$config["show_group_name"], true);
$row++;
$table->data[$row][0] = __('Date format string') . ui_print_help_icon("date_format", true);
$table->data[$row][1] = '<em>'.__('Example').'</em> '.date ($config["date_format"]);
$table->data[$row][1] .= html_print_input_text ('date_format', $config["date_format"], '', 30, 100, true);
$row++;
if ($config['prominent_time'] == 'comparation') {
$timestamp = false; $timestamp = false;
$comparation = true; $comparation = true;
} }
@ -65,7 +491,6 @@ else if ($config['prominent_time'] == 'timestamp') {
$timestamp = true; $timestamp = true;
$comparation = false; $comparation = false;
} }
$table->data[$row][0] = __('Timestamp or time comparation') . ui_print_help_icon ("time_stamp-comparation", true); $table->data[$row][0] = __('Timestamp or time comparation') . ui_print_help_icon ("time_stamp-comparation", true);
$table->data[$row][1] = __('Comparation in rollover') . ' '; $table->data[$row][1] = __('Comparation in rollover') . ' ';
$table->data[$row][1] .= html_print_radio_button ('prominent_time', "comparation", '', $comparation, true); $table->data[$row][1] .= html_print_radio_button ('prominent_time', "comparation", '', $comparation, true);
@ -74,63 +499,9 @@ $table->data[$row][1] .= html_print_radio_button ('prominent_time', "timestamp",
$row++; $row++;
$table->data[$row][0] = __('Graph color (min)');
$table->data[$row][1] = html_print_input_text ('graph_color1', $config["graph_color1"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color (avg)');
$table->data[$row][1] = html_print_input_text ('graph_color2', $config["graph_color2"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color (max)');
$table->data[$row][1] = html_print_input_text ('graph_color3', $config["graph_color3"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #4');
$table->data[$row][1] = html_print_input_text ('graph_color4', $config["graph_color4"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #5');
$table->data[$row][1] = html_print_input_text ('graph_color5', $config["graph_color5"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #6');
$table->data[$row][1] = html_print_input_text ('graph_color6', $config["graph_color6"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #7');
$table->data[$row][1] = html_print_input_text ('graph_color7', $config["graph_color7"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #8');
$table->data[$row][1] = html_print_input_text ('graph_color8', $config["graph_color8"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #9');
$table->data[$row][1] = html_print_input_text ('graph_color9', $config["graph_color9"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graph color #10');
$table->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
$row++;
$table->data[$row][0] = __('Graphic resolution (1-low, 5-high)');
$table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// CUSTOM VALUES POST PROCESS // CUSTOM VALUES POST PROCESS
//---------------------------------------------------------------------- //----------------------------------------------------------------------
$row++;
$table->data[$row][0] = __('Custom values post process'); $table->data[$row][0] = __('Custom values post process');
$table->data[$row][1] = "<table>"; $table->data[$row][1] = "<table>";
$table->data[$row][1] .= __('Value') . ':&nbsp;' . $table->data[$row][1] .= __('Value') . ':&nbsp;' .
@ -187,324 +558,6 @@ $table->data[$row][1] .= html_print_input_hidden ('interval_values', $config["in
// This hidden field will be filled from jQuery before submit // This hidden field will be filled from jQuery before submit
$table->data[$row][1] .= html_print_input_hidden ('interval_to_delete', '', true); $table->data[$row][1] .= html_print_input_hidden ('interval_to_delete', '', true);
//---------------------------------------------------------------------- //----------------------------------------------------------------------
$row++;
$table->data[$row][0] = __('Style template');
$table->data[$row][1] = html_print_select (themes_get_css (), 'style', $config["style"].'.css', '', '', '', true);
$row++;
$table->data[$row][0] = __('Block size for pagination');
$table->data[$row][1] = html_print_input_text ('block_size', $config["global_block_size"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Use round corners');
$table->data[$row][1] = __('Yes').'&nbsp;'.html_print_radio_button ('round_corner', 1, '', $config["round_corner"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No').'&nbsp;'.html_print_radio_button ('round_corner', 0, '', $config["round_corner"], true);
$row++;
$table->data[$row][0] = __('Status icon set');
$iconsets["default"] = __('Colors');
$iconsets["faces"] = __('Faces');
$iconsets["color_text"] = __('Colors and text');
$table->data[$row][1] = html_print_select ($iconsets, 'status_images_set', $config["status_images_set"], '', '', '', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'status_set_preview', false, '', '', true);
$row++;
$table->data[$row][0] = __('Font path');
$fonts = load_fonts();
$table->data[$row][1] = html_print_select($fonts, 'fontpath', $config["fontpath"], '', '', 0, true);
$row++;
$table->data[$row][0] = __('Font size');
$font_size_array = array(
1 => 1,
2 => 2,
3 => 3,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
12 => 12,
13 => 13,
14 => 14,
15 => 15);
$table->data[$row][1] = html_print_select($font_size_array, 'font_size', $config["font_size"], '', '', 0, true);
$row++;
$table->data[$row][0] = __('Interactive charts') . ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true);
$table->data[$row][1] = __('Yes').'&nbsp;'.html_print_radio_button ('flash_charts', 1, '', $config["global_flash_charts"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No').'&nbsp;'.html_print_radio_button ('flash_charts', 0, '', $config["global_flash_charts"], true);
$row++;
$table->data[$row][0] = __('Custom logo') . ui_print_help_icon("custom_logo", true);
$table->data[$row][1] = html_print_select(
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
$config["custom_logo"], '', '', '', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'custom_logo_preview', false, '', '', true);
$row++;
$table->data[$row][0] = __('Login background') . ui_print_help_tip(__('You can place your custom images into the folder images/backgrounds/'), true);
$backgrounds_list_jpg = list_files("images/backgrounds", "jpg", 1, 0);
$backgrounds_list_gif = list_files("images/backgrounds", "gif", 1, 0);
$backgrounds_list_png = list_files("images/backgrounds", "png", 1, 0);
$backgrounds_list = array_merge($backgrounds_list_jpg, $backgrounds_list_png);
$backgrounds_list = array_merge($backgrounds_list, $backgrounds_list_gif);
asort($backgrounds_list);
$table->data[$row][1] = html_print_select ($backgrounds_list,
'login_background', $config["login_background"], '', __('Default'),
'', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'login_background_preview', false, '', '', true);
$row++;
$values = array ();
$values[5] = human_time_description_raw (5);
$values[30] = human_time_description_raw (30);
$values[SECONDS_1MINUTE] = human_time_description_raw(SECONDS_1MINUTE);
$values[SECONDS_2MINUTES] = human_time_description_raw(SECONDS_2MINUTES);
$values[SECONDS_5MINUTES] = human_time_description_raw(SECONDS_5MINUTES);
$values[SECONDS_10MINUTES] = human_time_description_raw(SECONDS_10MINUTES);
$values[SECONDS_30MINUTES] = human_time_description_raw(SECONDS_30MINUTES);
$table->data[$row][0] = __('Default interval for refresh on Visual Console') . ui_print_help_tip(__('This interval will affect to Visual Console pages'), true);
$table->data[$row][1] = html_print_select ($values, 'vc_refr', $config["vc_refr"], '', 'N/A', 0, true, false, false);
$row++;
if (empty($config["vc_line_thickness"])) $config["vc_line_thickness"] = 2;
$table->data[$row][0] = __('Default line thickness for the Visual Console') . ui_print_help_tip(__('This interval will affect to the lines between elements on the Visual Console'), true);
$table->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Agent size text') . ui_print_help_tip(__('When the agent name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = __('Small:') . html_print_input_text ('agent_size_text_small', $config["agent_size_text_small"], '', 3, 3, true);
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('agent_size_text_medium', $config["agent_size_text_medium"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Module size text') . ui_print_help_tip(__('When the module name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = __('Small:') . html_print_input_text ('module_size_text_small', $config["module_size_text_small"], '', 3, 3, true);
$table->data[$row][1] .= ' ' . __('Normal:') . html_print_input_text ('module_size_text_medium', $config["module_size_text_medium"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Description size text') . ui_print_help_tip(__('When the description name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = html_print_input_text ('description_size_text', $config["description_size_text"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('Item title size text') .
ui_print_help_tip(__('When the item title name have a lot of characters, in some places in Pandora Console it is necesary truncate to N characters.'), true);
$table->data[$row][1] = html_print_input_text('item_title_size_text',
$config["item_title_size_text"], '', 3, 3, true);
$row++;
$table->data[$row][0] = __('GIS Labels') .
ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('gis_label', 1, '', $config["gis_label"], true).'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('gis_label', 0, '', $config["gis_label"], true);
$row++;
$listIcons = gis_get_array_list_icons();
$arraySelectIcon = array();
foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
$table->data[$row][0] = __('Default icon in GIS') . ui_print_help_tip(__('Agent icon for GIS Maps. If set to "none", group icon will be used'), true);
$table->data[$row][1] = html_print_select($arraySelectIcon,
"gis_default_icon", $config["gis_default_icon"], "", __('None'),
'', true);
$table->data[$row][1] .= "&nbsp;" . html_print_button(__("View"), 'gis_icon_preview', false, '', '', true);
$row++;
// For 5.1 Autohidden menu feature
$table->data['autohidden'][0] = __('Autohidden menu');
$table->data['autohidden'][1] = html_print_checkbox('autohidden_menu',
1, $config['autohidden_menu'], true);
// Juanma (07/05/2014) New feature: Table for custom front page for reports
$table->data[$row][0] = __('Custom report front page') .
ui_print_help_tip(__('Custom report front page. It will be applied to all reports and templates by default.'), true);
$table->data[$row][1] = html_print_checkbox('custom_report_front', 1,
$config['custom_report_front'], true);
$row++;
$dirItems = scandir($config['homedir'] . '/images/custom_logo');
foreach ($dirItems as $entryDir) {
if (strstr($entryDir, '.jpg') !== false) {
$customLogos['images/custom_logo/' . $entryDir] = $entryDir;
}
}
$_fonts = array();
$dirFonts = scandir(_MPDF_TTFONTPATH);
foreach ($dirFonts as $entryDir) {
if (strstr($entryDir, '.ttf') !== false) {
$_fonts[$entryDir] = $entryDir;
}
}
// Font
$table->data['custom_report_front-font'][0] = __('Custom report front') . ' - ' . __('Font family');
$table->data['custom_report_front-font'][1] = html_print_select ($_fonts,
'custom_report_front_font', $config['custom_report_front_font'],
false, __('Default'), '', true);
// Logo
$table->data['custom_report_front-logo'][0] = __('Custom report front') . ' - ' .
__('Custom logo') .
ui_print_help_tip(
__("The dir of custom logos is in your www Pandora Console in \"images/custom_logo\". You can upload more files (ONLY JPEG) in upload tool in console."), true);
$table->data['custom_report_front-logo'][1] = html_print_select(
$customLogos,
'custom_report_front_logo',
$config['custom_report_front_logo'],
'showPreview()',
__('Default'),
'',
true);
// Preview
$table->data['custom_report_front-preview'][0] = __('Custom report front') . ' - ' . 'Preview';
if (empty($config['custom_report_front_logo'])) {
$config['custom_report_front_logo'] = 'images/pandora_logo_white.jpg';
}
$table->data['custom_report_front-preview'][1] = '<span id="preview_image">' .
html_print_image ($config['custom_report_front_logo'], true) . '</span>';
// Header
$table->data['custom_report_front-header'][0] = __('Custom report front') . ' - ' . __('Header');
$table->data['custom_report_front-header'][1] = html_print_textarea('custom_report_front_header', 5, 15,
$config['custom_report_front_header'], 'style="width: 38em;"', true);
// First page
$table->data['custom_report_front-first_page'][0] = __('Custom report front') . ' - ' . __('First page');
$table->data['custom_report_front-first_page'][1] = html_print_textarea('custom_report_front_firstpage', 15, 15,
$config['custom_report_front_firstpage'], 'style="width: 38em; height: 20em;"', true);
// Footer
$table->data['custom_report_front-footer'][0] = __('Custom report front') . ' - ' . __('Footer');
$table->data['custom_report_front-footer'][1] = html_print_textarea('custom_report_front_footer', 5, 15,
$config['custom_report_front_footer'], 'style="width: 38em;"', true);
$table->data[$row][0] = __('Paginate module view');
$table->data[$row][1] = html_print_checkbox('paginate_module', 1,
$config['paginate_module'], true);
$row++;
$table->data[$row][0] = __('Show QR Code icon in the header');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('show_qr_code_header', 1, '',
$config["show_qr_code_header"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('show_qr_code_header', 0, '',
$config["show_qr_code_header"], true);
$row++;
$table->data[$row][0] = __('Custom graphviz directory') .
ui_print_help_tip (__("Custom directory where the graphviz binaries are stored."), true);
$table->data[$row][1] = html_print_input_text ('graphviz_bin_dir',
$config["graphviz_bin_dir"], '', 50, 255, true);
$row++;
$table->data[$row][0] = __('Networkmap max width');
$table->data[$row][1] = html_print_input_text ('networkmap_max_width',
$config["networkmap_max_width"], '', 10, 20, true);
$row++;
$table->data[$row][0] = __('Fixed header');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('fixed_header', 1, '', $config["fixed_header"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('fixed_header', 0, '', $config["fixed_header"], true);
$row++;
$table->data[$row][0] = __('Fixed menu');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('fixed_menu', 1, '', $config["fixed_menu"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('fixed_menu', 0, '', $config["fixed_menu"], true);
$row++;
if (!isset($config["short_module_graph_data"]))
$config["short_module_graph_data"] = true;
$table->data[$row][0] = __('Shortened module graph data');
$table->data[$row][0] .= ui_print_help_tip(__('The data number of the module graphs will be rounded and shortened'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('short_module_graph_data', 1, '',
$config["short_module_graph_data"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('short_module_graph_data', 0, '',
$config["short_module_graph_data"], true);
$row++;
$table->data[$row][0] = __('Show only the group name');
$table->data[$row][0] .= ui_print_help_tip(
__('Show the group name instead the group icon.'), true);
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('show_group_name', 1, '',
$config["show_group_name"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('show_group_name', 0, '',
$config["show_group_name"], true);
$row++;
$table->data[$row][0] = __('Default line thickness for the Custom Graph.');
$table->data[$row][1] = html_print_input_text ('custom_graph_widht',
$config["custom_graph_widht"], '', 5, 5, true);
$row++;
$table->data[$row][0] = __('Render data of module type is proc.');
$table->data[$row][1] = __('Yes') . '&nbsp;' .
html_print_radio_button ('render_proc', 1, '',
$config["render_proc"], true) .
'&nbsp;&nbsp;';
$table->data[$row][1] .= __('No') . '&nbsp;' .
html_print_radio_button ('render_proc', 0, '',
$config["render_proc"], true);
$row++; $row++;

View File

@ -164,7 +164,7 @@ else
} }
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_label (__("Name"),'name'); html_print_label (__("Name"), 'name');
echo "</td>"; echo "</td>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_input_text ('name_tag', $name_tag); html_print_input_text ('name_tag', $name_tag);
@ -172,7 +172,7 @@ else
echo "</tr>"; echo "</tr>";
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_label (__("Description"),'name'); html_print_label (__("Description"), 'name');
echo "</td>"; echo "</td>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_input_text ('description_tag', $description_tag); html_print_input_text ('description_tag', $description_tag);
@ -181,7 +181,8 @@ else
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
echo '<b>' . __("Url") . '</b>'; echo '<b>' . __("Url") . '</b>';
echo ui_print_help_tip (__("Hyperlink to help information that has to exist previously."), true); echo ui_print_help_tip(
__("Hyperlink to help information that has to exist previously."), true);
echo "</td>"; echo "</td>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_input_text ('url_tag', $url_tag); html_print_input_text ('url_tag', $url_tag);
@ -190,7 +191,8 @@ else
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
echo '<b>' . __("Email") . '</b>'; echo '<b>' . __("Email") . '</b>';
echo ui_print_help_tip (__("Associated Email direction to use later in alerts associated to Tags."), true); echo ui_print_help_tip(
__("Associated Email direction to use later in alerts associated to Tags."), true);
echo "</td>"; echo "</td>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_textarea('email_tag', 5, 20, $email_tag); html_print_textarea('email_tag', 5, 20, $email_tag);
@ -199,7 +201,8 @@ else
echo "<tr>"; echo "<tr>";
echo "<td align='left'>"; echo "<td align='left'>";
echo '<b>' . __("Phone") . '</b>'; echo '<b>' . __("Phone") . '</b>';
echo ui_print_help_tip (__("Associated phone number to use later in alerts associated to Tags."), true); echo ui_print_help_tip(
__("Associated phone number to use later in alerts associated to Tags."), true);
echo "</td>"; echo "</td>";
echo "<td align='left'>"; echo "<td align='left'>";
html_print_textarea('phone_tag', 5, 20, $phone_tag); html_print_textarea('phone_tag', 5, 20, $phone_tag);

View File

@ -140,7 +140,8 @@ if (!defined('METACONSOLE')) {
echo "</td>"; echo "</td>";
echo "</tr>"; echo "</tr>";
echo "</table>"; echo "</table>";
}else{ }
else {
$filters = '<form method=post class="filters_form" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag=0">'; $filters = '<form method=post class="filters_form" action="index.php?sec='.$sec.'&sec2=godmode/tag/tag&delete_tag=0">';
$filters .= "<table border=0 cellpadding=0 cellspacing=0 class=databox_filters width=70%>"; $filters .= "<table border=0 cellpadding=0 cellspacing=0 class=databox_filters width=70%>";
@ -243,7 +244,7 @@ if (!empty($result)) {
html_print_table ($table); html_print_table ($table);
} }
if(defined("METACONSOLE")){ if (defined("METACONSOLE")) {
echo "<table border=0 cellpadding=0 cellspacing=0 width=100%>"; echo "<table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo "<tr>"; echo "<tr>";
echo "<td align=right>"; echo "<td align=right>";

View File

@ -415,7 +415,7 @@ if ($delete_profile) {
$table->id = 'user_configuration_table'; $table->id = 'user_configuration_table';
$table->width = '98%'; $table->width = '98%';
if (defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox data';
if ($id) { if ($id) {
@ -511,7 +511,8 @@ if (!$meta) {
$table->data[11][0] = __('Interactive charts'). ' ' .ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ; $table->data[11][0] = __('Interactive charts'). ' ' .ui_print_help_tip(__('Whether to use Javascript or static PNG graphs'), true) ;
$values = array(-1 => __('Use global conf'), 1 => __('Yes'), 0 => __('No')); $values = array(-1 => __('Use global conf'), 1 => __('Yes'), 0 => __('No'));
$table->data[11][1] = html_print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false); $table->data[11][1] = html_print_select($values, 'flash_charts',
$user_info["flash_chart"], '', '', -1, true, false, false);
$table->data[12][0] = __('Block size for pagination'); $table->data[12][0] = __('Block size for pagination');
$table->data[12][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true); $table->data[12][1] = html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);
@ -596,7 +597,7 @@ if (!empty ($id) && !$new_user) {
echo '<h4>'. __('Profiles/Groups assigned to this user') . '</h4>'; echo '<h4>'. __('Profiles/Groups assigned to this user') . '</h4>';
$table->width = '98%'; $table->width = '98%';
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$table->head_colspan[0] = 0; $table->head_colspan[0] = 0;
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox_tactical data'; $table->class = 'databox_tactical data';
@ -606,7 +607,7 @@ if (!empty ($id) && !$new_user) {
$table->head = array (); $table->head = array ();
$table->align = array (); $table->align = array ();
$table->style = array (); $table->style = array ();
if (!defined("METACONSOLE")){ if (!defined("METACONSOLE")) {
$table->style[0] = 'font-weight: bold'; $table->style[0] = 'font-weight: bold';
$table->style[1] = 'font-weight: bold'; $table->style[1] = 'font-weight: bold';
} }

View File

@ -338,7 +338,7 @@ if ($profiles === false) {
$img = html_print_image ("images/ok.png", true, array ("border" => 0)); $img = html_print_image ("images/ok.png", true, array ("border" => 0));
foreach ($profiles as $profile) { foreach ($profiles as $profile) {
$data['profiles'] = '<a href="index.php?sec='.$sec.'&amp;sec2=godmode/users/configure_profile&id='.$profile["id_perfil"].'&pure='.$pure.'"><b>'.$profile["name"].'</b></a>'; $data['profiles'] = '<a href="index.php?sec=' . $sec . '&amp;sec2=godmode/users/configure_profile&id='.$profile["id_perfil"].'&pure='.$pure.'"><b>'.$profile["name"].'</b></a>';
$data['IR'] = ($profile["incident_view"] ? $img : ''); $data['IR'] = ($profile["incident_view"] ? $img : '');
$data['IW'] = ($profile["incident_edit"] ? $img : ''); $data['IW'] = ($profile["incident_edit"] ? $img : '');
$data['IM'] = ($profile["incident_management"] ? $img : ''); $data['IM'] = ($profile["incident_management"] ? $img : '');

View File

@ -235,13 +235,14 @@ $table->data[0][4] = html_print_submit_button(__('Search'), 'search',
false, array('class' => 'sub search'), true); false, array('class' => 'sub search'), true);
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->width = '96%'; $table->width = '96%';
$form_filter = "<form class='filters_form' method='post'>"; $form_filter = "<form class='filters_form' method='post'>";
$form_filter .= html_print_table($table, true); $form_filter .= html_print_table($table, true);
$form_filter .= "</form>"; $form_filter .= "</form>";
ui_toggle($form_filter, __('Show Options')); ui_toggle($form_filter, __('Show Options'));
}else{ }
else {
$form_filter = "<form method='post'>"; $form_filter = "<form method='post'>";
$form_filter .= html_print_table($table, true); $form_filter .= html_print_table($table, true);
$form_filter .= "</form>"; $form_filter .= "</form>";
@ -250,13 +251,13 @@ if(defined('METACONSOLE')){
} }
$table = null; $table = null;
if(defined('METACONSOLE')){ if (defined('METACONSOLE')) {
$table->cellpadding = 0; $table->cellpadding = 0;
$table->cellspacing = 0; $table->cellspacing = 0;
$table->width = '100%'; $table->width = '100%';
$table->class = "databox"; $table->class = "databox";
} }
else{ else {
$table->cellpadding = 4; $table->cellpadding = 4;
$table->cellspacing = 4; $table->cellspacing = 4;
$table->width = '99%'; $table->width = '99%';
@ -430,7 +431,7 @@ foreach ($info as $user_id => $user_info) {
$data[4] = ""; $data[4] = "";
$result = db_get_all_rows_field_filter ("tusuario_perfil", "id_usuario", $user_id); $result = db_get_all_rows_field_filter ("tusuario_perfil", "id_usuario", $user_id);
if ($result !== false) { if ($result !== false) {
if (defined("METACONSOLE")){ if (defined("METACONSOLE")) {
$data[4] .= "<div width='100%'>"; $data[4] .= "<div width='100%'>";
foreach ($result as $row) { foreach ($result as $row) {
$data[4] .= "<div style='float:left;'>"; $data[4] .= "<div style='float:left;'>";
@ -444,7 +445,7 @@ foreach ($info as $user_id => $user_info) {
} }
$data[4] .= "</div>"; $data[4] .= "</div>";
} }
else{ else {
$data[4] .= "<table width='100%'>"; $data[4] .= "<table width='100%'>";
foreach ($result as $row) { foreach ($result as $row) {
$data[4] .= "<tr>"; $data[4] .= "<tr>";
@ -475,7 +476,7 @@ foreach ($info as $user_id => $user_info) {
if ($config["admin_can_delete_user"] && $user_info['id_user'] != $config['id_user']) { if ($config["admin_can_delete_user"] && $user_info['id_user'] != $config['id_user']) {
$data[6] .= "<a href='index.php?sec=".$sec."&sec2=godmode/users/user_list&user_del=1&pure=".$pure."&delete_user=".$user_info['id_user']."'>".html_print_image('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" .__('Deleting User'). " ". $user_info['id_user'] . ". " . __('Are you sure?') ."')) return false"))."</a>"; $data[6] .= "<a href='index.php?sec=".$sec."&sec2=godmode/users/user_list&user_del=1&pure=".$pure."&delete_user=".$user_info['id_user']."'>".html_print_image('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" .__('Deleting User'). " ". $user_info['id_user'] . ". " . __('Are you sure?') ."')) return false"))."</a>";
if (defined('METACONSOLE')) { if (defined('METACONSOLE')) {
$data[6] .= "<a href='index.php?sec=".$sec."&sec2=godmode/users/user_list&user_del=1&pure=".$pure."&delete_user=".$user_info['id_user']."&delete_all=1'>".html_print_image('images/cross_double.png', true, array ('title' => __('Delete from all consoles'), 'onclick' => "if (! confirm ('" .__('Deleting User %s from all consoles', $user_info['id_user']) . ". " . __('Are you sure?') ."')) return false"))."</a>"; $data[6] .= "<a href='index.php?sec=" . $sec . "&sec2=godmode/users/user_list&user_del=1&pure=".$pure."&delete_user=".$user_info['id_user']."&delete_all=1'>".html_print_image('images/cross_double.png', true, array ('title' => __('Delete from all consoles'), 'onclick' => "if (! confirm ('" .__('Deleting User %s from all consoles', $user_info['id_user']) . ". " . __('Are you sure?') ."')) return false"))."</a>";
} }
} }
else { else {

View File

@ -175,13 +175,14 @@ if ($get_module_detail) {
"width" => "230px"), "width" => "230px"),
); );
if($config['prominent_time']=='comparation'){ if($config['prominent_time']=='comparation') {
$columns["Time"] = array( $columns["Time"] = array(
"utimestamp", "utimestamp",
"modules_format_time", "modules_format_time",
"align" => "left", "align" => "left",
"width" => "50px"); "width" => "50px");
}else{ }
else {
$columns["Timestamp"] = array( $columns["Timestamp"] = array(
"utimestamp", "utimestamp",
"modules_format_timestamp", "modules_format_timestamp",
@ -499,10 +500,10 @@ if ($list_modules) {
$status_filter_sql = 'tagente_estado.estado = ' . $status_filter_monitor; $status_filter_sql = 'tagente_estado.estado = ' . $status_filter_monitor;
} }
if($status_module_group != -1){ if ($status_module_group != -1) {
$status_module_group_filter = 'id_module_group = ' . $status_module_group; $status_module_group_filter = 'id_module_group = ' . $status_module_group;
} }
else{ else {
$status_module_group_filter = 'id_module_group >= 0'; $status_module_group_filter = 'id_module_group >= 0';
} }
@ -886,8 +887,8 @@ if ($list_modules) {
$salida = "<span style='$style'>$salida</span>"; $salida = "<span style='$style'>$salida</span>";
} }
else { else {
if (is_numeric($module["datos"]) && !modules_is_string_type($module['id_tipo_modulo'])){ if (is_numeric($module["datos"]) && !modules_is_string_type($module['id_tipo_modulo'])) {
if ( $config["render_proc"] ){ if ( $config["render_proc"] ) {
switch($module["id_tipo_modulo"]) { switch($module["id_tipo_modulo"]) {
case 2: case 2:
case 6: case 6:
@ -904,11 +905,12 @@ if ($list_modules) {
$salida = format_numeric($module["datos"]); $salida = format_numeric($module["datos"]);
break; break;
} }
}else{ }
else {
$salida = format_numeric($module["datos"]); $salida = format_numeric($module["datos"]);
} }
// Show units ONLY in numeric data types // Show units ONLY in numeric data types
if (isset($module["unit"])){ if (isset($module["unit"])) {
$salida .= "&nbsp;" . '<i>'. io_safe_output($module["unit"]) . '</i>'; $salida .= "&nbsp;" . '<i>'. io_safe_output($module["unit"]) . '</i>';
} }
} }

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