Cleaned source code.
This commit is contained in:
parent
694235c7ea
commit
ab46cde699
|
@ -1330,7 +1330,7 @@ function events_get_agent ($id_agent, $period, $date = 0,
|
|||
|
||||
if ( $filter_event_validated && $filter_event_no_validated ) {
|
||||
$sql_where .= " AND (estado = 1 OR estado = 0)";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($filter_event_validated) {
|
||||
$sql_where .= ' AND estado = 1 ';
|
||||
|
@ -2279,19 +2279,19 @@ function events_page_custom_data ($event) {
|
|||
if ($event['custom_data'] == '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
$table->width = '100%';
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
$table->style[0] = 'width:35%; font-weight: bold; text-align: left;';
|
||||
$table->style[1] = 'text-align: left;';
|
||||
$table->class = "alternate rounded_cells";
|
||||
|
||||
|
||||
$json_custom_data = base64_decode ($event['custom_data']);
|
||||
$custom_data = json_decode ($json_custom_data);
|
||||
if ($custom_data === NULL) {
|
||||
return '<div id="extended_event_custom_data_page" class="extended_event_pages">'.__('Invalid custom data: %s', $json_custom_data).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
foreach ($custom_data as $field => $value) {
|
||||
|
@ -2299,7 +2299,7 @@ function events_page_custom_data ($event) {
|
|||
$table->data[$i][1] = io_safe_output ($value);
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$custom_data = '<div id="extended_event_custom_data_page" class="extended_event_pages">'.html_print_table($table, true).'</div>';
|
||||
|
||||
return $custom_data;
|
||||
|
|
|
@ -2064,10 +2064,11 @@ function html_print_autocomplete_modules($name = 'module',
|
|||
|
||||
if (empty($groups)) {
|
||||
$id_groups = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$id_groups = implode(',', $groups);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$agents = db_get_all_rows_sql('SELECT id_agente
|
||||
FROM tagente
|
||||
WHERE id_grupo IN (' . $id_groups . ')');
|
||||
|
|
|
@ -760,7 +760,7 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0,
|
|||
array ('id_grupo, nombre, id_os, id_agente,
|
||||
normal_count, warning_count, critical_count,
|
||||
unknown_count, total_count, notinit_count'));
|
||||
}
|
||||
}
|
||||
if ($agents === false)
|
||||
$agents = array();
|
||||
|
||||
|
|
|
@ -73,14 +73,15 @@ function wmi_create_wizard_modules($id_agent, $names, $wizard_mode, $values) {
|
|||
|
||||
// Add the query to values
|
||||
$values['snmp_oid'] = io_safe_input($wmi_query);
|
||||
|
||||
|
||||
$return = modules_create_agent_module ($id_agent, $name, $values);
|
||||
|
||||
if($return < 0) {
|
||||
$results[ERR_GENERIC][] = $name;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$results[NOERR][] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -94,7 +95,7 @@ function wmi_create_module_from_components($components, $values) {
|
|||
}
|
||||
foreach ($components as $component_id) {
|
||||
$nc = db_get_row ("tnetwork_component", "id_nc", $component_id);
|
||||
|
||||
|
||||
// Compatibilize the fields between components and modules table
|
||||
$nc['descripcion'] = $nc['description'];
|
||||
unset($nc['description']);
|
||||
|
|
Loading…
Reference in New Issue