Merge remote-tracking branch 'origin/develop' into ent-6384-consola-visual-nuevo-elemento-interfaz-de-red
This commit is contained in:
commit
b8437bec79
extras
pandora_agents
unix
win32
pandora_console
DEBIAN
general
godmode
agentes
modules
servers
update_manager
images/status_sets/default
include
auth
config_process.phpconstants.phpfunctions_modules.phpfunctions_ui.phpfunctions_update_manager.phpjavascript
load_session.phpoperation
agentes
events
gis_maps
visual_console
pandora_server
|
@ -143,7 +143,7 @@ done
|
|||
|
||||
# Darwin dmg installer files
|
||||
echo "Updating DARWIN DMG files..."
|
||||
sed -i -e "/VERSION/s/=.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER"
|
||||
sed -i -e "/VERSION/s/=\"7.0NG.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER"
|
||||
sed -i -r "s/(version=\").*(\"\s+onConclusion=)/\1$VERSION\2/g" "$AGENT_DARWIN_DISTR"
|
||||
sed -i -r "s/(CFBundleVersion<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST"
|
||||
sed -i -r "s/(CFBundleShortVersionString<\/key>\s*<string>).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.750-201103
|
||||
Version: 7.0NG.750-201111
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.750-201103"
|
||||
pandora_version="7.0NG.750-201111"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -22,7 +22,7 @@ fi
|
|||
|
||||
# DMG package version
|
||||
if [ "$#" -ge 2 ]; then
|
||||
VERSION="7.0NG.750"
|
||||
VERSION="$2"
|
||||
else
|
||||
VERSION="7.0NG.750"
|
||||
fi
|
||||
|
@ -37,7 +37,7 @@ fi
|
|||
BUILD_DMG="$BUILD_PATH/build"
|
||||
BUILD_TMP="$BUILD_PATH/buildtmp"
|
||||
|
||||
FULLNAME="7.0NG.749"
|
||||
FULLNAME="$DMGNAME-$VERSION.dmg"
|
||||
echo "VERSION-"$VERSION" NAME-"$DMGNAME
|
||||
pushd .
|
||||
cd $LOCALINST
|
||||
|
|
|
@ -26,11 +26,13 @@ else
|
|||
`/usr/local/share/pandora_agent/inst_utilities/print_conf.pl /usr/local/share/pandora_agent/pandora_agent.conf remote_config $REMOTECFG`
|
||||
|
||||
# Create agent directories and files
|
||||
mkdir -p /usr/local/share/pandora_agent/collections
|
||||
mkdir -p /usr/local/share/pandora_agent/commands
|
||||
mkdir -p /usr/local/bin/
|
||||
mkdir -p /usr/local/share/man/man1/
|
||||
mkdir -p /usr/local/share/pandora_agent/collections/
|
||||
mkdir -p /usr/local/share/pandora_agent/commands/
|
||||
mkdir -p /etc/pandora/
|
||||
mkdir -p /var/spool/pandora/data_out
|
||||
mkdir -p /var/log/pandora
|
||||
mkdir -p /var/spool/pandora/data_out/
|
||||
mkdir -p /var/log/pandora/
|
||||
mv pandora_agent.conf /etc/pandora/
|
||||
touch /var/log/pandora/pandora_agent.log
|
||||
|
||||
|
@ -70,9 +72,9 @@ ln -s /usr/local/share/pandora_agent/collections /etc/pandora/collections
|
|||
|
||||
|
||||
# Copy manuals
|
||||
cp -f man/man1/pandora_agent.1.gz /usr/local/share/man/man1
|
||||
cp -f man/man1/pandora_agent.1.gz /usr/local/share/man/man1/
|
||||
chmod 644 /usr/local/share/man/man1/pandora_agent.1.gz
|
||||
cp -f man/man1/tentacle_client.1.gz /usr/local/share/man/man1
|
||||
cp -f man/man1/tentacle_client.1.gz /usr/local/share/man/man1/
|
||||
chmod 644 /usr/local/share/man/man1/tentacle_client.1.gz
|
||||
|
||||
# Create newsyslog entry
|
||||
|
|
|
@ -55,7 +55,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.750';
|
||||
use constant AGENT_BUILD => '201103';
|
||||
use constant AGENT_BUILD => '201111';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.750"
|
||||
PI_BUILD="201103"
|
||||
PI_BUILD="201111"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{201103}
|
||||
{201111}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.750(Build 201103)")
|
||||
#define PANDORA_VERSION ("7.0NG.750(Build 201111)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.750(Build 201103))"
|
||||
VALUE "ProductVersion", "(7.0NG.750(Build 201111))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.750-201103
|
||||
Version: 7.0NG.750-201111
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.750-201103"
|
||||
pandora_version="7.0NG.750-201111"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -114,6 +114,13 @@ foreach ($custom_fields as $field) {
|
|||
}
|
||||
}
|
||||
|
||||
// Connection lost alert.
|
||||
ui_require_css_file('register', 'include/styles/', true);
|
||||
ui_require_javascript_file('connection_check');
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
||||
// Get the custom icons.
|
||||
$docs_logo = ui_get_docs_logo();
|
||||
$support_logo = ui_get_support_logo();
|
||||
|
@ -450,7 +457,12 @@ if ($login_screen == 'logout') {
|
|||
echo '<div class="content_message_alert">';
|
||||
echo '<div class="text_message_alert">';
|
||||
echo '<h1>'.__('Logged out').'</h1>';
|
||||
echo '<p>'.__('Your session has ended. Please close your browser window to close this %s session.', get_product_name()).'</p>';
|
||||
if (empty($config['logout_msg']) === true) {
|
||||
echo '<p>'.__('Your session has ended. Please close your browser window to close this %s session.', get_product_name()).'</p>';
|
||||
} else {
|
||||
echo '<p>'.__($config['logout_msg']).'</p>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '<div class="button_message_alert">';
|
||||
html_print_submit_button('Ok', 'hide-login-logout', false);
|
||||
|
|
|
@ -148,7 +148,8 @@ if ($initial && users_is_admin()) {
|
|||
config_wiz_modal(
|
||||
false,
|
||||
true,
|
||||
(($registration === true) ? 'show_registration_wizard()' : null)
|
||||
(($registration === true) ? 'show_registration_wizard()' : null),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -159,7 +160,8 @@ if (!$config['disabled_newsletter']) {
|
|||
false,
|
||||
// Launch only if not being launch from 'initial'.
|
||||
!$initial,
|
||||
(($show_newsletter === true) ? 'force_run_newsletter()' : null)
|
||||
(($show_newsletter === false) ? 'force_run_newsletter()' : null),
|
||||
true
|
||||
);
|
||||
} else {
|
||||
if ($show_newsletter) {
|
||||
|
@ -167,7 +169,8 @@ if (!$config['disabled_newsletter']) {
|
|||
newsletter_wiz_modal(
|
||||
false,
|
||||
// Launch only if not being call from 'registration'.
|
||||
!$registration && !$initial
|
||||
!$registration && !$initial,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1340,115 +1340,117 @@ $(document).ready (function () {
|
|||
var type_name_selected = type_names[type_selected];
|
||||
var element = document.getElementById("module_type_help");
|
||||
var language = "<?php echo $config['language']; ?>" ;
|
||||
element.onclick = function (event) {
|
||||
if(type_name_selected == 'async_data' ||
|
||||
type_name_selected == 'async_proc' ||
|
||||
type_name_selected == 'async_string' ||
|
||||
type_name_selected == 'generic_proc'||
|
||||
type_name_selected == 'generic_data' ||
|
||||
type_name_selected == 'generic_data_inc' ||
|
||||
type_name_selected == 'generic_data_inc_abs'||
|
||||
type_name_selected == 'generic_data_string' ||
|
||||
type_name_selected == 'keep_alive'
|
||||
){
|
||||
if (language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_icmp' ||
|
||||
type_name_selected == 'remote_icmp_proc'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_snmp_string' ||
|
||||
type_name_selected == 'remote_snmp_proc' ||
|
||||
type_name_selected == 'remote_snmp_inc' ||
|
||||
type_name_selected == 'remote_snmp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_tcp_string' ||
|
||||
type_name_selected == 'remote_tcp_proc' ||
|
||||
type_name_selected == 'remote_tcp_inc' ||
|
||||
type_name_selected == 'remote_tcp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
if (typeof element !== 'undefined' && element !== null) {
|
||||
element.onclick = function (event) {
|
||||
if(type_name_selected == 'async_data' ||
|
||||
type_name_selected == 'async_proc' ||
|
||||
type_name_selected == 'async_string' ||
|
||||
type_name_selected == 'generic_proc'||
|
||||
type_name_selected == 'generic_data' ||
|
||||
type_name_selected == 'generic_data_inc' ||
|
||||
type_name_selected == 'generic_data_inc_abs'||
|
||||
type_name_selected == 'generic_data_string' ||
|
||||
type_name_selected == 'keep_alive'
|
||||
){
|
||||
if (language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
}
|
||||
if(type_name_selected == 'web_data' ||
|
||||
type_name_selected == 'web_proc' ||
|
||||
type_name_selected == 'web_content_data' ||
|
||||
type_name_selected == 'web_content_string'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_icmp' ||
|
||||
type_name_selected == 'remote_icmp_proc'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_snmp_string' ||
|
||||
type_name_selected == 'remote_snmp_proc' ||
|
||||
type_name_selected == 'remote_snmp_inc' ||
|
||||
type_name_selected == 'remote_snmp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_tcp_string' ||
|
||||
type_name_selected == 'remote_tcp_proc' ||
|
||||
type_name_selected == 'remote_tcp_inc' ||
|
||||
type_name_selected == 'remote_tcp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
}
|
||||
if(type_name_selected == 'web_data' ||
|
||||
type_name_selected == 'web_proc' ||
|
||||
type_name_selected == 'web_content_data' ||
|
||||
type_name_selected == 'web_content_string'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -386,121 +386,124 @@ $next_row++;
|
|||
console.log(type_name_selected);
|
||||
var element = document.getElementById("module_type_help");
|
||||
var language = "<?php echo $config['language']; ?>" ;
|
||||
element.onclick = function (event) {
|
||||
if(type_name_selected == 'async_data' ||
|
||||
type_name_selected == 'async_proc' ||
|
||||
type_name_selected == 'async_string' ||
|
||||
type_name_selected == 'generic_proc'||
|
||||
type_name_selected == 'generic_data' ||
|
||||
type_name_selected == 'generic_data_inc' ||
|
||||
type_name_selected == 'generic_data_inc_abs'||
|
||||
type_name_selected == 'generic_data_string' ||
|
||||
type_name_selected == 'keep_alive'
|
||||
){
|
||||
if (language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (typeof element !== 'undefined' && element !== null) {
|
||||
element.onclick = function (event) {
|
||||
if(type_name_selected == 'async_data' ||
|
||||
type_name_selected == 'async_proc' ||
|
||||
type_name_selected == 'async_string' ||
|
||||
type_name_selected == 'generic_proc'||
|
||||
type_name_selected == 'generic_data' ||
|
||||
type_name_selected == 'generic_data_inc' ||
|
||||
type_name_selected == 'generic_data_inc_abs'||
|
||||
type_name_selected == 'generic_data_string' ||
|
||||
type_name_selected == 'keep_alive'
|
||||
){
|
||||
if (language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_icmp' ||
|
||||
type_name_selected == 'remote_icmp_proc'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_snmp_string' ||
|
||||
type_name_selected == 'remote_snmp_proc' ||
|
||||
type_name_selected == 'remote_snmp_inc' ||
|
||||
type_name_selected == 'remote_snmp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_tcp_string' ||
|
||||
type_name_selected == 'remote_tcp_proc' ||
|
||||
type_name_selected == 'remote_tcp_inc' ||
|
||||
type_name_selected == 'remote_tcp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'web_data' ||
|
||||
type_name_selected == 'web_proc' ||
|
||||
type_name_selected == 'web_content_data' ||
|
||||
type_name_selected == 'web_content_string'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if(type_name_selected == 'remote_icmp' ||
|
||||
type_name_selected == 'remote_icmp_proc'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_snmp_string' ||
|
||||
type_name_selected == 'remote_snmp_proc' ||
|
||||
type_name_selected == 'remote_snmp_inc' ||
|
||||
type_name_selected == 'remote_snmp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'remote_tcp_string' ||
|
||||
type_name_selected == 'remote_tcp_proc' ||
|
||||
type_name_selected == 'remote_tcp_inc' ||
|
||||
type_name_selected == 'remote_tcp'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(type_name_selected == 'web_data' ||
|
||||
type_name_selected == 'web_proc' ||
|
||||
type_name_selected == 'web_content_data' ||
|
||||
type_name_selected == 'web_content_string'
|
||||
){
|
||||
if(language == 'es'){
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(
|
||||
'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules',
|
||||
'_blank',
|
||||
'width=800,height=600'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (type_name_selected.match(/_string$/) == null) {
|
||||
// Numeric types
|
||||
|
|
|
@ -91,8 +91,20 @@ foreach ($servers as $server) {
|
|||
|
||||
// Status
|
||||
$data[1] = ui_print_status_image(STATUS_SERVER_OK, '', true);
|
||||
if (($server['status'] == 0) || (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2)) {
|
||||
$data[1] = ui_print_status_image(STATUS_SERVER_DOWN, '', true);
|
||||
if ($server['status'] == -1) {
|
||||
$data[1] = ui_print_status_image(
|
||||
STATUS_SERVER_CRASH,
|
||||
__('Server has crashed.'),
|
||||
true
|
||||
);
|
||||
} else if (($server['status'] == 0)
|
||||
|| (($date - time_w_fixed_tz($server['keepalive'])) > ($server['server_keepalive']) * 2)
|
||||
) {
|
||||
$data[1] = ui_print_status_image(
|
||||
STATUS_SERVER_DOWN,
|
||||
__('Server is stopped.'),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Type
|
||||
|
|
|
@ -44,6 +44,13 @@ if (! check_acl($config['id_user'], 0, 'PM')
|
|||
return;
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message(
|
||||
__('The license has expired. Please contact Artica at info@artica.es')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
$baseurl = ui_get_full_url(false, false, false, false);
|
||||
|
||||
$current_package = db_get_value(
|
||||
|
|
|
@ -94,6 +94,13 @@ if ($upload_max_filesize < $PHPupload_max_filesize_min) {
|
|||
$php_settings_fine++;
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message(
|
||||
__('The license has expired. Please contact Artica at info@artica.es')
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify registry.
|
||||
if (update_manager_verify_registration() === false) {
|
||||
ui_require_css_file('register');
|
||||
|
|
Binary file not shown.
After ![]() (image error) Size: 5.2 KiB |
Binary file not shown.
After ![]() (image error) Size: 6.6 KiB |
|
@ -239,8 +239,7 @@ function process_user_login_remote($login, $pass, $api=false)
|
|||
|
||||
// Unknown authentication method
|
||||
default:
|
||||
$config['auth_error'] = 'User not found in database
|
||||
or incorrect password';
|
||||
$config['auth_error'] = 'User not found in database or incorrect password';
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC201103';
|
||||
$build_version = 'PC201111';
|
||||
$pandora_version = 'v7.0NG.750';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -310,7 +310,7 @@ define('STATUS_ALERT_DISABLED', 'alert_disabled.png');
|
|||
// For servers.
|
||||
define('STATUS_SERVER_OK', 'server_ok.png');
|
||||
define('STATUS_SERVER_DOWN', 'server_down.png');
|
||||
|
||||
define('STATUS_SERVER_CRASH', 'server_crash.png');
|
||||
|
||||
|
||||
// Status images (ball).
|
||||
|
@ -336,6 +336,7 @@ define('STATUS_ALERT_DISABLED_BALL', 'alert_disabled_ball.png');
|
|||
// For servers.
|
||||
define('STATUS_SERVER_OK_BALL', 'server_ok_ball.png');
|
||||
define('STATUS_SERVER_DOWN_BALL', 'server_down_ball.png');
|
||||
define('STATUS_SERVER_CRASH_BALL', 'server_crash_ball.png');
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2494,6 +2494,8 @@ function modules_get_color_status($status, $force_module=false)
|
|||
case STATUS_AGENT_CRITICAL:
|
||||
case STATUS_MODULE_CRITICAL_BALL:
|
||||
case STATUS_AGENT_CRITICAL_BALL:
|
||||
case STATUS_SERVER_CRASH:
|
||||
case STATUS_SERVER_CRASH_BALL:
|
||||
return COL_CRITICAL;
|
||||
|
||||
case AGENT_MODULE_STATUS_WARNING:
|
||||
|
|
|
@ -2762,6 +2762,7 @@ function get_shape_status_set($type)
|
|||
// Small squares.
|
||||
case STATUS_SERVER_OK:
|
||||
case STATUS_SERVER_DOWN:
|
||||
case STATUS_SERVER_CRASH:
|
||||
$return = ['class' => 'status_small_squares'];
|
||||
break;
|
||||
|
||||
|
@ -2773,6 +2774,9 @@ function get_shape_status_set($type)
|
|||
case STATUS_AGENT_OK_BALL:
|
||||
case STATUS_AGENT_NO_DATA_BALL:
|
||||
case STATUS_AGENT_NO_MONITORS_BALL:
|
||||
case STATUS_SERVER_OK_BALL:
|
||||
case STATUS_SERVER_DOWN_BALL:
|
||||
case STATUS_SERVER_CRASH_BALL:
|
||||
$return = ['class' => 'status_balls'];
|
||||
break;
|
||||
|
||||
|
|
|
@ -73,6 +73,24 @@ function update_manager_verify_trial()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the trial license is not expired.
|
||||
*
|
||||
* @return boolean true if the trial license is expired, false otherwise.
|
||||
*/
|
||||
function update_manager_verify_license_expired()
|
||||
{
|
||||
global $config;
|
||||
|
||||
$current_date = date('Ymd');
|
||||
if (isset($config['license_expiry_date']) && $current_date >= $config['license_expiry_date']) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses responses from configuration wizard.
|
||||
*
|
||||
|
@ -454,13 +472,20 @@ function registration_wiz_process()
|
|||
function registration_wiz_modal(
|
||||
$return=false,
|
||||
$launch=true,
|
||||
$callback=false
|
||||
$callback=false,
|
||||
$return_message=false
|
||||
) {
|
||||
global $config;
|
||||
$output = '';
|
||||
|
||||
// Do not show the wizard for trial licenses.
|
||||
if (update_manager_verify_trial()) {
|
||||
ui_print_info_message('Your license is trial. Please contact Artica at info@artica.es for a valid license', '', $return_message);
|
||||
return '';
|
||||
}
|
||||
|
||||
if (update_manager_verify_license_expired()) {
|
||||
ui_print_error_message('The license has expired. Please contact Artica at info@artica.es', '', $return_message);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
/**
|
||||
* -------------------------------------
|
||||
* Connection Check
|
||||
* --------------------------------------
|
||||
*/
|
||||
|
||||
checkConnection(1);
|
||||
|
||||
/**
|
||||
* Performs connection tests every minutes and add connection listeners
|
||||
* @param {integer} time in minutes
|
||||
*/
|
||||
|
||||
function checkConnection(minutes) {
|
||||
var cicle = minutes * 60 * 1000;
|
||||
var checkConnection = setInterval(handleConnection, cicle);
|
||||
|
||||
// Connection listeters.
|
||||
window.addEventListener("online", handleConnection);
|
||||
window.addEventListener("offline", handleConnection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle connection status test.
|
||||
*
|
||||
* Test conectivity with server and shows modal message.
|
||||
*/
|
||||
function handleConnection() {
|
||||
var connected;
|
||||
var msg = "online";
|
||||
|
||||
if (navigator.onLine) {
|
||||
isReachable(getServerUrl())
|
||||
.then(function(online) {
|
||||
if (online) {
|
||||
// handle online status
|
||||
connected = true;
|
||||
showConnectionMessage(connected, msg);
|
||||
} else {
|
||||
connected = false;
|
||||
msg = "No connectivity with server";
|
||||
showConnectionMessage(connected, msg);
|
||||
}
|
||||
})
|
||||
.catch(function(err) {
|
||||
connected = false;
|
||||
msg = err;
|
||||
showConnectionMessage(connected, msg);
|
||||
});
|
||||
} else {
|
||||
// handle offline status
|
||||
connected = false;
|
||||
msg = "Connection offline";
|
||||
showConnectionMessage(connected, msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test server reachibilty and get response.
|
||||
*
|
||||
* @param {String} url
|
||||
*
|
||||
* Return {promise}
|
||||
*/
|
||||
function isReachable(url) {
|
||||
/**
|
||||
* Note: fetch() still "succeeds" for 404s on subdirectories,
|
||||
* which is ok when only testing for domain reachability.
|
||||
*
|
||||
* Example:
|
||||
* https://google.com/noexist does not throw
|
||||
* https://noexist.com/noexist does throw
|
||||
*/
|
||||
return fetch(url, { method: "HEAD", mode: "no-cors" })
|
||||
.then(function(resp) {
|
||||
return resp && (resp.ok || resp.type === "opaque");
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.warn("[conn test failure]:", error);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets server origin url
|
||||
*/
|
||||
function getServerUrl() {
|
||||
var server_url;
|
||||
|
||||
server_url = window.location.origin;
|
||||
|
||||
return server_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows or hide connection infoMessage.
|
||||
*
|
||||
* @param {bool} conn
|
||||
* @param {string} msg
|
||||
*/
|
||||
function showConnectionMessage(conn = true, msg = "") {
|
||||
var data = {};
|
||||
if (conn) {
|
||||
$("div#message_dialog_connection")
|
||||
.closest(".ui-dialog-content")
|
||||
.dialog("close");
|
||||
} else {
|
||||
data.title = "Connection with server has been lost";
|
||||
data.text = "Connection status: " + msg;
|
||||
|
||||
infoMessage(data, "message_dialog_connection");
|
||||
}
|
||||
}
|
||||
|
||||
function infoMessage(data, idMsg) {
|
||||
var title = data.title;
|
||||
var err_messge = data.text;
|
||||
|
||||
if (idMsg == null) {
|
||||
idMsg = uniqId();
|
||||
}
|
||||
|
||||
if ($("#" + idMsg).length === 0) {
|
||||
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
|
||||
$("#" + idMsg).empty();
|
||||
}
|
||||
|
||||
$("#err_msg").empty();
|
||||
$("#err_msg").html("\n\n" + err_messge);
|
||||
|
||||
$("#" + idMsg)
|
||||
.dialog({
|
||||
height: 250,
|
||||
width: 528,
|
||||
opacity: 1,
|
||||
modal: true,
|
||||
position: {
|
||||
my: "center",
|
||||
at: "center",
|
||||
of: window,
|
||||
collision: "fit"
|
||||
},
|
||||
title: data.title,
|
||||
buttons: [
|
||||
{
|
||||
class:
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: "Retry",
|
||||
click: function(e) {
|
||||
handleConnection();
|
||||
}
|
||||
},
|
||||
{
|
||||
class:
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
||||
text: "Close",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
open: function(event, ui) {
|
||||
$(".ui-widget-overlay").addClass("error-modal-opened");
|
||||
},
|
||||
close: function(event, ui) {
|
||||
$(".ui-widget-overlay").removeClass("error-modal-opened");
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
|
@ -1930,120 +1930,3 @@ function ajaxRequest(id, settings) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* -------------------------------------
|
||||
* Connection Check
|
||||
* --------------------------------------
|
||||
*/
|
||||
|
||||
checkConnection(1);
|
||||
|
||||
/**
|
||||
* Performs connection tests every minutes and add connection listeners
|
||||
* @param {integer} time in minutes
|
||||
*/
|
||||
|
||||
function checkConnection(minutes) {
|
||||
var cicle = minutes * 60 * 1000;
|
||||
var checkConnection = setInterval(handleConnection, cicle);
|
||||
|
||||
// Connection listeters.
|
||||
window.addEventListener("online", handleConnection);
|
||||
window.addEventListener("offline", handleConnection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle connection status test.
|
||||
*
|
||||
* Test conectivity with server and shows modal message.
|
||||
*/
|
||||
function handleConnection() {
|
||||
var connected;
|
||||
var msg = "online";
|
||||
|
||||
if (navigator.onLine) {
|
||||
isReachable(getServerUrl())
|
||||
.then(function(online) {
|
||||
if (online) {
|
||||
// handle online status
|
||||
connected = true;
|
||||
showConnectionMessage(connected, msg);
|
||||
} else {
|
||||
connected = false;
|
||||
msg = "No connectivity with server";
|
||||
showConnectionMessage(connected, msg);
|
||||
}
|
||||
})
|
||||
.catch(function(err) {
|
||||
connected = false;
|
||||
msg = err;
|
||||
showConnectionMessage(connected, msg);
|
||||
});
|
||||
} else {
|
||||
// handle offline status
|
||||
connected = false;
|
||||
msg = "Connection offline";
|
||||
showConnectionMessage(connected, msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test server reachibilty and get response.
|
||||
*
|
||||
* @param {String} url
|
||||
*
|
||||
* Return {promise}
|
||||
*/
|
||||
function isReachable(url) {
|
||||
/**
|
||||
* Note: fetch() still "succeeds" for 404s on subdirectories,
|
||||
* which is ok when only testing for domain reachability.
|
||||
*
|
||||
* Example:
|
||||
* https://google.com/noexist does not throw
|
||||
* https://noexist.com/noexist does throw
|
||||
*/
|
||||
return fetch(url, { method: "HEAD", mode: "no-cors" })
|
||||
.then(function(resp) {
|
||||
return resp && (resp.ok || resp.type === "opaque");
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.warn("[conn test failure]:", error);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets server origin url
|
||||
*/
|
||||
function getServerUrl() {
|
||||
var server_url;
|
||||
|
||||
try {
|
||||
server_url = get_php_value("homeurl");
|
||||
} catch (SyntaxError) {
|
||||
console.warn("Pandora homeurl cannot be found.");
|
||||
server_url = $("#hidden-homeurl").val();
|
||||
}
|
||||
return server_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows or hide connection infoMessage.
|
||||
*
|
||||
* @param {bool} conn
|
||||
* @param {string} msg
|
||||
*/
|
||||
function showConnectionMessage(conn = true, msg = "") {
|
||||
var data = {};
|
||||
if (conn) {
|
||||
$("div#message_dialog_connection")
|
||||
.closest(".ui-dialog-content")
|
||||
.dialog("close");
|
||||
} else {
|
||||
data.title = "Connection with server has been lost";
|
||||
data.text = "Connection status: " + msg;
|
||||
|
||||
infoMessage(data, "message_dialog_connection");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -494,61 +494,3 @@ function generalShowMsg(data, idMsg) {
|
|||
]
|
||||
});
|
||||
}
|
||||
|
||||
function infoMessage(data, idMsg) {
|
||||
var title = data.title;
|
||||
var err_messge = data.text;
|
||||
|
||||
if (idMsg == null) {
|
||||
idMsg = uniqId();
|
||||
}
|
||||
|
||||
if ($("#" + idMsg).length === 0) {
|
||||
$("body").append('<div title="' + title + '" id="' + idMsg + '"></div>');
|
||||
$("#" + idMsg).empty();
|
||||
}
|
||||
|
||||
$("#err_msg").empty();
|
||||
$("#err_msg").html("\n\n" + err_messge);
|
||||
|
||||
$("#" + idMsg)
|
||||
.dialog({
|
||||
height: 250,
|
||||
width: 528,
|
||||
opacity: 1,
|
||||
modal: true,
|
||||
position: {
|
||||
my: "center",
|
||||
at: "center",
|
||||
of: window,
|
||||
collision: "fit"
|
||||
},
|
||||
title: data.title,
|
||||
buttons: [
|
||||
{
|
||||
class:
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next",
|
||||
text: "Retry",
|
||||
click: function(e) {
|
||||
handleConnection();
|
||||
}
|
||||
},
|
||||
{
|
||||
class:
|
||||
"ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel",
|
||||
text: "Close",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
open: function(event, ui) {
|
||||
$(".ui-widget-overlay").addClass("error-modal-opened");
|
||||
},
|
||||
close: function(event, ui) {
|
||||
$(".ui-widget-overlay").removeClass("error-modal-opened");
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
|
|
@ -64,14 +64,23 @@ function pandora_session_close()
|
|||
function pandora_session_read($session_id)
|
||||
{
|
||||
$session_id = addslashes($session_id);
|
||||
$session_data = db_get_value(
|
||||
'data',
|
||||
'tsessions_php',
|
||||
'id_session',
|
||||
$session_id
|
||||
|
||||
// Do not use SQL cache here.
|
||||
$session_data = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT data
|
||||
FROM `tsessions_php` WHERE id_session="%s"',
|
||||
$session_id
|
||||
),
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
if (!empty($session_data)) {
|
||||
if (is_array($session_data) === true) {
|
||||
$session_data = $session_data[0]['data'];
|
||||
}
|
||||
|
||||
if (empty($session_data) === false) {
|
||||
return $session_data;
|
||||
} else {
|
||||
return '';
|
||||
|
@ -90,7 +99,6 @@ function pandora_session_read($session_id)
|
|||
function pandora_session_write($session_id, $data)
|
||||
{
|
||||
$session_id = addslashes($session_id);
|
||||
|
||||
if (is_ajax()) {
|
||||
// Avoid session upadte while processing ajax responses - notifications.
|
||||
if (get_parameter('check_new_notifications', false)) {
|
||||
|
@ -101,18 +109,22 @@ function pandora_session_write($session_id, $data)
|
|||
$values = [];
|
||||
$values['last_active'] = time();
|
||||
|
||||
if (!empty($data)) {
|
||||
if (empty($data) === false) {
|
||||
$values['data'] = addslashes($data);
|
||||
}
|
||||
|
||||
$session_exists = (bool) db_get_value(
|
||||
'COUNT(id_session)',
|
||||
'tsessions_php',
|
||||
'id_session',
|
||||
$session_id
|
||||
// Do not use SQL cache here.
|
||||
$session_exists = db_get_all_rows_sql(
|
||||
sprintf(
|
||||
'SELECT id_session
|
||||
FROM `tsessions_php` WHERE id_session="%s"',
|
||||
$session_id
|
||||
),
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
if (!$session_exists) {
|
||||
if ($session_exists === false) {
|
||||
$values['id_session'] = $session_id;
|
||||
$retval_write = db_process_sql_insert('tsessions_php', $values);
|
||||
} else {
|
||||
|
@ -198,11 +210,69 @@ function pandora_session_gc($max_lifetime=300)
|
|||
}
|
||||
|
||||
|
||||
$result_handler = session_set_save_handler(
|
||||
'pandora_session_open',
|
||||
'pandora_session_close',
|
||||
'pandora_session_read',
|
||||
'pandora_session_write',
|
||||
'pandora_session_destroy',
|
||||
'pandora_session_gc'
|
||||
);
|
||||
/**
|
||||
* Enables custom session handlers.
|
||||
*
|
||||
* @return boolean Context changed or not.
|
||||
*/
|
||||
function enable_session_handlers()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if ($config['_using_pandora_sessionhandlers'] !== true) {
|
||||
if (session_status() !== PHP_SESSION_NONE) {
|
||||
// Close previous version.
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
$sesion_handler = session_set_save_handler(
|
||||
'pandora_session_open',
|
||||
'pandora_session_close',
|
||||
'pandora_session_read',
|
||||
'pandora_session_write',
|
||||
'pandora_session_destroy',
|
||||
'pandora_session_gc'
|
||||
);
|
||||
|
||||
session_start();
|
||||
|
||||
// Restore previous session.
|
||||
$config['_using_pandora_sessionhandlers'] = true;
|
||||
return $sesion_handler;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Disables custom session handlers.
|
||||
*
|
||||
* @param string|null $id_session Force swap to target session.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function disable_session_handlers($id_session=null)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (session_status() !== PHP_SESSION_NONE) {
|
||||
// Close previous version.
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
$ss = new SessionHandler();
|
||||
session_set_save_handler($ss, true);
|
||||
|
||||
if ($id_session !== null) {
|
||||
session_id($id_session);
|
||||
}
|
||||
|
||||
session_start();
|
||||
|
||||
$config['_using_pandora_sessionhandlers'] = false;
|
||||
}
|
||||
|
||||
|
||||
// Always enable session handler.
|
||||
$result_handler = enable_session_handlers();
|
||||
|
|
|
@ -222,7 +222,7 @@ echo '<head>'."\n";
|
|||
ob_start('ui_process_page_head');
|
||||
|
||||
// Enterprise main.
|
||||
enterprise_include('index.php');
|
||||
enterprise_include_once('index.php');
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'var dispositivo = navigator.userAgent.toLowerCase();';
|
||||
|
@ -273,6 +273,7 @@ if (strlen($search) > 0) {
|
|||
}
|
||||
|
||||
// Login process.
|
||||
enterprise_include_once('include/auth/saml.php');
|
||||
if (! isset($config['id_user'])) {
|
||||
// Clear error messages.
|
||||
unset($_COOKIE['errormsg']);
|
||||
|
@ -395,24 +396,33 @@ if (! isset($config['id_user'])) {
|
|||
$nick_in_db = $_SESSION['prepared_login_da']['id_user'];
|
||||
$expired_pass = false;
|
||||
} else if (($config['auth'] == 'saml') && ($login_button_saml)) {
|
||||
$saml_configured = include_once $config['homedir'].'/'.ENTERPRISE_DIR.'/include/auth/saml.php';
|
||||
|
||||
if (!$saml_configured) {
|
||||
include_once 'general/noaccesssaml.php';
|
||||
}
|
||||
|
||||
$saml_user_id = saml_process_user_login();
|
||||
|
||||
$saml_user_id = enterprise_hook('saml_process_user_login');
|
||||
if (!$saml_user_id) {
|
||||
include_once 'general/noaccesssaml.php';
|
||||
}
|
||||
$login_failed = true;
|
||||
include_once 'general/login_page.php';
|
||||
while (@ob_end_flush()) {
|
||||
// Dumping...
|
||||
continue;
|
||||
}
|
||||
|
||||
exit('</html>');
|
||||
}
|
||||
|
||||
$nick_in_db = $saml_user_id;
|
||||
if (!$nick_in_db) {
|
||||
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
|
||||
$as = new SimpleSAML_Auth_Simple($config['saml_source']);
|
||||
$as->logout();
|
||||
if ($config['auth'] === 'saml') {
|
||||
enterprise_hook('saml_logout');
|
||||
}
|
||||
|
||||
if (session_status() !== PHP_SESSION_NONE) {
|
||||
$_SESSION = [];
|
||||
session_destroy();
|
||||
header_remove('Set-Cookie');
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
}
|
||||
|
||||
// Process logout.
|
||||
include 'general/logoff.php';
|
||||
}
|
||||
} else {
|
||||
// process_user_login is a virtual function which should be defined in each auth file.
|
||||
|
@ -735,7 +745,7 @@ if (! isset($config['id_user'])) {
|
|||
|
||||
exit('</html>');
|
||||
}
|
||||
} else {
|
||||
} else if (isset($_GET['bye']) === false) {
|
||||
// There is no user connected.
|
||||
if ($config['enterprise_installed']) {
|
||||
enterprise_include_once('include/functions_reset_pass.php');
|
||||
|
@ -953,6 +963,10 @@ if (! isset($config['id_user'])) {
|
|||
}
|
||||
|
||||
exit('</html>');
|
||||
} else {
|
||||
if ($config['auth'] === 'saml') {
|
||||
enterprise_hook('saml_login_status_verifier');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -964,19 +978,19 @@ if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
|||
|
||||
// Log off.
|
||||
if (isset($_GET['bye'])) {
|
||||
include 'general/logoff.php';
|
||||
$iduser = $_SESSION['id_usuario'];
|
||||
|
||||
if ($config['auth'] === 'saml') {
|
||||
enterprise_hook('saml_logout');
|
||||
}
|
||||
|
||||
$_SESSION = [];
|
||||
session_destroy();
|
||||
header_remove('Set-Cookie');
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
|
||||
if ($config['auth'] == 'saml') {
|
||||
include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php';
|
||||
$as = new SimpleSAML_Auth_Simple('PandoraFMS');
|
||||
$as->logout();
|
||||
}
|
||||
// Process logout.
|
||||
include 'general/logoff.php';
|
||||
|
||||
while (@ob_end_flush()) {
|
||||
// Dumping...
|
||||
|
@ -1255,8 +1269,8 @@ echo '</div>';
|
|||
echo '<div id="um_msg_receiver">';
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Connection lost alert.
|
||||
ui_require_javascript_file('connection_check');
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.750';
|
||||
$build = '201103';
|
||||
$build = '201111';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -86,6 +86,7 @@ ui_require_css_file('register', 'include/styles/', true);
|
|||
// Connection lost alert.
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_require_javascript_file('connection_check');
|
||||
ui_print_message_dialog(
|
||||
$conn_title,
|
||||
$conn_text,
|
||||
|
|
|
@ -61,6 +61,13 @@ echo '</head>';
|
|||
echo "<body style='background-color: #494949; max-width: 550px; max-height: 400px; margin-top:40px;'>";
|
||||
echo "<h1 class='modalheaderh1'>".__('Sound console').'</h1>';
|
||||
|
||||
// Connection lost alert.
|
||||
ui_require_css_file('register', 'include/styles/', true);
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_require_javascript_file('connection_check');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
||||
$table = new StdClass;
|
||||
$table->width = '100%';
|
||||
$table->styleTable = 'padding-left:16px; padding-right:16px; padding-top:16px;';
|
||||
|
|
|
@ -273,8 +273,10 @@ if ($layers != false) {
|
|||
gis_activate_ajax_refresh($layers, $timestampLastOperation, 1, $idMap);
|
||||
|
||||
// Connection lost alert.
|
||||
ui_require_css_file('register', 'include/styles/', true);
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_require_javascript_file('connection_check');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ html_print_input_hidden('homeurl', $config['homeurl']);
|
|||
$url_css_modal = ui_get_full_url('include/styles/register.css', false, false, false);
|
||||
echo '<link rel="stylesheet" href="'.$url_css_modal.'" type="text/css" />';
|
||||
// Connection lost alert.
|
||||
ui_require_javascript_file('connection_check', 'include/javascript/', true);
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
@ -157,10 +158,6 @@ echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of
|
|||
echo '<div id="qrcode_container_image"></div>';
|
||||
echo '</div>';
|
||||
|
||||
// Connection lost alert.
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_alert($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
||||
ui_require_jquery_file('countdown', 'include/javascript/', true);
|
||||
ui_require_javascript_file('wz_jsgraphics', 'include/javascript/', true);
|
||||
|
|
|
@ -29,11 +29,10 @@ if (file_exists(ENTERPRISE_DIR.'/include/functions_login.php')) {
|
|||
require_once $config['homedir'].'/vendor/autoload.php';
|
||||
|
||||
ui_require_css_file('visual_maps');
|
||||
ui_require_css_file('register');
|
||||
|
||||
html_print_input_hidden('homeurl', $config['homeurl']);
|
||||
ui_require_css_file('register', 'include/styles/', true);
|
||||
|
||||
// Connection lost alert.
|
||||
ui_require_javascript_file('connection_check', 'include/javascript/', true);
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
@ -140,10 +139,6 @@ echo '<div style="display: none;" id="qrcode_container" title="'.__('QR code of
|
|||
echo '<div id="qrcode_container_image"></div>';
|
||||
echo '</div>';
|
||||
|
||||
// Connection lost alert.
|
||||
$conn_title = __('Connection with server has been lost');
|
||||
$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.');
|
||||
ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png');
|
||||
|
||||
// Check groups can access user.
|
||||
$aclUserGroups = [];
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.750-201103
|
||||
Version: 7.0NG.750-201111
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.750-201103"
|
||||
pandora_version="7.0NG.750-201111"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -771,7 +771,7 @@ sub main() {
|
|||
die("Server thread crashed.") unless (check_server_threads() == 1);
|
||||
|
||||
db_do ($DBH,
|
||||
"UPDATE tserver SET status = 0
|
||||
"UPDATE tserver SET status = -1
|
||||
WHERE UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(keepalive) > 2*server_keepalive"
|
||||
);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.750";
|
||||
my $pandora_build = "201103";
|
||||
my $pandora_build = "201111";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.750";
|
||||
my $pandora_build = "201103";
|
||||
my $pandora_build = "201111";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.750
|
||||
%define release 201103
|
||||
%define release 201111
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.750"
|
||||
PI_BUILD="201103"
|
||||
PI_BUILD="201111"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.750 PS201103";
|
||||
my $version = "7.0NG.750 PS201111";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.750 PS201103";
|
||||
my $version = "7.0NG.750 PS201111";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue