mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Some missing functions
This commit is contained in:
parent
762ad3106d
commit
f88dceb4ec
@ -1330,6 +1330,9 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) {
|
|||||||
$notification->{'subject'} = safe_input('Discovery task ');
|
$notification->{'subject'} = safe_input('Discovery task ');
|
||||||
$notification->{'subject'} .= $self->{'task_data'}{'name'};
|
$notification->{'subject'} .= $self->{'task_data'}{'name'};
|
||||||
$notification->{'subject'} .= safe_input(' review pending');
|
$notification->{'subject'} .= safe_input(' review pending');
|
||||||
|
$notification->{'url'} = ui_get_full_url(
|
||||||
|
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist#'
|
||||||
|
);
|
||||||
|
|
||||||
$notification->{'mensaje'} = safe_input(
|
$notification->{'mensaje'} = safe_input(
|
||||||
'Discovery task (host&devices) \''.safe_output($self->{'task_data'}{'name'})
|
'Discovery task (host&devices) \''.safe_output($self->{'task_data'}{'name'})
|
||||||
|
@ -151,6 +151,7 @@ our @EXPORT = qw(
|
|||||||
get_enabled_servers
|
get_enabled_servers
|
||||||
dateTimeToTimestamp
|
dateTimeToTimestamp
|
||||||
get_user_agent
|
get_user_agent
|
||||||
|
ui_get_full_url
|
||||||
);
|
);
|
||||||
|
|
||||||
# ID of the different servers
|
# ID of the different servers
|
||||||
@ -2333,12 +2334,24 @@ sub get_user_agent {
|
|||||||
return $ua;
|
return $ua;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Returns 'valid' url relative to current pandora_console installation.
|
||||||
|
################################################################################
|
||||||
|
sub ui_get_full_url {
|
||||||
|
my ($pa_config, $url) = @_;
|
||||||
|
|
||||||
|
if (is_empty($pa_config->{'console_api_url'})) {
|
||||||
|
# Do not relativize if console_api_url is empty.
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $console_url = $pa_config->{'console_api_url'};
|
||||||
|
|
||||||
|
$console_url =~ s/include\/api.php$//;
|
||||||
|
|
||||||
|
return $console_url.$url;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user