mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop
This commit is contained in:
commit
981fb9fb33
@ -146,14 +146,22 @@ function clippy_start_page_homepage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function set_clippy_annoying() {
|
function set_clippy_annoying() {
|
||||||
checked = $('input[name=\'clippy_is_annoying\']').is(':checked');
|
var now = new Date();
|
||||||
|
var time = now.getTime();
|
||||||
|
var expireTime = time + 3600000 * 24 * 360 * 20;
|
||||||
|
now.setTime(expireTime);
|
||||||
|
|
||||||
|
checked = $('input[name=\'clippy_is_annoying\']')
|
||||||
|
.is(':checked');
|
||||||
//intro_homepage.exit();
|
//intro_homepage.exit();
|
||||||
|
|
||||||
if (checked) {
|
if (checked) {
|
||||||
document.cookie = 'clippy_is_annoying=1';
|
document.cookie = 'clippy_is_annoying=1;expires=' +
|
||||||
|
now.toGMTString() + ';';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.cookie = 'clippy_is_annoying=0';
|
document.cookie = 'clippy_is_annoying=0;expires=' +
|
||||||
|
now.toGMTString() + ';';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ if ($OSNAME eq "freebsd") {
|
|||||||
'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf',
|
'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf',
|
||||||
'icmp_checks' => 1,
|
'icmp_checks' => 1,
|
||||||
'networktimeout' => 2,
|
'networktimeout' => 2,
|
||||||
|
'snmp_timeout' => 2,
|
||||||
'recon_timing_template' => 3,
|
'recon_timing_template' => 3,
|
||||||
'PID' => '',
|
'PID' => '',
|
||||||
'quiet' => 1,
|
'quiet' => 1,
|
||||||
@ -47,6 +48,7 @@ if ($OSNAME eq "freebsd") {
|
|||||||
'pandora_path' => '/etc/pandora/pandora_server.conf',
|
'pandora_path' => '/etc/pandora/pandora_server.conf',
|
||||||
'icmp_checks' => 1,
|
'icmp_checks' => 1,
|
||||||
'networktimeout' => 2,
|
'networktimeout' => 2,
|
||||||
|
'snmp_timeout' => 2,
|
||||||
'recon_timing_template' => 3,
|
'recon_timing_template' => 3,
|
||||||
'PID' => '',
|
'PID' => '',
|
||||||
'quiet' => 1,
|
'quiet' => 1,
|
||||||
@ -181,7 +183,7 @@ sub responds_to_snmp($) {
|
|||||||
my ($target) = @_;
|
my ($target) = @_;
|
||||||
|
|
||||||
foreach my $community (@SNMP_COMMUNITIES) {
|
foreach my $community (@SNMP_COMMUNITIES) {
|
||||||
`snmpwalk -M/dev/null -r2 -t0.1 -v1 -On -Oe -c $community $target .0 2>/dev/null`;
|
`snmpwalk -M/dev/null -r2 -t$CONF{'snmp_timeout'} -v1 -On -Oe -c $community $target .0 2>/dev/null`;
|
||||||
if ($? == 0) {
|
if ($? == 0) {
|
||||||
$COMMUNITIES{$target} = $community;
|
$COMMUNITIES{$target} = $community;
|
||||||
return $community;
|
return $community;
|
||||||
@ -198,7 +200,7 @@ sub snmp_get($$$) {
|
|||||||
my ($target, $community, $oid) = @_;
|
my ($target, $community, $oid) = @_;
|
||||||
my @output;
|
my @output;
|
||||||
|
|
||||||
@output = `snmpwalk -M/dev/null -r2 -t0.1 -v1 -On -Oe -c $community $target $oid 2>/dev/null`;
|
@output = `snmpwalk -M/dev/null -r2 -t$CONF{'snmp_timeout'} -v1 -On -Oe -c $community $target $oid 2>/dev/null`;
|
||||||
return @output;
|
return @output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user