New maps in progress... (adapt tooltip data to modules)
This commit is contained in:
parent
78bf99e9f0
commit
a3d70740d0
|
@ -106,30 +106,43 @@ if (is_ajax ()) {
|
|||
$return_data);
|
||||
break;
|
||||
case ITEM_TYPE_MODULE_NETWORKMAP:
|
||||
$node_data = db_get_all_rows_sql("SELECT *
|
||||
|
||||
$node_data = db_get_all_rows_sql("SELECT descripcion
|
||||
FROM tagente_modulo
|
||||
WHERE id_agente_modulo = " . $id_node_data);
|
||||
$node_data = $node_data[0];
|
||||
if (!empty($node_data)) {
|
||||
$link = $config['homeurl'] . 'index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=0&status=0&id_module=' . $id_node_data;
|
||||
$return_data .= '<div id="module_data_to_show_"' . $id_node_data .'>';
|
||||
$return_data .= '<div id="open_close_click_"' . $data_graph_id . '>';
|
||||
$return_data .= '<span><strong>Module: </strong>' . $node_data['nombre'] . '</span></br>';
|
||||
$return_data .= '<span class="close_click" onClick="close_button_tooltip(\'' . $node_id . '\');" style="float:right;">| X </span>';
|
||||
$return_data .= '<span class="open_click" onClick="javascript: open_in_another_window(\'' . $link . '\');" style="float:right;"> -> |</span>';
|
||||
$return_data .= '</div>';
|
||||
|
||||
$return_data .= '<div>';
|
||||
$agent_module = db_get_row_sql("SELECT nombre FROM tagente WHERE id_agente = " . $node_data['id_agente']);
|
||||
$agent_module = $agent_module['nombre'];
|
||||
$return_data .= '<span><strong>Agent: </strong>' . $agent_module . '</span></br>';
|
||||
$return_data .= '<span><strong>Description: </strong>' . $node_data['descripcion'] . '</span>';
|
||||
$return_data .= '</div>';
|
||||
$return_data .= '</div>';
|
||||
}
|
||||
else {
|
||||
$return_data = '<span>No data to show</span>';
|
||||
}
|
||||
$node_data = $node_data[0];
|
||||
|
||||
$return_data = str_replace(
|
||||
"{data_graph_id}",
|
||||
$data_graph_id,
|
||||
$return_data);
|
||||
$return_data = str_replace(
|
||||
"{node_id}",
|
||||
$node_id,
|
||||
$return_data);
|
||||
$return_data = str_replace(
|
||||
"{title}",
|
||||
modules_get_agentmodule_name($id_node_data),
|
||||
$return_data);
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<span>
|
||||
<strong><?php echo __('Agent Name');?>: </strong>
|
||||
<?php echo agents_get_name(modules_get_agentmodule_agent($id_node_data));?>
|
||||
</span> <br/>
|
||||
<span>
|
||||
<strong><?php echo __('Description');?>: </strong>
|
||||
<?php echo db_get_value('descripcion', 'tagente_modulo', 'id_agente_modulo', $id_node_data);?>
|
||||
</span> <br/>
|
||||
<?php
|
||||
$body = ob_get_clean();
|
||||
|
||||
$return_data = str_replace(
|
||||
"{body}",
|
||||
$body,
|
||||
$return_data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue