fixed styles

This commit is contained in:
daniel 2023-03-04 13:22:52 +01:00
parent 9ad97ee267
commit ff3b7001c3
19 changed files with 411 additions and 415 deletions

View File

@ -513,7 +513,7 @@ if (!$maps && is_metaconsole() === false) {
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
$data[0] = '<a href="index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;id='.$map['id'].'&amp;refr='.$refr.'">'.$map['name'].'</a>'; $data[0] = '<a href="index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;id='.$map['id'].'&amp;refr='.$refr.'">'.$map['name'].'</a>';
} else { } else {
$data[0] = '<a href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_visualmap='.$map['id'].'&amp;refr='.$refr.'">'.$map['name'].'</a>'; $data[0] = '<a href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id='.$map['id'].'&amp;refr='.$refr.'">'.$map['name'].'</a>';
} }
$data[1] = ui_print_group_icon($map['id_group'], true); $data[1] = ui_print_group_icon($map['id_group'], true);

View File

@ -82,7 +82,7 @@ switch ($action) {
echo "<form id='back' method='post' action='index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab=".$activeTab.'&id_visual_console='.$idVisualConsole."' enctype='multipart/form-data'>"; echo "<form id='back' method='post' action='index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab=".$activeTab.'&id_visual_console='.$idVisualConsole."' enctype='multipart/form-data'>";
html_print_input_hidden('action', 'update'); html_print_input_hidden('action', 'update');
} else { } else {
echo "<form id='back' action='index.php?sec=screen&sec2=screens/screens&tab=".$activeTab.'&id_visual_console='.$idVisualConsole.'&id_visualmap='.$idVisualConsole."&action=visualmap' method='post' enctype='multipart/form-data'>"; echo "<form id='back' action='index.php?sec=screen&sec2=screens/screens&tab=".$activeTab.'&id_visual_console='.$idVisualConsole.'&id='.$idVisualConsole."&action=visualmap' method='post' enctype='multipart/form-data'>";
html_print_input_hidden('action2', 'update'); html_print_input_hidden('action2', 'update');
} }
break; break;
@ -136,14 +136,8 @@ echo $formHidden;
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
if (is_metaconsole() === true) {
$table->class = 'databox data';
$table->head[0] = __('Create visual console');
$table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center';
$table->align[0] = 'left';
$table->align[1] = 'left';
}
$table->class = 'databox filter-table-adv'; $table->class = 'databox filter-table-adv';
$table->size = []; $table->size = [];
@ -152,6 +146,9 @@ $table->size[1] = '50%';
$table->data = []; $table->data = [];
$table->colspan[-1][0] = 2;
$table->data[-1][0] = '<div class="section_table_title">'.__('Create visual console').'</div>';
$table->data[0][] = html_print_label_input_block( $table->data[0][] = html_print_label_input_block(
__('Name'), __('Name'),
html_print_input_text( html_print_input_text(

View File

@ -113,7 +113,7 @@ foreach ($all_images as $image_file) {
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox data'; $table->class = 'databox filter-table-adv';
$table->head = []; $table->head = [];
$table->head['icon'] = ''; $table->head['icon'] = '';
@ -783,23 +783,47 @@ foreach ($layoutDatas as $layoutData) {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
echo '<form class="vc_elem_form" method="post" action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'">'; echo '<form id="vc_elem_form" method="post" action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'">';
html_print_input_hidden('action', 'update'); html_print_input_hidden('action', 'update');
} else { } else {
echo "<form class='vc_elem_form' method='post' action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console=".$idVisualConsole."'>"; echo "<form id='vc_elem_form' method='post' action='index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console=".$idVisualConsole."'>";
html_print_input_hidden('action2', 'update'); html_print_input_hidden('action2', 'update');
} }
html_print_table($table); html_print_table($table);
// Form for multiple delete.
if (is_metaconsole() === false) {
$url_multiple_delete = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'];
} else {
$url_multiple_delete = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'];
}
echo '</form>';
$buttons = html_print_submit_button( $buttons = html_print_submit_button(
__('Update'), __('Update'),
'go', 'go',
false, false,
[ 'icon' => 'next' ], [
'icon' => 'next',
'form' => 'vc_elem_form',
],
true true
); );
$buttons .= "<form id='form_multiple_delete' method='post' action=".$url_multiple_delete.'>';
if (is_metaconsole() === false) {
$buttons .= html_print_input_hidden('action', 'multiple_delete', true);
} else {
$buttons .= html_print_input_hidden('action2', 'multiple_delete', true);
}
$buttons .= html_print_input_hidden('id_visual_console', $visualConsole['id'], true);
$buttons .= html_print_input_hidden('id_item_json', '', true);
$buttons .= html_print_button( $buttons .= html_print_button(
__('Delete'), __('Delete'),
'delete', 'delete',
@ -812,32 +836,12 @@ $buttons .= html_print_button(
true true
); );
$buttons .= '</form>';
html_print_action_buttons( html_print_action_buttons(
$buttons $buttons
); );
echo '</form>';
// Form for multiple delete.
if (is_metaconsole() === false) {
$url_multiple_delete = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'];
} else {
$url_multiple_delete = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure=0&tab=list_elements&id_visual_console='.$idVisualConsole;
}
echo "<form id='form_multiple_delete' method='post' action=".$url_multiple_delete.'>';
if (is_metaconsole() === false) {
html_print_input_hidden('action', 'multiple_delete');
} else {
html_print_input_hidden('action2', 'multiple_delete');
}
html_print_input_hidden('id_visual_console', $visualConsole['id']);
html_print_input_hidden('id_item_json', '');
echo '</form>';
// Trick for it have a traduct text for javascript. // Trick for it have a traduct text for javascript.
echo '<span id="ip_text" class="invisible">'.__('IP').'</span>'; echo '<span id="ip_text" class="invisible">'.__('IP').'</span>';

View File

@ -60,7 +60,7 @@ set_unless_defined($idVisualConsole, 0);
// Set default. // Set default.
$idVisualConsole = get_parameter('id_visual_console', $idVisualConsole); $idVisualConsole = get_parameter('id_visual_console', $idVisualConsole);
if (empty($idVisualConsole) === true) { if (empty($idVisualConsole) === true) {
$idVisualConsole = get_parameter('id_visualmap', 0); $idVisualConsole = get_parameter('id', 0);
} }
if (!defined('METACONSOLE')) { if (!defined('METACONSOLE')) {
@ -81,7 +81,6 @@ $action = get_parameterBetweenListValues(
], ],
'new' 'new'
); );
$activeTab = get_parameterBetweenListValues( $activeTab = get_parameterBetweenListValues(
'tab', 'tab',
[ [
@ -94,20 +93,17 @@ $activeTab = get_parameterBetweenListValues(
'data' 'data'
); );
// Visual console creation tab and actions
// Visual console creation tab and actions.
if (empty($idVisualConsole)) { if (empty($idVisualConsole)) {
$visualConsole = null; $visualConsole = null;
// General ACL // General ACL.
// $vconsole_read = check_acl ($config['id_user'], 0, "VR");
$vconsole_write = check_acl($config['id_user'], 0, 'VW'); $vconsole_write = check_acl($config['id_user'], 0, 'VW');
$vconsole_manage = check_acl($config['id_user'], 0, 'VM'); $vconsole_manage = check_acl($config['id_user'], 0, 'VM');
} } else {
// The visual console exists // Load the visual console data.
else if ($activeTab != 'data' || ($activeTab == 'data' && $action != 'new')) {
// Load the visual console data
$visualConsole = db_get_row_filter('tlayout', ['id' => $idVisualConsole]); $visualConsole = db_get_row_filter('tlayout', ['id' => $idVisualConsole]);
// The visual console should exist. // The visual console should exist.
if (empty($visualConsole)) { if (empty($visualConsole)) {
db_pandora_audit( db_pandora_audit(
@ -118,20 +114,12 @@ else if ($activeTab != 'data' || ($activeTab == 'data' && $action != 'new')) {
return; return;
} }
// The default group id is 0 // The default group id is 0.
set_unless_defined($visualConsole['id_group'], 0); set_unless_defined($visualConsole['id_group'], 0);
// ACL for the existing visual console // ACL for the existing visual console.
// $vconsole_read = check_acl ($config['id_user'], $visualConsole['id_group'], "VR");
$vconsole_write = check_acl_restricted_all($config['id_user'], $visualConsole['id_group'], 'VW'); $vconsole_write = check_acl_restricted_all($config['id_user'], $visualConsole['id_group'], 'VW');
$vconsole_manage = check_acl_restricted_all($config['id_user'], $visualConsole['id_group'], 'VM'); $vconsole_manage = check_acl_restricted_all($config['id_user'], $visualConsole['id_group'], 'VM');
} else {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access report builder'
);
include 'general/noaccess.php';
return;
} }
// This section is only to manage the visual console // This section is only to manage the visual console
@ -803,7 +791,7 @@ if (!defined('METACONSOLE')) {
$url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh; $url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh;
} else { } else {
$url_base = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&action2='; $url_base = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&action2=';
$url_view = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$idVisualConsole.'&refr='.$view_refresh; $url_view = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$idVisualConsole.'&refr='.$view_refresh;
} }
// Hash for auto-auth in public link. // Hash for auto-auth in public link.
@ -863,27 +851,24 @@ $buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : ''; $tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
if (is_metaconsole() === false) { ui_print_standard_header(
// Header. $visualConsoleName,
ui_print_standard_header( 'images/visual_console.png',
$visualConsoleName, false,
'images/visual_console.png', $tab_builder,
false, false,
$tab_builder, $buttons,
false, [
$buttons,
[ [
[ 'link' => '',
'link' => '', 'label' => __('Topology maps'),
'label' => __('Topology maps'), ],
], [
[ 'link' => '',
'link' => '', 'label' => __('Visual console'),
'label' => __('Visual console'), ],
], ]
] );
);
}
if ($statusProcessInDB !== null) { if ($statusProcessInDB !== null) {
echo $statusProcessInDB['message']; echo $statusProcessInDB['message'];

View File

@ -48,9 +48,7 @@ $strict_user = db_get_value(
$config['id_user'] $config['id_user']
); );
// ACL for the existing visual console // ACL for the existing visual console.
// if (!isset($vconsole_read))
// $vconsole_read = check_acl ($config['id_user'], $visualConsole['id_group'], "VR");
if (!isset($vconsole_write)) { if (!isset($vconsole_write)) {
$vconsole_write = check_acl( $vconsole_write = check_acl(
$config['id_user'], $config['id_user'],
@ -82,36 +80,18 @@ require_once $config['homedir'].'/include/functions_agents.php';
$table = new stdClass(); $table = new stdClass();
$table->id = 'wizard_table'; $table->id = 'wizard_table';
$table->head = []; $table->head = [];
$table->width = '100%';
$table->class = 'databox filter-table-adv';
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
$metaconsole_hack = ''; $metaconsole_hack = '';
$table->width = '100%';
$table->class = 'databox filters';
} else { } else {
$metaconsole_hack = '../../'; $metaconsole_hack = '../../';
$table->width = '100%';
$table->class = 'databox filters';
$table->styleTable = ' margin-top:0px';
include_once $config['homedir'].'/enterprise/meta/include/functions_html_meta.php'; include_once $config['homedir'].'/enterprise/meta/include/functions_html_meta.php';
} }
$table->style = [];
$table->style[0] = 'font-weight: bold; ';
$table->style[2] = 'font-weight: bold; ';
$table->size = []; $table->size = [];
$table->size[0] = '15%'; $table->size[0] = '50%';
$table->size[1] = '15%'; $table->size[1] = '50%';
$table->size[2] = '15%';
$table->size[3] = '15%';
$table->align = [];
$table->align[0] = 'left';
$table->align[1] = 'left';
$table->align[2] = 'left';
$table->align[3] = 'left';
$table->data = []; $table->data = [];
@ -146,55 +126,60 @@ $type_list = [
SIMPLE_VALUE => __('Simple value'), SIMPLE_VALUE => __('Simple value'),
]; ];
$table->rowstyle['all_0'] = 'display: none;'; $table->rowstyle['all_0'] = 'display: none;';
$table->data['all_0'][0] = __('Type'); $table->data['all_0'][0] = html_print_label_input_block(
$table->colspan['all_0'][1] = '3'; __('Type'),
$table->data['all_0'][1] = html_print_select( html_print_select(
$type_list, $type_list,
'type', 'type',
'', '',
'hidden_rows()', 'hidden_rows()',
'', '',
'', '',
true, true,
false, false,
false false
)
); );
$table->rowstyle['staticgraph'] = 'display: none;'; $table->rowstyle['staticgraph'] = 'display: none;';
$table->data['staticgraph'][0] = __('Image'); $table->data['staticgraph'][0] = html_print_label_input_block(
$table->colspan['staticgraph'][1] = '3'; __('Image'),
$table->data['staticgraph'][1] = html_print_select( html_print_select(
$images_list, $images_list,
'image', 'image',
'', '',
'', '',
'', '',
'', '',
true true
)
); );
$table->rowstyle['all_1'] = 'display: none;'; $table->rowstyle['all_1'] = 'display: none;';
$table->data['all_1'][0] = __('Range between elements (px)'); $table->data['all_1'][0] = html_print_label_input_block(
$table->colspan['all_1'][1] = '3'; __('Range between elements (px)'),
$table->data['all_1'][1] = html_print_input_text( html_print_input_text(
'range', 'range',
50, 50,
'', '',
5, 5,
5, 5,
true true
)
); );
$input_size = __('Width').': ';
$input_size .= html_print_input_text('width', 0, '', 5, 5, true);
$input_size .= __('Height').': ';
$input_size .= html_print_input_text('height', 0, '', 5, 5, true);
$table->rowstyle['staticgraph_modulegraph'] = 'display: none;'; $table->rowstyle['staticgraph_modulegraph'] = 'display: none;';
$table->data['staticgraph_modulegraph'][0] = __('Size (px)'); $table->data['staticgraph_modulegraph'][0] = html_print_label_input_block(
$table->colspan['staticgraph_modulegraph'][1] = '3'; __('Size (px)'),
$table->data['staticgraph_modulegraph'][1] = __('Width').': '.html_print_input_text('width', 0, '', 5, 5, true); '<div>'.$input_size.'</div>'
$table->data['staticgraph_modulegraph'][1] .= '&nbsp;&nbsp;&nbsp;'.__('Height').': '.html_print_input_text('height', 0, '', 5, 5, true); );
$fontf = [ $fontf = [
'Roboto' => 'Roboto', 'Roboto' => 'Roboto',
@ -227,78 +212,81 @@ $fonts = [
'196pt' => '196pt', '196pt' => '196pt',
]; ];
$table->rowstyle['all_9'] = 'display: none;'; $table->rowstyle['all_9'] = 'display: none;';
$table->data['all_9'][0] = __('Font'); $table->data['all_9'][0] = html_print_label_input_block(
$table->colspan['all_9'][1] = '3'; __('Font'),
$table->data['all_9'][1] = html_print_select( html_print_select(
$fontf, $fontf,
'fontf', 'fontf',
$fontf['Roboto'], $fontf['Roboto'],
'', '',
'', '',
'', '',
true true
)
); );
$table->rowstyle['all_10'] = 'display: none;'; $table->rowstyle['all_9'] = 'display: none;';
$table->data['all_10'][0] = __('Font size'); $table->data['all_9'][1] = html_print_label_input_block(
$table->colspan['all_10'][1] = '3'; __('Font size'),
$table->data['all_10'][1] = html_print_select( html_print_select(
$fonts, $fonts,
'fonts', 'fonts',
$fonts['12pt'], $fonts['12pt'],
'', '',
'', '',
'', '',
true true
)
); );
$table->rowstyle['modulegraph_simplevalue'] = 'display: none;'; $table->rowstyle['modulegraph_simplevalue'] = 'display: none;';
$table->data['modulegraph_simplevalue'][0] = __('Period'); $table->data['modulegraph_simplevalue'][0] = html_print_label_input_block(
$table->colspan['modulegraph_simplevalue'][1] = '3'; __('Period'),
$table->data['modulegraph_simplevalue'][1] = html_print_extended_select_for_time( html_print_extended_select_for_time(
'period', 'period',
'', '',
'', '',
'', '',
'', '',
false, false,
true true
)
); );
$table->rowstyle['simplevalue'] = 'display: none;'; $table->rowstyle['simplevalue'] = 'display: none;';
$table->data['simplevalue'][0] = __('Process'); $table->data['simplevalue'][0] = html_print_label_input_block(
$table->data['simplevalue'][1] = html_print_select( __('Process'),
[ html_print_select(
PROCESS_VALUE_MIN => __('Min value'), [
PROCESS_VALUE_MAX => __('Max value'), PROCESS_VALUE_MIN => __('Min value'),
PROCESS_VALUE_AVG => __('Avg value'), PROCESS_VALUE_MAX => __('Max value'),
], PROCESS_VALUE_AVG => __('Avg value'),
'process_value', ],
PROCESS_VALUE_AVG, 'process_value',
'', PROCESS_VALUE_AVG,
__('None'), '',
PROCESS_VALUE_NONE, __('None'),
true PROCESS_VALUE_NONE,
true
)
); );
$table->rowstyle['percentileitem_1'] = 'display: none;'; $table->rowstyle['percentileitem_1'] = 'display: none;';
$table->data['percentileitem_1'][0] = __('Width (px)'); $table->data['percentileitem_1'][0] = html_print_label_input_block(
$table->data['percentileitem_1'][1] = html_print_input_text('percentileitem_width', 0, '', 5, 5, true); __('Width (px)'),
html_print_input_text('percentileitem_width', 0, '', 5, 5, true)
);
$table->rowstyle['percentileitem_2'] = 'display: none;'; $table->rowstyle['percentileitem_2'] = 'display: none;';
$table->data['percentileitem_2'][0] = __('Max value'); $table->data['percentileitem_2'][0] = html_print_label_input_block(
$table->data['percentileitem_2'][1] = html_print_input_text('max_value', 0, '', 5, 5, true); __('Max value'),
html_print_input_text('max_value', 0, '', 5, 5, true)
);
$input_percentile = '<div class="inline-radio-button">'.__('Percentile');
$table->rowstyle['percentileitem_3'] = 'display: none;'; $input_percentile .= html_print_radio_button_extended(
$table->data['percentileitem_3'][0] = __('Type');
$table->colspan['percentileitem_3'][1] = '3';
$table->data['percentileitem_3'][1] = __('Percentile').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended(
'type_percentile', 'type_percentile',
'percentile', 'percentile',
'', '',
@ -307,8 +295,10 @@ $table->data['percentileitem_3'][1] = __('Percentile').'&nbsp;&nbsp;&nbsp;'.html
'', '',
'', '',
true true
).'&nbsp;&nbsp;'; );
$table->data['percentileitem_3'][1] .= __('Bubble').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended(
$input_percentile .= __('Bubble');
$input_percentile .= html_print_radio_button_extended(
'type_percentile', 'type_percentile',
'bubble', 'bubble',
'', '',
@ -317,12 +307,17 @@ $table->data['percentileitem_3'][1] .= __('Bubble').'&nbsp;&nbsp;&nbsp;'.html_pr
'', '',
'', '',
true true
).'&nbsp;&nbsp;'; );
$input_percentile .= '</div>';
$table->rowstyle['percentileitem_4'] = 'display: none;'; $table->rowstyle['percentileitem_3'] = 'display: none;';
$table->data['percentileitem_4'][0] = __('Value to show'); $table->data['percentileitem_3'][0] = html_print_label_input_block(
$table->colspan['percentileitem_4'][1] = '3'; __('Type'),
$table->data['percentileitem_4'][1] = __('Percent').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended( $input_percentile
);
$input_value_to_show = '<div class="inline-radio-button">'.__('Percent');
$input_value_to_show .= html_print_radio_button_extended(
'value_show', 'value_show',
'percent', 'percent',
'', '',
@ -331,8 +326,9 @@ $table->data['percentileitem_4'][1] = __('Percent').'&nbsp;&nbsp;&nbsp;'.html_pr
'', '',
'', '',
true true
).'&nbsp;&nbsp;'; );
$table->data['percentileitem_4'][1] .= __('Value').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended( $input_value_to_show .= __('Value');
$input_value_to_show .= html_print_radio_button_extended(
'value_show', 'value_show',
'value', 'value',
'', '',
@ -341,59 +337,50 @@ $table->data['percentileitem_4'][1] .= __('Value').'&nbsp;&nbsp;&nbsp;'.html_pri
'', '',
'', '',
true true
).'&nbsp;&nbsp;'; );
$input_value_to_show .= '</div>';
$table->rowstyle['percentileitem_4'] = 'display: none;';
$table->data['percentileitem_4'][0] = html_print_label_input_block(
__('Value to show'),
$input_value_to_show
);
if (is_metaconsole()) { if (is_metaconsole() === true) {
$sql = 'SELECT id, server_name FROM tmetaconsole_setup';
$table->rowstyle['all_2'] = 'display: none;'; $table->rowstyle['all_2'] = 'display: none;';
$table->data['all_2'][0] = __('Servers'); $table->data['all_2'][0] = html_print_label_input_block(
if ($strict_user) { __('Servers'),
$table->data['all_2'][1] = html_print_select( html_print_select_from_sql(
'', $sql,
'servers', 'servers',
'', '',
'metaconsole_init();', 'metaconsole_init();',
__('All'), __('All'),
'0', '0',
true true
); )
} else {
$sql = 'SELECT id, server_name
FROM tmetaconsole_setup';
}
$table->data['all_2'][1] = html_print_select_from_sql(
$sql,
'servers',
'',
'metaconsole_init();',
__('All'),
'0',
true
); );
} }
$table->rowstyle['all_3'] = 'display: none;'; $table->rowstyle['all_3'] = 'display: none;';
$table->data['all_3'][0] = __('Groups'); $table->data['all_3'][0] = html_print_label_input_block(
$table->colspan['all_3'][1] = '3'; __('Groups'),
$table->data['all_3'][1] = '<div class="w250px">'.html_print_select_groups( html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
'groups', 'groups',
'', '',
'', '',
'', '',
0, 0,
true true
).'</div>'; )
);
$input_one_item_per_agent = '<div class="inline-radio-button">'.__('Yes');
$table->rowstyle['all_one_item_per_agent'] = 'display: none'; $input_one_item_per_agent .= html_print_radio_button_extended(
$table->data['all_one_item_per_agent'][0] = __('One item per agent');
$table->colspan['all_one_item_per_agent'][1] = '3';
$table->data['all_one_item_per_agent'][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended(
'item_per_agent', 'item_per_agent',
1, 1,
'', '',
@ -403,7 +390,8 @@ $table->data['all_one_item_per_agent'][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_
'', '',
true true
).'&nbsp;&nbsp;'; ).'&nbsp;&nbsp;';
$table->data['all_one_item_per_agent'][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended( $input_one_item_per_agent .= __('No');
$input_one_item_per_agent .= html_print_radio_button_extended(
'item_per_agent', 'item_per_agent',
0, 0,
'', '',
@ -413,15 +401,18 @@ $table->data['all_one_item_per_agent'][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_
'', '',
true true
); );
$table->data['all_one_item_per_agent'][1] .= html_print_input_hidden( $input_one_item_per_agent .= html_print_input_hidden(
'item_per_agent_test', 'item_per_agent_test',
0, 0,
true true
); );
$input_one_item_per_agent .= '</div>';
$table->rowstyle['all_one_item_per_agent'] = 'display: none';
$table->rowstyle['all_4'] = 'display: none;'; $table->data['all_one_item_per_agent'][0] = html_print_label_input_block(
$table->data['all_4'][0] = __('Agents').ui_print_help_tip(__('If you select several agents, only the common modules will be displayed'), true); __('One item per agent'),
$input_one_item_per_agent
);
$agents_list = []; $agents_list = [];
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
@ -434,106 +425,142 @@ if (is_metaconsole() === false) {
); );
} }
$table->rowstyle['all_4'] = 'display: none;';
$table->data['all_4'][1] = html_print_select( $table->data['all_4'][0] = html_print_label_input_block(
$agents_list, __('Agents').ui_print_help_tip(
'id_agents[]', __('If you select several agents, only the common modules will be displayed'),
0, true
false, ),
'', html_print_select(
'', $agents_list,
true, 'id_agents[]',
true 0,
); false,
$table->data['all_4'][2] = ' <span class="align-top">'.__('Modules').'</span>'; '',
$table->data['all_4'][3] = html_print_select( '',
[], true,
'module[]', true
0, )
false,
__('None'),
-1,
true,
true
); );
$table->data['all_4'][1] = html_print_label_input_block(
__('Modules'),
html_print_select(
[],
'module[]',
0,
false,
__('None'),
-1,
true,
true
)
);
$table->rowstyle['all_6'] = 'display: none;';
$table->data['all_6'][0] = __('Label');
$label_type = [ $label_type = [
'agent_module' => __('Agent - Module'), 'agent_module' => __('Agent - Module'),
'module' => __('Module'), 'module' => __('Module'),
'agent' => __('Agent'), 'agent' => __('Agent'),
'none' => __('None'), 'none' => __('None'),
]; ];
$table->colspan['all_6'][1] = '3';
$table->data['all_6'][1] = html_print_select( $table->rowstyle['all_6'] = 'display: none;';
$label_type, $table->data['all_6'][0] = html_print_label_input_block(
'label_type', __('Label'),
'agent_module', html_print_select(
$label_type,
'label_type',
'agent_module',
'',
'',
'',
true
)
);
$input_enable_link = '<div class="inline-radio-button">'.__('Yes');
$input_enable_link .= html_print_radio_button_extended(
'enable_link',
1,
'', '',
1,
false,
'', '',
'', '',
true true
); );
$input_enable_link .= __('No');
$input_enable_link .= html_print_radio_button_extended(
'enable_link',
0,
'',
1,
false,
'',
'',
true
);
$input_enable_link .= '</div>';
$table->data['all_6'][1] = html_print_label_input_block(
$table->data['all_7'][0] = __('Enable link agent'); __('Enable link agent'),
$table->colspan['all_7'][1] = '3'; $input_enable_link
$table->data['all_7'][1] = __('Yes').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended('enable_link', 1, '', 1, false, '', '', true).'&nbsp;&nbsp;'; );
$table->data['all_7'][1] .= __('No').'&nbsp;&nbsp;&nbsp;'.html_print_radio_button_extended('enable_link', 0, '', 1, false, '', '', true);
$parents = visual_map_get_items_parents($visualConsole['id']); $parents = visual_map_get_items_parents($visualConsole['id']);
if (empty($parents) === true) { if (empty($parents) === true) {
$parents = []; $parents = [];
} }
$table->data['all_8'][0] = __('Set Parent'); $table->data['all_8'][0] = html_print_label_input_block(
$table->data['all_8'][1] = html_print_select( __('Set Parent'),
[ html_print_select(
VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP => __('Item created in the visualmap'), [
VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP => __('Use the agents relationship (from selected agents)'), VISUAL_MAP_WIZARD_PARENTS_ITEM_MAP => __('Item created in the visualmap'),
], VISUAL_MAP_WIZARD_PARENTS_AGENT_RELANTIONSHIP => __('Use the agents relationship (from selected agents)'),
'kind_relationship', ],
0, 'kind_relationship',
'', 0,
__('None'), '',
VISUAL_MAP_WIZARD_PARENTS_NONE, __('None'),
true VISUAL_MAP_WIZARD_PARENTS_NONE,
true,
false,
true,
'',
false,
'max-width:50%;'
)
); );
$table->data['all_8'][2] = '<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span><span id="parent_column_2_relationship">'.ui_print_help_tip(
__('The parenting relationships in %s will be drawn on the map.', get_product_name()),
true
).'</span>';
$table->data['all_8'][3] = '<span id="parent_column_3_item_in_visual_map">'.html_print_select(
$parents,
'item_in_the_map',
0,
'',
__('None'),
0,
true
).'</span>';
$table->data['all_8'][1] = html_print_label_input_block(
'<span id="parent_column_2_item_in_visual_map">'.__('Item in the map').'</span><span id="parent_column_2_relationship">'.ui_print_help_tip(
__('The parenting relationships in %s will be drawn on the map.', get_product_name()),
true
).'</span>',
'<span id="parent_column_3_item_in_visual_map">'.html_print_select(
$parents,
'item_in_the_map',
0,
'',
__('None'),
0,
true
).'</span>'
);
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
echo '<form method="post" echo '<form method="post" class="max_floating_element_size"
action="index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&tab=wizard&id_visual_console='.$visualConsole['id'].'" action="index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&tab=wizard&id_visual_console='.$visualConsole['id'].'"
onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">'; onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">';
} else { } else {
echo '<form method="post" echo '<form method="post" class="max_floating_element_size"
action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'" action="index.php?sec=network&sec2=godmode/reporting/visual_console_builder&tab='.$activeTab.'&id_visual_console='.$visualConsole['id'].'"
onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">'; onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false; else return check_fields();">';
} }
if (is_metaconsole() === true) {
echo "<div class='title_tactical mrgn_top_15px'>".__('Wizard').'</div>';
}
html_print_table($table); html_print_table($table);
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
@ -543,17 +570,15 @@ if (is_metaconsole() === true) {
} }
html_print_input_hidden('id_visual_console', $visualConsole['id']); html_print_input_hidden('id_visual_console', $visualConsole['id']);
html_print_div( html_print_action_buttons(
[ html_print_submit_button(
'class' => 'action-buttons', __('Add'),
'content' => html_print_submit_button( 'go',
__('Add'), false,
'go', [ 'icon' => 'wand' ],
false, true
[ 'icon' => 'wand' ], ),
true []
),
]
); );
echo '</form>'; echo '</form>';

View File

@ -242,7 +242,7 @@ if ($favorite_array == false) {
echo "<ul class='container'>"; echo "<ul class='container'>";
foreach ($favorite_array as $favorite_k => $favourite_v) { foreach ($favorite_array as $favorite_k => $favourite_v) {
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$favourite_v['id']; $url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$favourite_v['id'];
} else { } else {
$url = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$favourite_v['id']; $url = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$favourite_v['id'];
} }

View File

@ -150,7 +150,7 @@ $table->size[1] = '50%';
$table->data = []; $table->data = [];
$table->colspan = []; $table->colspan = [];
$table->colspan[0][0] = 2; $table->colspan[-1][0] = 2;
$table->data[-1][0] = '<div class="section_table_title">'.__('Licence').'</div>'; $table->data[-1][0] = '<div class="section_table_title">'.__('Licence').'</div>';
$table->colspan[0][0] = 2; $table->colspan[0][0] = 2;

View File

@ -639,7 +639,6 @@ if ($alert_validate === true) {
} }
if ($get_agent_alerts_datatable === true) { if ($get_agent_alerts_datatable === true) {
hd('holaaaaaaaaaaaaaa', true);
// Datatables offset, limit and order. // Datatables offset, limit and order.
$filter_alert = get_parameter('filter', []); $filter_alert = get_parameter('filter', []);
unset($filter_alert[0]); unset($filter_alert[0]);

View File

@ -478,7 +478,7 @@ function visual_map_print_item(
if (!is_metaconsole()) { if (!is_metaconsole()) {
$url = $config['homeurl'].'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = $config['homeurl'].'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} else { } else {
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$layoutData['id_layout_linked'].'&refr=0'; $url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$layoutData['id_layout_linked'].'&refr=0';
} }
} else { } else {
if ($layoutData['id_agente_modulo'] != 0) { if ($layoutData['id_agente_modulo'] != 0) {
@ -565,7 +565,7 @@ function visual_map_print_item(
if ($is_a_link_to_other_visualconsole) { if ($is_a_link_to_other_visualconsole) {
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$url = $config['homeurl'].'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$layoutData['id_layout_linked'].'&refr=300'; $url = $config['homeurl'].'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$layoutData['id_layout_linked'].'&refr=300';
} else { } else {
$url = $config['homeurl'].'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = $config['homeurl'].'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} }
@ -593,7 +593,7 @@ function visual_map_print_item(
$url = 'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = 'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} else { } else {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_visualmap='.$layoutData['id_layout_linked'].'&refr=0'; $url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id='.$layoutData['id_layout_linked'].'&refr=0';
} }
} else if (preg_match('/<a.*href=["\'](.*)["\']>/', $layoutData['label'], $matches)) { } else if (preg_match('/<a.*href=["\'](.*)["\']>/', $layoutData['label'], $matches)) {
// Link to an URL // Link to an URL
@ -641,7 +641,7 @@ function visual_map_print_item(
$url = 'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = 'index.php?sec=network&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} else { } else {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_visualmap='.$layoutData['id_layout_linked'].'&refr=0'; $url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id='.$layoutData['id_layout_linked'].'&refr=0';
} }
} else if ($layoutData['id_agente_modulo'] != 0) { } else if ($layoutData['id_agente_modulo'] != 0) {
// Link to an module // Link to an module
@ -724,7 +724,7 @@ function visual_map_print_item(
$url = 'index.php?sec=reporting&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = 'index.php?sec=reporting&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} else { } else {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
$url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_visualmap='.$layoutData['id_layout_linked'].'&refr=0'; $url = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id='.$layoutData['id_layout_linked'].'&refr=0';
} }
} }
break; break;
@ -780,7 +780,7 @@ function visual_map_print_item(
$url = $config['homeurl'].'/index.php?sec=reporting&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked']; $url = $config['homeurl'].'/index.php?sec=reporting&amp;sec2=operation/visual_console/render_view&amp;pure='.$config['pure'].'&amp;id='.$layoutData['id_layout_linked'];
} else { } else {
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
$url = $config['homeurl'].'/index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id_visualmap='.$layoutData['id_layout_linked'].'&refr=0'; $url = $config['homeurl'].'/index.php?sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&id='.$layoutData['id_layout_linked'].'&refr=0';
} }
} }
break; break;

View File

@ -247,7 +247,8 @@ function agent_changed_by_multiple_agents(event, id_agent, selected) {
id_server: id_server, id_server: id_server,
status_module: module_status, status_module: module_status,
id_group: id_group, id_group: id_group,
pendingdelete: event.target.dataset.pendingdelete // Get pendingdelete attribute from target pendingdelete:
event.target != undefined ? event.target.dataset.pendingdelete : 0 // Get pendingdelete attribute from target
}, },
function(data) { function(data) {
$("#module").empty(); $("#module").empty();

View File

@ -336,7 +336,7 @@ class MapsStatusWidget extends Widget
$url = $config['homeurl']; $url = $config['homeurl'];
if (\is_metaconsole() === true) { if (\is_metaconsole() === true) {
$url .= sprintf( $url .= sprintf(
'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&refr=%s&id_visualmap=%s', 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&refr=%s&id=%s',
$config['vc_refr'], $config['vc_refr'],
$id_layout $id_layout
); );

View File

@ -1147,11 +1147,11 @@ class Item extends CachedModel
return $baseUrl.'?'.http_build_query( return $baseUrl.'?'.http_build_query(
[ [
'sec' => 'screen', 'sec' => 'screen',
'sec2' => 'screens/screens', 'sec2' => 'screens/screens',
'action' => 'visualmap', 'action' => 'visualmap',
'id_visualmap' => $vcId, 'id' => $vcId,
'pure' => (int) (isset($config['pure']) === true) ? $config['pure'] : 0, 'pure' => (int) (isset($config['pure']) === true) ? $config['pure'] : 0,
] ]
); );
} else if (empty($linkedLayoutNodeId) === true } else if (empty($linkedLayoutNodeId) === true

View File

@ -43,6 +43,19 @@ li#li-time-from-to > label:not(:first-child) {
margin-right: 15px; margin-right: 15px;
} }
div.rule-builder-actions {
width: 100%;
z-index: 0;
}
div.rule-builder-actions ul {
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
align-content: center;
}
#rule-builder .rule-builder-actions li label { #rule-builder .rule-builder-actions li label {
width: 0; width: 0;
} }

View File

@ -501,28 +501,6 @@ div#main_pure {
align-items: center; align-items: center;
} }
#form-config-widget .info_box,
.content-widget .info_box {
border-radius: 5px;
width: 100%;
}
#form-config-widget .info_box {
margin: 0 auto;
}
#form-config-widget .info_box tbody tr td,
.content-widget .info_box tbody tr td {
padding: 10px;
}
#form-config-widget .info_box tbody tr td.icon,
.content-widget .info_box tbody tr td.icon {
padding-right: 10px !important;
}
#form-config-widget .info_box tbody tr td {
font-size: 8pt;
}
.content-widget .databox.filters > tbody > tr > td { .content-widget .databox.filters > tbody > tr > td {
padding-right: 30px; padding-right: 30px;
} }

View File

@ -1766,7 +1766,7 @@ div.title_line {
#menu_tab_frame_view, #menu_tab_frame_view,
#menu_tab_frame_view_bc { #menu_tab_frame_view_bc {
position: sticky; position: sticky;
top: 59px; top: 61px;
z-index: 1; z-index: 1;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
@ -1775,7 +1775,7 @@ div.title_line {
width: -webkit-fill-available; width: -webkit-fill-available;
width: -moz-available; width: -moz-available;
padding-right: 0px; padding-right: 0px;
height: 53px; height: 50px;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
margin: -25px -25px 25px -25px; margin: -25px -25px 25px -25px;
@ -2772,7 +2772,8 @@ td.cellBig {
.info_box_container.info_box_information { .info_box_container.info_box_information {
width: -webkit-fill-available; width: -webkit-fill-available;
width: -moz-available; width: -moz-available;
position: relative; position: inherit;
display: flex;
top: 0 !important; top: 0 !important;
right: 0; right: 0;
margin: 0 10px; margin: 0 10px;
@ -10097,7 +10098,6 @@ button.submitButton {
border-radius: 8px; border-radius: 8px;
padding: 0 10px; padding: 0 10px;
cursor: pointer; cursor: pointer;
z-index: 100;
} }
button.buttonButton.mini, button.buttonButton.mini,
@ -11015,7 +11015,7 @@ pre.external_tools_output {
.fixed_filter_bar { .fixed_filter_bar {
position: sticky; position: sticky;
top: 114px; top: 111px;
border: 1px solid #e5e9ed; border: 1px solid #e5e9ed;
background-color: #fff; background-color: #fff;
z-index: 1; z-index: 1;

View File

@ -77,8 +77,7 @@ div#vc-controls img.vc-qr {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 1em 0; padding: 10px 20px;
padding-left: 12px;
} }
.visual-console-edit-controls > span { .visual-console-edit-controls > span {

View File

@ -5,6 +5,7 @@
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
margin-top: 5px; margin-top: 5px;
z-index: 0;
} }
.is-maintenance { .is-maintenance {
@ -857,5 +858,4 @@ div.module-graph .gauge_d3_class {
animation: rotate-second 60s infinite linear; animation: rotate-second 60s infinite linear;
} }
/*# sourceMappingURL=vc.main.css.map*/
/*# sourceMappingURL=vc.main.css.map*/

View File

@ -21,11 +21,7 @@ ui_require_css_file('visual_maps');
check_login(); check_login();
if (!defined('METACONSOLE')) { $id_layout = (int) get_parameter('id');
$id_layout = (int) get_parameter('id');
} else {
$id_layout = (int) get_parameter('id_visualmap');
}
if ($id_layout) { if ($id_layout) {
$default_action = 'edit'; $default_action = 'edit';
@ -247,7 +243,7 @@ if ($config['pure']) {
if (!is_metaconsole()) { if (!is_metaconsole()) {
echo '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'">'; echo '<a href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'">';
} else { } else {
echo '<a href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$id_layout.'&refr='.$refr.'">'; echo '<a href="index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$id_layout.'&refr='.$refr.'">';
} }
echo html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']); echo html_print_image('images/normal_screen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']);

View File

@ -73,7 +73,7 @@ ui_require_css_file('visual_maps');
ui_require_css_file('register'); ui_require_css_file('register');
// Query parameters. // Query parameters.
$visualConsoleId = (int) get_parameter(!is_metaconsole() ? 'id' : 'id_visualmap'); $visualConsoleId = (int) get_parameter('id');
// To hide the menus. // To hide the menus.
$pure = (bool) get_parameter('pure', $config['pure']); $pure = (bool) get_parameter('pure', $config['pure']);
// Refresh interval in seconds. // Refresh interval in seconds.
@ -81,7 +81,6 @@ $refr = (int) get_parameter('refr', $config['vc_refr']);
$width = (int) get_parameter('width', 0); $width = (int) get_parameter('width', 0);
$height = (int) get_parameter('height', 0); $height = (int) get_parameter('height', 0);
// Load Visual Console. // Load Visual Console.
use Models\VisualConsole\Container as VisualConsole; use Models\VisualConsole\Container as VisualConsole;
$visualConsole = null; $visualConsole = null;
@ -207,37 +206,6 @@ $options['view']['text'] = '<a href="index.php?sec=network&sec2=operation/visual
$options['view']['active'] = true; $options['view']['active'] = true;
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
if (!$config['pure']) {
$options['pure']['text'] = '<a id ="full_screen" href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&pure=1&refr='.$refr.'">'.html_print_image(
'images/fullscreen@svg.svg',
true,
[
'title' => __('Full screen mode'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
// 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. // Set the hidden value for the javascript.
html_print_input_hidden('metaconsole', 0); html_print_input_hidden('metaconsole', 0);
} else { } else {
@ -245,6 +213,37 @@ if (is_metaconsole() === false) {
html_print_input_hidden('metaconsole', 1); html_print_input_hidden('metaconsole', 1);
} }
if (!$config['pure']) {
$options['pure']['text'] = '<a id ="full_screen" href="index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&pure=1&refr='.$refr.'">'.html_print_image(
'images/fullscreen@svg.svg',
true,
[
'title' => __('Full screen mode'),
'class' => 'main_menu_icon invert_filter',
]
).'</a>';
// Header.
ui_print_standard_header(
$visualConsoleName,
'images/visual_console.png',
false,
'visual_console_view',
false,
$options,
[
[
'link' => '',
'label' => __('Topology maps'),
],
[
'link' => '',
'label' => __('Visual console'),
],
]
);
}
$edit_capable = (bool) ( $edit_capable = (bool) (
check_acl($config['id_user'], 0, 'VM') check_acl($config['id_user'], 0, 'VM')
|| check_acl($config['id_user'], 0, 'VW') || check_acl($config['id_user'], 0, 'VW')
@ -252,7 +251,7 @@ $edit_capable = (bool) (
if ($pure === false) { if ($pure === false) {
if ($edit_capable === true) { if ($edit_capable === true) {
echo '<div id ="edit-vc">'; echo '<div id ="edit-vc" class="fixed_filter_bar">';
echo '<div id ="edit-controls" class="visual-console-edit-controls" style="visibility:hidden">'; echo '<div id ="edit-controls" class="visual-console-edit-controls" style="visibility:hidden">';
echo '<div class="toolbox-buttons">'; echo '<div class="toolbox-buttons">';
$class_camera = 'camera_min link-create-item'; $class_camera = 'camera_min link-create-item';
@ -403,7 +402,7 @@ if ($pure === false) {
echo '</div>'; echo '</div>';
if ($aclWrite === true || $aclManage === true) { if ($aclWrite === true || $aclManage === true) {
echo '<div class="flex-row" style="width:220px;">'; echo '<div class="flex-row" style="width:220px;padding:10px 30px;">';
if (is_metaconsole() === false) { if (is_metaconsole() === false) {
echo '<div id="force_check_control" class="flex-colum-center">'; echo '<div id="force_check_control" class="flex-colum-center">';
echo html_print_label(__('Force'), 'force-mode', true); echo html_print_label(__('Force'), 'force-mode', true);
@ -476,7 +475,7 @@ if ($pure === true) {
// Quit fullscreen. // Quit fullscreen.
echo '<li class="nomn">'; echo '<li class="nomn">';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$urlNoFull = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap='.$visualConsoleId.'&refr='.$refr; $urlNoFull = 'index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id='.$visualConsoleId.'&refr='.$refr;
} else { } else {
$urlNoFull = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&refr='.$refr; $urlNoFull = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$visualConsoleId.'&refr='.$refr;
} }