Merge branch '83-resumen-consolas-visuales-metaconsola' into 'develop'
fixed errors in visual consele meta See merge request !224
This commit is contained in:
commit
901389fe7b
|
@ -89,13 +89,24 @@ function visual_map_main() {
|
|||
});
|
||||
|
||||
$('.labelpos').click(function(event) {
|
||||
$("#labelposup img").attr('src','images/label_up.png');
|
||||
$("#labelposdown img").attr('src','images/label_down.png');
|
||||
$("#labelposleft img").attr('src','images/label_left.png');
|
||||
$("#labelposright img").attr('src','images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$("#"+$(this).attr('id')+" img").attr('src','images/label_'+$(this).attr('id').replace('labelpos','')+'_2.png');
|
||||
$("#"+$(this).attr('id')).attr('sel','yes');
|
||||
if($("#hidden-metaconsole").val() == 1){
|
||||
$("#labelposup img").attr('src','../../images/label_up.png');
|
||||
$("#labelposdown img").attr('src','../../images/label_down.png');
|
||||
$("#labelposleft img").attr('src','../../images/label_left.png');
|
||||
$("#labelposright img").attr('src','../../images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$("#"+$(this).attr('id')+" img").attr('src','../../images/label_'+$(this).attr('id').replace('labelpos','')+'_2.png');
|
||||
$("#"+$(this).attr('id')).attr('sel','yes');
|
||||
}
|
||||
else{
|
||||
$("#labelposup img").attr('src','images/label_up.png');
|
||||
$("#labelposdown img").attr('src','images/label_down.png');
|
||||
$("#labelposleft img").attr('src','images/label_left.png');
|
||||
$("#labelposright img").attr('src','images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$("#"+$(this).attr('id')+" img").attr('src','images/label_'+$(this).attr('id').replace('labelpos','')+'_2.png');
|
||||
$("#"+$(this).attr('id')).attr('sel','yes');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@ -982,13 +993,24 @@ function loadFieldsFromDB(item) {
|
|||
}
|
||||
|
||||
if (key == 'label_position') {
|
||||
$('#labelposup'+" img").attr('src','images/label_up.png');
|
||||
$('#labelposdown'+" img").attr('src','images/label_down.png');
|
||||
$('#labelposleft'+" img").attr('src','images/label_left.png');
|
||||
$('#labelposright'+" img").attr('src','images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$('#labelpos'+val+" img").attr('src','images/label_'+$('#labelpos'+val).attr('id').replace('labelpos','')+'_2.png');
|
||||
$('#labelpos'+val).attr('sel','yes');
|
||||
if($("#hidden-metaconsole").val() == 1){
|
||||
$('#labelposup'+" img").attr('src','../../images/label_up.png');
|
||||
$('#labelposdown'+" img").attr('src','../../images/label_down.png');
|
||||
$('#labelposleft'+" img").attr('src','../../images/label_left.png');
|
||||
$('#labelposright'+" img").attr('src','../../images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$('#labelpos'+val+" img").attr('src','../../images/label_'+$('#labelpos'+val).attr('id').replace('labelpos','')+'_2.png');
|
||||
$('#labelpos'+val).attr('sel','yes');
|
||||
}
|
||||
else{
|
||||
$('#labelposup'+" img").attr('src','images/label_up.png');
|
||||
$('#labelposdown'+" img").attr('src','images/label_down.png');
|
||||
$('#labelposleft'+" img").attr('src','images/label_left.png');
|
||||
$('#labelposright'+" img").attr('src','images/label_right.png');
|
||||
$('.labelpos').attr('sel','no');
|
||||
$('#labelpos'+val+" img").attr('src','images/label_'+$('#labelpos'+val).attr('id').replace('labelpos','')+'_2.png');
|
||||
$('#labelpos'+val).attr('sel','yes');
|
||||
}
|
||||
}
|
||||
|
||||
if (key == 'image') {
|
||||
|
|
|
@ -817,12 +817,39 @@ else{
|
|||
}
|
||||
}
|
||||
|
||||
//data
|
||||
$module_value = db_get_sql ('SELECT datos
|
||||
FROM tagente_estado
|
||||
WHERE id_agente_modulo = ' . $id_module);
|
||||
//state
|
||||
$module_status = db_get_sql ('SELECT estado
|
||||
FROM tagente_estado
|
||||
WHERE id_agente_modulo = ' . $id_module);
|
||||
|
||||
if (empty($module_value) || $module_value == 0) {
|
||||
$colorStatus = COL_UNKNOWN;
|
||||
}
|
||||
else{
|
||||
switch ($module_status) {
|
||||
case 0: //Normal
|
||||
$colorStatus = COL_NORMAL;
|
||||
break;
|
||||
case 1: //Critical
|
||||
$colorStatus = COL_CRITICAL;
|
||||
break;
|
||||
case 2: //Warning
|
||||
$colorStatus = COL_WARNING;
|
||||
break;
|
||||
case 4: //Not_INIT
|
||||
$colorStatus = COL_NOTINIT;
|
||||
break;
|
||||
case 3: //Unknown
|
||||
default:
|
||||
$colorStatus = COL_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$value_text = false;
|
||||
if ($layoutData['image'] == 'percent') {
|
||||
$value_text = false;
|
||||
|
@ -944,13 +971,24 @@ else{
|
|||
$homeurl = $config['homeurl'];
|
||||
else
|
||||
$homeurl = '';
|
||||
|
||||
if (get_parameter('action') == 'edit') {
|
||||
|
||||
if ( (get_parameter('action') == 'edit') || (get_parameter('operation') == 'edit_visualmap') ) {
|
||||
if($width == 0 || $height == 0){
|
||||
$img = '<img src="images/console/signes/module_graph.png" style="width:300px;height:180px;'.$imgpos.'">';
|
||||
if ($layoutData['id_metaconsole'] != 0) {
|
||||
$img = '<img src="../../images/console/signes/module_graph.png" style="width:300px;height:180px;'.$imgpos.'">';
|
||||
}
|
||||
else{
|
||||
$img = '<img src="images/console/signes/module_graph.png" style="width:300px;height:180px;'.$imgpos.'">';
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
$img = '<img src="images/console/signes/module_graph.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">';
|
||||
if ($layoutData['id_metaconsole'] != 0) {
|
||||
$img = '<img src="../../images/console/signes/module_graph.png" style="width:'.$width.'px;height:'. $height.'px;'.$imgpos.'">';
|
||||
}
|
||||
else{
|
||||
$img = '<img src="images/console/signes/module_graph.png" style="width:'.$width.'px;height:'. $height.'px;'.$imgpos.'">';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1005,7 +1043,7 @@ else{
|
|||
false, 1, false, 0, '', 0, 0, true,
|
||||
$only_image, '', 1, false, '', false,
|
||||
false, false, $layoutData['image'],
|
||||
null, true, false, $type_graph);
|
||||
null, false, true, $type_graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1577,7 +1577,6 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
}
|
||||
|
||||
var stack = 0, bars = true, lines = false, steps = false;
|
||||
|
||||
var plot = $.plot($('#' + graph_id), datas, options);
|
||||
|
||||
// Re-calculate the graph height with the legend height
|
||||
|
@ -1760,7 +1759,6 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
.eq(i).html(label_aux + '= ' + parseFloat(y).toFixed(precision_graph) + how_bigger + ' ' + unit);
|
||||
console.log($('#legend_' + graph_id + ' .legendLabel'));
|
||||
}
|
||||
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
|
|
Loading…
Reference in New Issue