fixed errors visual console

This commit is contained in:
daniel 2017-10-24 18:14:57 +02:00
parent e49f921ee8
commit 4ef0c6cd5f
2 changed files with 14 additions and 3 deletions

View File

@ -967,12 +967,18 @@ switch ($action) {
case 'label':
$values['type'] = LABEL;
$values['label'] = $label;
if(defined('METACONSOLE') && $values['id_agent'] == 0){
$values['id_metaconsole'] = 1;
}
break;
case 'icon':
$values['type'] = ICON;
$values['image'] = $image;
$values['width'] = $width;
$values['height'] = $height;
if(defined('METACONSOLE') && $values['id_agent'] == 0){
$values['id_metaconsole'] = 1;
}
break;
default:
if (enterprise_installed()) {

View File

@ -510,15 +510,20 @@ function visual_map_print_item($mode = "read", $layoutData,
case LABEL:
if ($layoutData['id_layout_linked'] != 0) {
// Link to a map
$url = $config['homeurl'] .
'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
if ($layoutData['id_metaconsole'] == 0) {
$url = $config['homeurl'] .
'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
}
else{
$url = "index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap=" . $layoutData["id_layout_linked"] . "&refr=0";
}
}
break;
case ICON:
$url_icon = "";
if ($layoutData['id_layout_linked'] != 0) {
// Link to a map
if (empty($layoutData['id_metaconsole'])) {
if ($layoutData['id_metaconsole'] == 0) {
$url = 'index.php?sec=reporting&sec2=operation/visual_console/render_view&pure='.$config["pure"].'&id='.$layoutData["id_layout_linked"];
}
else {