$status,
'color' => $color);
}
echo json_encode($return);
return;
}
if ($getNodeData) {
$id_node_data = (int)get_parameter('id_node_data');
$type = (int)get_parameter('type');
$id_map = (int)get_parameter('id_map');
$data_graph_id = (int)get_parameter('data_graph_id');
$node_id = get_parameter('node_id');
ob_start();
?>
:
:
:
:
:
:
:
:
:
width = '100%';
$table->class = 'databox data';
$table->head = array ();
$table->head[0] = __('Name');
$table->head[1] = __('Description');
$table->head[2] = __('Type');
$table->head[3] = __('Interval');
$table->head[4] = __('Status');
$table->rowstyle = array();
$table->style = array ();
$table->style[0] = 'font-weight: bold';
$table->align = array ();
$table->align[0] = 'center';
$table->align[1] = 'center';
$table->align[2] = 'center';
$table->align[3] = 'center';
$table->align[4] = 'center';
$table->data = array ();
foreach ($agent_modules as $module) {
$data = array ();
$status = '';
$title = '';
$module_data = db_get_all_rows_sql("SELECT nombre, id_tipo_modulo, descripcion, module_interval
FROM tagente_modulo WHERE id_agente_modulo = " . $module);
$module_data = $module_data[0];
$module_status = db_get_row('tagente_estado', 'id_agente_modulo', $module);
modules_get_status($module_status['id_agente_modulo'], $module_status['estado'], $module_status['datos'], $status, $title);
$data[0] = $module_data['nombre'];
$data[1] = $module_data['descripcion'];
$data[2] = '';
$type = $module_data['id_tipo_modulo'];
if ($type) {
$data[2] = ui_print_moduletype_icon($type, true);
}
if ($module_data['module_interval']) {
$data[3] = human_time_description_raw($module_data['module_interval']);
}
else {
$data[3] = human_time_description_raw($agent_interval);
}
$data[4] = ui_print_status_image($status, $title, true);;
array_push ($table->data, $data);
}
$body = html_print_table ($table, true);
$details = str_replace(
"{body}",
$body,
$details);
echo json_encode($details);
return;
}
else if ($printEditNodeTable) {
?>
id = 'node_options_' . $node_id;
$table->width = "100%";
$table->head = array();
$node_name = __('No name');
if ($type == ITEM_TYPE_AGENT_NETWORKMAP) {
$node_name = agents_get_name($id_node_data);
$table->head['type'] = __('Agent');
}
else {
$node_name = db_get_all_rows_sql("SELECT nombre
FROM tagente_modulo
WHERE id_agente_modulo = " . $id_node_data);
$node_name = $node_name[0];
$table->head['type'] = __('Module');
}
$table->head['name'] = $node_name;
$node = db_get_all_rows_sql("SELECT style FROM titem WHERE id = " . $id_node_data);
$node = $node[0];
$node_style = json_decode($node);
$table->data = array();
$table->data[0][0] = __('Label');
$table->data[0][1] = html_print_input_text('label',
$node_name, '', 12, 10, true);
$table->data[1][0] = __('Shape');
$table->data[1][1] = html_print_select(array(
'circle' => __('Circle'),
'square' => __('Square'),
'rhombus' => __('Rhombus')), 'shape', 'circle', '', '', 0, true);
html_print_table($table);
echo '';
?>
id = 'map_options';
$table->width = "100%";
$table->head = array();
$table->head['name'] = __('Nombre del mapa');
$table->head['type'] = __('Tipo del mapa');
$table->data = array();
$table->data[0][0] = __('Capo1');
$table->data[0][1] = __('Capo2');
$table->data[1][0] = __('Capo1');
$table->data[1][1] = __('Capo2');
$table->data[2][0] = __('Capo1');
$table->data[2][1] = __('Capo2');
ui_toggle(html_print_table($table, true), __('Map options'),
__('Map options'), true);
?>