Some fixes in the javascript visualmap.

This commit is contained in:
mdtrooper 2015-06-16 18:45:42 +02:00
parent ff1a35cb92
commit dac4d30e91
2 changed files with 10 additions and 5 deletions

View File

@ -115,8 +115,6 @@ $id_agent = get_parameter('id_agent', null);
$id_metaconsole = get_parameter('id_metaconsole', null);
$id_group = (int)get_parameter('id_group', 0);
$id_custom_graph = get_parameter('id_custom_graph', null);
$height_module_graph = get_parameter('id_custom_graph', null);
$width_module_graph = get_parameter('id_custom_graph', null);
$border_width = get_parameter('border_width', 0);
$border_color = get_parameter('border_color', '');
$fill_color = get_parameter('fill_color', '');
@ -455,13 +453,13 @@ switch ($action) {
$values['id_layout_linked'] = $map_linked;
}
switch ($type) {
// -- line_item --
// -- line_item ------------------------------------
case 'handler_start':
case 'handler_end':
// ---------------
$values['border_width'] = $line_width;
$values['border_color'] = $line_color;
break;
// -------------------------------------------------
case 'box_item':
$values['border_width'] = $border_width;
$values['border_color'] = $border_color;
@ -817,6 +815,7 @@ switch ($action) {
}
break;
}
$idData = db_process_sql_insert('tlayout_data', $values);
$return = array();

View File

@ -2387,9 +2387,15 @@ function set_when_empty (&$var, $default) {
}
}
function sort_by_column (&$array_ref, $column) {
function sort_by_column (&$array_ref, $column_parameter) {
global $column;
$column = $column_parameter;
if (!empty($column)) {
usort($array_ref, function ($a, $b) {
global $column;
return strcmp($a[$column], $b[$column]);
});
}