Merge branch '1827-Graficas_TIP_eje_x_no_mantiene_ratio' into 'develop'

1827 graficas tip eje x no mantiene ratio

See merge request artica/pandorafms!1539
This commit is contained in:
vgilc 2018-06-14 12:45:39 +02:00
commit c9b2da9513
5 changed files with 18 additions and 17 deletions

View File

@ -3205,6 +3205,9 @@ function series_type_graph_array($data, $show_elements_graph){
$data_return['color'][$key] = $color_series[$i]; $data_return['color'][$key] = $color_series[$i];
$i++; $i++;
} }
if($i > 14){
$i = 0;
}
} }
return $data_return; return $data_return;
} }

View File

@ -2248,7 +2248,7 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0, $return =
'only_image' => $only_image, 'only_image' => $only_image,
'homeurl' => $homeurl, 'homeurl' => $homeurl,
'menu' => true, 'menu' => true,
'backgroundColor' => '#f9faf9', 'backgroundColor' => 'transparent',
'type_graph' => 'area', 'type_graph' => 'area',
'font' => $config['fontpath'], 'font' => $config['fontpath'],
'font_size' => $config['font_size'], 'font_size' => $config['font_size'],

View File

@ -727,10 +727,9 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
//echo '<div id="id_div" style="height: 10px">&nbsp;</div>'; //echo '<div id="id_div" style="height: 10px">&nbsp;</div>';
if ($config["agentaccess"]) { if ($config["agentaccess"]) {
$access_graph = '<div>hjhhjhhj</div>'; $access_graph = '<div style="width:100%; height:130px;">';
$access_graph = '<div style="width:100%; heigth:200px;">'; $access_graph .= graphic_agentaccess($id_agente, 380, 120, SECONDS_1DAY, true, true);
$access_graph .= graphic_agentaccess($id_agente, 380, 90, SECONDS_1DAY, true, true); $access_graph .= '</div>';
$access_graph .= '</div><br><br>';
ui_toggle($access_graph, __('Agent access rate (24h)')); ui_toggle($access_graph, __('Agent access rate (24h)'));
} }
@ -815,11 +814,9 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals
ui_toggle($table_interfaces, __('Interface information') . ' (SNMP)'); ui_toggle($table_interfaces, __('Interface information') . ' (SNMP)');
} }
if (!empty($server_data) && is_metaconsole()) { if (!empty($server_data) && is_metaconsole()) {
metaconsole_restore_db(); metaconsole_restore_db();
} }
return; return;
} }
?> ?>

View File

@ -400,7 +400,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
// with all 0 values. // with all 0 values.
options['yaxis']['tickDecimals'] = 0; options['yaxis']['tickDecimals'] = 0;
} }
if (max) { if (max) {
options['xaxis']['max'] = max; options['xaxis']['max'] = max;
} }
@ -409,15 +409,14 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
} }
var plot = $.plot($('#' + graph_id), datas, options ); var plot = $.plot($('#' + graph_id), datas, options );
$('#' + graph_id).HUseTooltip(); $('#' + graph_id).HUseTooltip();
$('#' + graph_id).css("margin-left","auto"); $('#' + graph_id).css("margin-left","auto");
$('#' + graph_id).css("margin-right","auto"); $('#' + graph_id).css("margin-right","auto");
//~ $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true }); //~ $('#' + graph_id).find('div.legend-tooltip').tooltip({ track: true });
function yFormatter(v, axis) { function yFormatter(v, axis) {
format = new Array(); format = new Array();
for (i = 0; i < labels_total.length; i++) { for (i = 0; i < labels_total.length; i++) {
var label = labels_total[i][1]; var label = labels_total[i][1];
// var shortLabel = reduceText(label, 25); // var shortLabel = reduceText(label, 25);
@ -427,8 +426,10 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
label = reduceText(label, 30); label = reduceText(label, 30);
} }
var div_attributes = 'style="font-size:'+font_size+'pt !important;' var div_attributes = 'style="font-size:'+font_size+'pt !important;'
+ ' margin: 0; max-width: 150px;' + ' margin: 0; max-width: 150px;'
+ 'margin-right:5px;'; + 'margin-right:5px';
+ 'margin-left: -1.5em';
+ 'text-align: right';
if (label.indexOf("<br>") != -1) { if (label.indexOf("<br>") != -1) {
div_attributes += "min-height: 2.5em;"; div_attributes += "min-height: 2.5em;";
@ -442,7 +443,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
} }
return format; return format;
} }
function xFormatter(v, axis) { function xFormatter(v, axis) {
label = parseFloat(v); label = parseFloat(v);
text = label.toLocaleString(); text = label.toLocaleString();

View File

@ -247,11 +247,11 @@ enterprise_hook('close_meta_frame');
?> ?>
<? if (!is_metaconsole()): ?> <?php if (!is_metaconsole()){ ?>
<script type="text/javascript" src="include/javascript/fixed-bottom-box.js"></script> <script type="text/javascript" src="include/javascript/fixed-bottom-box.js"></script>
<? else: ?> <?php }else{ ?>
<script type="text/javascript" src="../../include/javascript/fixed-bottom-box.js"></script> <script type="text/javascript" src="../../include/javascript/fixed-bottom-box.js"></script>
<? endif; ?> <?php } ?>
<script type="text/javascript"> <script type="text/javascript">
var treeController = TreeController.getController(); var treeController = TreeController.getController();