$visualConsoleId]);
} catch (Throwable $e) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access visual console without Id'
);
include 'general/noaccess.php';
exit;
}
$visualConsoleData = $visualConsole->toArray();
$groupId = $visualConsoleData['groupId'];
$visualConsoleName = io_safe_input(strip_tags(io_safe_output($visualConsoleData['name'])));
// ACL.
$aclRead = (bool) check_acl_restricted_all($config['id_user'], $groupId, 'VR');
$aclWrite = (bool) check_acl_restricted_all($config['id_user'], $groupId, 'VW');
$aclManage = (bool) check_acl_restricted_all($config['id_user'], $groupId, 'VM');
if ($aclRead === false && $aclWrite === false && $aclManage === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access visual console without group access'
);
include 'general/noaccess.php';
exit;
}
// Render map.
$options = [];
$options['consoles_list']['text'] = ''.html_print_image(
'images/visual_console.png',
true,
[
'title' => __('Visual consoles list'),
'class' => 'invert_filter',
]
).'';
if ($aclWrite === true || $aclManage === true) {
$action = get_parameterBetweenListValues(
(is_metaconsole() === true) ? 'action2' : 'action',
[
'new',
'save',
'edit',
'update',
'delete',
],
'edit'
);
$baseUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='.$action;
$hash = md5($config['dbpass'].$visualConsoleId.$config['id_user']);
$options['public_link']['text'] = ''.html_print_image(
'images/camera_mc.png',
true,
[
'title' => __('Show link to public Visual Console'),
'class' => 'invert_filter',
]
).'';
$options['public_link']['active'] = false;
$options['data']['text'] = ''.html_print_image(
'images/op_reporting.png',
true,
[
'title' => __('Main data'),
'class' => 'invert_filter',
]
).'';
$options['list_elements']['text'] = ''.html_print_image(
'images/list.png',
true,
[
'title' => __('List elements'),
'class' => 'invert_filter',
]
).'';
if (enterprise_installed() === true) {
$options['wizard_services']['text'] = ''.html_print_image(
'images/wand_services.png',
true,
[
'title' => __('Services wizard'),
'class' => 'invert_filter',
]
).'';
}
$options['wizard']['text'] = ''.html_print_image(
'images/wand.png',
true,
[
'title' => __('Wizard'),
'class' => 'invert_filter',
]
).'';
}
$options['view']['text'] = ''.html_print_image(
'images/eye.png',
true,
[
'title' => __('View'),
'class' => 'invert_filter',
]
).'';
$options['view']['active'] = true;
if (is_metaconsole() === false) {
if (!$config['pure']) {
$options['pure']['text'] = ''.html_print_image(
'images/full_screen.png',
true,
[
'title' => __('Full screen mode'),
'class' => 'invert_filter',
]
).'';
// Header.
ui_print_standard_header(
$visualConsoleName,
'images/visual_console.png',
false,
'visual_console_view',
false,
$options,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
}
// Set the hidden value for the javascript.
html_print_input_hidden('metaconsole', 0);
} else {
// Set the hidden value for the javascript.
html_print_input_hidden('metaconsole', 1);
}
$edit_capable = (bool) (
check_acl($config['id_user'], 0, 'VM')
|| check_acl($config['id_user'], 0, 'VW')
);
if ($pure === false) {
if ($edit_capable === true) {
echo '
';
echo '
';
echo '
';
$class_camera = 'camera_min link-create-item';
$class_percentile = 'percentile_item_min link-create-item';
$class_module_graph = 'graph_min link-create-item';
$class_donut = 'donut_graph_min link-create-item';
$class_bars = 'bars_graph_min link-create-item';
$class_value = 'binary_min link-create-item';
$class_sla = 'auto_sla_graph_min link-create-item';
$class_label = 'label_min link-create-item';
$class_icon = 'icon_min link-create-item';
$class_clock = 'clock_min link-create-item';
$class_group = 'group_item_min link-create-item';
$class_box = 'box_item link-create-item';
$class_line = 'line_item link-create-item';
$class_cloud = 'color_cloud_min link-create-item';
$class_nlink = 'network_link_min link-create-item';
$class_odometer = 'odometer_min link-create-item';
$class_basic_chart = 'basic_chart_min link-create-item';
$class_delete = 'delete_item delete_min';
$class_copy = 'copy_item';
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$class_camera = 'camera_min_white link-create-item';
$class_percentile = 'percentile_item_min_white link-create-item';
$class_module_graph = 'graph_min_white link-create-item';
$class_donut = 'donut_graph_min_white link-create-item';
$class_bars = 'bars_graph_min_white link-create-item';
$class_value = 'binary_min_white link-create-item';
$class_sla = 'auto_sla_graph_min_white link-create-item';
$class_label = 'label_min_white link-create-item';
$class_icon = 'icon_min_white link-create-item';
$class_clock = 'clock_min_white link-create-item';
$class_group = 'group_item_min_white link-create-item';
$class_box = 'box_item_white link-create-item';
$class_line = 'line_item_white link-create-item';
$class_cloud = 'color_cloud_min_white link-create-item';
$class_nlink = 'network_link_min_white link-create-item';
$class_odometer = 'odometer_min_white link-create-item';
$class_basic_chart = 'basic_chart_min_white link-create-item';
$class_delete = 'delete_item_white delete_min_white';
$class_copy = 'copy_item_white';
}
visual_map_print_button_editor_refactor(
'STATIC_GRAPH',
__('Static Image'),
$class_camera
);
visual_map_print_button_editor_refactor(
'PERCENTILE_BAR',
__('Percentile Item'),
$class_percentile
);
visual_map_print_button_editor_refactor(
'MODULE_GRAPH',
__('Module Graph'),
$class_module_graph
);
visual_map_print_button_editor_refactor(
'BASIC_CHART',
__('Basic chart'),
$class_basic_chart
);
visual_map_print_button_editor_refactor(
'DONUT_GRAPH',
__('Serialized pie graph'),
$class_donut
);
visual_map_print_button_editor_refactor(
'BARS_GRAPH',
__('Bars Graph'),
$class_bars
);
visual_map_print_button_editor_refactor(
'AUTO_SLA_GRAPH',
__('Event history graph'),
$class_sla
);
visual_map_print_button_editor_refactor(
'SIMPLE_VALUE',
__('Simple Value'),
$class_value
);
visual_map_print_button_editor_refactor(
'LABEL',
__('Label'),
$class_label
);
visual_map_print_button_editor_refactor(
'ICON',
__('Icon'),
$class_icon
);
visual_map_print_button_editor_refactor(
'CLOCK',
__('Clock'),
$class_clock
);
visual_map_print_button_editor_refactor(
'GROUP_ITEM',
__('Group'),
$class_group
);
visual_map_print_button_editor_refactor(
'BOX_ITEM',
__('Box'),
$class_box
);
visual_map_print_button_editor_refactor(
'LINE_ITEM',
__('Line'),
$class_line
);
visual_map_print_button_editor_refactor(
'COLOR_CLOUD',
__('Color cloud'),
$class_cloud
);
visual_map_print_button_editor_refactor(
'NETWORK_LINK',
__('Network link'),
$class_nlink
);
visual_map_print_button_editor_refactor(
'ODOMETER',
__('Odometer'),
$class_odometer
);
enterprise_include_once('include/functions_visual_map_editor.php');
enterprise_hook(
'enterprise_visual_map_editor_print_toolbox_refactor'
);
echo '
';
echo '
';
visual_map_print_button_editor_refactor(
'button_delete',
__('Delete Item'),
$class_delete,
true
);
visual_map_print_button_editor_refactor(
'button_copy',
__('Copy Item'),
$class_copy,
true
);
echo '
';
echo '
';
if ($aclWrite === true || $aclManage === true) {
if (!is_metaconsole()) {
echo '
'.html_print_image(
'images/target.png',
true,
[
'title' => __('Force remote checks'),
'class' => 'invert_filter',
]
).'';
}
echo html_print_checkbox_switch('edit-mode', 1, false, true);
}
echo '
';
}
}
$bg_color = '';
if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
$bg_color = 'style="background-color: #222"';
}
echo '';
if ($pure === true) {
// Floating menu - Start.
echo '';
echo '';
// Floating menu - End.
?>
0 && $pure == 1) {
$widthRatio = ($width / $visualConsoleData['width']);
if ($visualConsoleData['width'] > $height) {
?>