'.html_print_image( 'images/setup.png', true, [ 'title' => __('Config'), 'class' => 'invert_filter', ] ).''; $url = sprintf( 'index.php?sec=view&sec2=operation/heatmap&pure=1&type=%s&refresh=%s&search=%s&filter=%s', $type, $refresh, $search, implode(',', $filter) ); $viewtab['full_screen'] = ''.html_print_image( 'images/full_screen.png', true, [ 'title' => __('Full screen'), 'class' => 'invert_filter', ] ).''; $header_name = __('Heatmap view'); switch ($type) { case 2: if (current($filter) == 0) { $header_name .= ' - '.__('Module group').': '.__('Not assigned'); } else { $header_name .= ' - '.__('Module group').': '.modules_get_modulegroup_name(current($filter)); } break; case 1: $tags_name = ''; foreach ($filter as $key => $tag) { $tags_name .= tags_get_name($tag).', '; } $tags_name = trim($tags_name, ', '); $header_name .= ' - '.__('Tag').': '.$tags_name; break; case 0: default: if (current($filter) == 0) { $header_name .= ' - '.__('Group').': '.__('All'); } else { $header_name .= ' - '.__('Group').': '.groups_get_name(current($filter)); } break; } // Header. ui_print_standard_header( $header_name, '', false, '', false, $viewtab, [ [ 'link' => '', 'label' => __('Monitoring'), ], [ 'link' => '', 'label' => __('Views'), ], ] ); } if ($is_ajax === false && $pure === true) { // Floating menu - Start. echo '
'; echo ''; echo '
'; } // Control call flow. try { // Heatmap construct. $heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group); } catch (Exception $e) { if (is_ajax() === true) { echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]); exit; } else { echo '[Heatmap]'.$e->getMessage(); } // Stop this execution, but continue 'globally'. return; } // AJAX controller. if ($is_ajax === true) { $method = get_parameter('method'); if (method_exists($heatmap, $method) === true) { if ($heatmap->ajaxMethod($method) === true) { $heatmap->{$method}(); } else { echo 'Unavailable method'; } } else { echo 'Method not found'; } // Stop any execution. exit; } else { // Run. $heatmap->run(); // Dialog. echo ''; } ?>