PluginTools minor changes

API cluster minor changes
This commit is contained in:
fbsanchez 2018-05-21 18:08:36 +02:00
parent 2ab45d28b8
commit a82299f1cf
2 changed files with 6 additions and 3 deletions

View File

@ -10250,7 +10250,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3) {
db_pandora_audit("Report management", "Fail try to create agent");
returnData('string',
array('type' => 'string', 'data' => (int)((bool)$id_cluster)));
array('type' => 'string', 'data' => (int)$id_cluster));
}
}
@ -10299,7 +10299,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3) {
//
if($element["type"] == "AA"){
//
$tcluster_module = db_process_sql_insert('tcluster_item',array('name'=>$element["name"],'id_cluster'=>$element["id_cluster"],'critical_limit'=>$element["critical_limit"],'warning_limit'=>$element["warning_limit"]));
$tcluster_module = db_process_sql_insert('tcluster_item',array('name'=>io_safe_input($element["name"]),'id_cluster'=>$element["id_cluster"],'critical_limit'=>$element["critical_limit"],'warning_limit'=>$element["warning_limit"]));
$id_agent = db_process_sql('select id_agent from tcluster where id = '.$element["id_cluster"]);
@ -10318,7 +10318,7 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3) {
$get_module_interval_value = $get_module_type[0]['module_interval'];
$values_module = array(
'nombre' => $element["name"],
'nombre' => io_safe_input($element["name"]),
'id_modulo' => 0,
'prediction_module' => 6,
'id_agente' => $id_agent[0]['id_agent'],

View File

@ -1509,6 +1509,9 @@ sub api_call {
$other = join $separator, @{$apidata->{'other'}};
}
else {
$other = $apidata->{'other'};
}
my $call;