Fixed visual console
This commit is contained in:
parent
b9f87597fb
commit
4ebe075ace
|
@ -231,7 +231,7 @@ function readFields() {
|
|||
values['module'] = $("select[name=module]").val();
|
||||
values['process_simple_value'] = $("select[name=process_value]").val();
|
||||
values['background'] = $("#background_image").val();
|
||||
values['period'] = $("select[name=period]").val();
|
||||
values['period'] = $("#hidden-period").val();
|
||||
values['width'] = $("input[name=width]").val();
|
||||
values['height'] = $("input[name=height]").val();
|
||||
values['parent'] = $("select[name=parent]").val();
|
||||
|
@ -841,6 +841,8 @@ function getModuleGraph(id_data) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
id_agente_modulo = data['id_agente_modulo'];
|
||||
|
@ -876,6 +878,8 @@ function getModuleGraph(id_data) {
|
|||
url: url_ajax,
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
dataType: 'text', //The ajax return the data as text.
|
||||
success: function (data)
|
||||
{
|
||||
|
@ -906,6 +910,8 @@ function getModuleValue(id_data, process_simple_value, period) {
|
|||
url: url_ajax,
|
||||
data: parameter,
|
||||
type: "POST",
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
dataType: 'json',
|
||||
success: function (data)
|
||||
{
|
||||
|
@ -940,6 +946,8 @@ function getPercentileBar(id_data, values) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
module_value = data['value'];
|
||||
|
@ -965,6 +973,8 @@ function getPercentileBar(id_data, values) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
font = data['font'];
|
||||
|
@ -1015,6 +1025,8 @@ function getPercentileBubble(id_data, values) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
module_value = data['value'];
|
||||
|
@ -1037,6 +1049,8 @@ function getPercentileBubble(id_data, values) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
font = data['font'];
|
||||
|
@ -1084,6 +1098,8 @@ function getImageElement(id_data) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
timeout: 1000,
|
||||
async: false,
|
||||
success: function (data)
|
||||
{
|
||||
img = data['image'];
|
||||
|
@ -1179,6 +1195,8 @@ function createItem(type, values, id_data) {
|
|||
type: 'POST',
|
||||
url: url_ajax,
|
||||
data: parameter,
|
||||
timeout: 1000,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
img_src = data;
|
||||
}
|
||||
|
@ -1276,6 +1294,8 @@ function createItem(type, values, id_data) {
|
|||
type: 'POST',
|
||||
url: url_ajax,
|
||||
data: parameter,
|
||||
timeout: 1000,
|
||||
async:false,
|
||||
success: function (data) {
|
||||
img_src = data;
|
||||
}
|
||||
|
@ -1425,6 +1445,8 @@ function updateDB_visual(type, idElement , values, event, top, left) {
|
|||
data: params.join ("&"),
|
||||
type: 'POST',
|
||||
url: url_ajax,
|
||||
async: false,
|
||||
timeout: 10000,
|
||||
success: function (data) {
|
||||
$("#image_" + idElement).attr('src', data);
|
||||
}
|
||||
|
@ -1435,10 +1457,10 @@ function updateDB_visual(type, idElement , values, event, top, left) {
|
|||
case 'label':
|
||||
case 'icon':
|
||||
case 'module_graph':
|
||||
|
||||
if (type == 'module_graph')
|
||||
$("#image_" + idElement).attr("src", getModuleGraph(idElement));
|
||||
|
||||
|
||||
/*if (type == 'module_graph')
|
||||
$("#image_" + idElement).attr("src", getModuleGraph(idElement));*/
|
||||
|
||||
if ((typeof(values['mov_left']) != 'undefined') &&
|
||||
(typeof(values['mov_top']) != 'undefined')) {
|
||||
$("#" + idElement).css('top', '0px').css('top', top + 'px');
|
||||
|
@ -1582,6 +1604,8 @@ function updateDB(type, idElement , values, event) {
|
|||
data: parameter,
|
||||
type: "POST",
|
||||
dataType: 'text',
|
||||
async: false,
|
||||
timeout: 1000,
|
||||
success: function (data)
|
||||
{
|
||||
updateDB_visual(type, idElement , values, event, top, left);
|
||||
|
|
|
@ -21,8 +21,8 @@ $get_image_path = get_parameter('get_image_path', 0);
|
|||
if ($get_image_path) {
|
||||
$img_src = get_parameter("img_src");
|
||||
$only_src = get_parameter("only_src", 0);
|
||||
|
||||
return html_print_image($img_src, false, '', $only_src);
|
||||
|
||||
echo html_print_image($img_src, false, '', $only_src);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -559,8 +559,8 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'module_graph':
|
||||
$elementFields['width_module_graph'] = $elementFields['width'];
|
||||
$elementFields['height_module_graph'] = $elementFields['height'];
|
||||
$elementFields['width_module_graph'] = (int)$elementFields['width'];
|
||||
$elementFields['height_module_graph'] = (int)$elementFields['height'];
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -596,7 +596,7 @@ switch ($action) {
|
|||
|
||||
case 'insert':
|
||||
$values = array();
|
||||
$values['id_layout'] = $id_visual_console;
|
||||
$values['id_layout'] = (int)$id_visual_console;
|
||||
$values['label'] = $label;
|
||||
$values['pos_x'] = $left;
|
||||
$values['pos_y'] = $top;
|
||||
|
@ -617,20 +617,20 @@ switch ($action) {
|
|||
else
|
||||
$values['id_agent'] = 0;
|
||||
}
|
||||
$values['id_agente_modulo'] = $id_module;
|
||||
$values['id_layout_linked'] = $map_linked;
|
||||
$values['id_agente_modulo'] = (int)$id_module;
|
||||
$values['id_layout_linked'] = (int)$map_linked;
|
||||
$values['label_color'] = $label_color;
|
||||
$values['parent_item'] = $parent;
|
||||
$values['parent_item'] = (int)$parent;
|
||||
$values['no_link_color'] = 1;
|
||||
$values['enable_link'] = $enable_link;
|
||||
|
||||
$values['enable_link'] = (int)$enable_link;
|
||||
|
||||
$values['id_custom_graph'] = $id_custom_graph;
|
||||
|
||||
switch ($type) {
|
||||
case 'module_graph':
|
||||
$values['type'] = MODULE_GRAPH;
|
||||
$values['height'] = $height_module_graph;
|
||||
$values['width'] = $width_module_graph;
|
||||
$values['height'] = (int)$height_module_graph;
|
||||
$values['width'] = (int)$width_module_graph;
|
||||
$values['period'] = $period;
|
||||
break;
|
||||
case 'percentile_item':
|
||||
|
|
|
@ -540,7 +540,7 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
|||
|
||||
// Get module data
|
||||
$data = db_get_all_rows_filter ('tagente_datos',
|
||||
array ('id_agente_modulo' => $agent_module_id,
|
||||
array ('id_agente_modulo' => (int)$agent_module_id,
|
||||
"utimestamp > $datelimit",
|
||||
"utimestamp < $date",
|
||||
'order' => 'utimestamp ASC'),
|
||||
|
|
|
@ -235,9 +235,9 @@ function visual_map_print_item($layoutData) {
|
|||
if ($layoutData['id_metaconsole'] != 0) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
|
||||
|
||||
|
||||
//$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
|
||||
|
||||
echo '<div id="' . $id . '" class="item module_graph" style="z-index: 1; color: ' . $color . '; text-align: center; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||
echo io_safe_output($text) . '<br />';
|
||||
echo $img;
|
||||
|
|
Loading…
Reference in New Issue