Merge branch 'ent-9645-Implementar-licencias-independientes-discovery-SAP' into 'develop'

implemented per-task sap license

See merge request artica/pandorafms!5536
This commit is contained in:
Daniel Rodriguez 2023-02-14 16:26:40 +00:00
commit aa43f2cf44
2 changed files with 8 additions and 8 deletions

View File

@ -463,10 +463,6 @@ function config_update_config()
if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) { if (config_update_value('ipam_ocuppied_warning_treshold', get_parameter('ipam_ocuppied_warning_treshold'), true) === false) {
$error_update[] = __('Ipam Ocuppied Manager Warning'); $error_update[] = __('Ipam Ocuppied Manager Warning');
} }
if (config_update_value('sap_license', get_parameter('sap_license'), true) === false) {
$error_update[] = __('SAP/R3 Plugin Licence');
}
} }
break; break;

View File

@ -221,10 +221,14 @@ sub data_consumer ($$) {
if ($task->{'type'} == DISCOVERY_APP_SAP) { if ($task->{'type'} == DISCOVERY_APP_SAP) {
# SAP TASK, retrieve license. # SAP TASK, retrieve license.
if (defined($task->{'field4'}) && $task->{'field4'} ne "") {
$task->{'sap_license'} = $task->{'field4'};
} else {
$task->{'sap_license'} = pandora_get_config_value( $task->{'sap_license'} = pandora_get_config_value(
$dbh, $dbh,
'sap_license' 'sap_license'
); );
}
# Retrieve credentials for task (optional). # Retrieve credentials for task (optional).
if (defined($task->{'auth_strings'}) if (defined($task->{'auth_strings'})