mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-11606-Quitar-consolas-visuales-legacy' into 'develop'
remove legacy visual console See merge request artica/pandorafms!6140
This commit is contained in:
commit
c2d7c10442
@ -233,11 +233,8 @@ echo sprintf('<div id="header_table" class="header_table_%s">', $menuTypeClass);
|
|||||||
|
|
||||||
$header_autorefresh = '';
|
$header_autorefresh = '';
|
||||||
$header_autorefresh_counter = '';
|
$header_autorefresh_counter = '';
|
||||||
if ($config['legacy_vc']
|
|
||||||
|| ($_GET['sec2'] !== 'operation/visual_console/render_view')
|
if (($_GET['sec2'] !== 'operation/visual_console/render_view')) {
|
||||||
|| (($_GET['sec2'] !== 'operation/visual_console/render_view')
|
|
||||||
&& $config['legacy_vc'])
|
|
||||||
) {
|
|
||||||
if ($autorefresh_list !== null
|
if ($autorefresh_list !== null
|
||||||
&& array_search($_GET['sec2'], $autorefresh_list) !== false
|
&& array_search($_GET['sec2'], $autorefresh_list) !== false
|
||||||
) {
|
) {
|
||||||
|
@ -837,12 +837,6 @@ $buttons['wizard'] = [
|
|||||||
'active' => false,
|
'active' => false,
|
||||||
'text' => '<a href="'.$url_base.$action.'&tab=wizard&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wizard@svg.svg', true, ['title' => __('Wizard'), 'class' => 'invert_filter']).'</a>',
|
'text' => '<a href="'.$url_base.$action.'&tab=wizard&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/wizard@svg.svg', true, ['title' => __('Wizard'), 'class' => 'invert_filter']).'</a>',
|
||||||
];
|
];
|
||||||
if ($config['legacy_vc']) {
|
|
||||||
$buttons['editor'] = [
|
|
||||||
'active' => false,
|
|
||||||
'text' => '<a href="'.$url_base.$action.'&tab=editor&id_visual_console='.$idVisualConsole.'">'.html_print_image('images/builder@svg.svg', true, ['title' => __('Builder'), 'class' => 'invert_filter']).'</a>',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
$buttons['view'] = [
|
$buttons['view'] = [
|
||||||
'active' => false,
|
'active' => false,
|
||||||
|
@ -1344,17 +1344,6 @@ $table_vc->style[0] = 'font-weight: bold';
|
|||||||
$table_vc->size[0] = '50%';
|
$table_vc->size[0] = '50%';
|
||||||
$table_vc->data = [];
|
$table_vc->data = [];
|
||||||
|
|
||||||
// Remove when the new view reaches rock solid stability.
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
|
||||||
__('Legacy Visual Console View'),
|
|
||||||
html_print_checkbox_switch(
|
|
||||||
'legacy_vc',
|
|
||||||
1,
|
|
||||||
(bool) $config['legacy_vc'],
|
|
||||||
true
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Default cache expiration'),
|
__('Default cache expiration'),
|
||||||
html_print_extended_select_for_time(
|
html_print_extended_select_for_time(
|
||||||
@ -1372,7 +1361,6 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||||||
$intervals
|
$intervals
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$row++;
|
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Default interval for refresh on Visual Console'),
|
__('Default interval for refresh on Visual Console'),
|
||||||
@ -1388,6 +1376,7 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$row++;
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Type of view of visual consoles'),
|
__('Type of view of visual consoles'),
|
||||||
@ -1401,12 +1390,12 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$row++;
|
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Number of favorite visual consoles to show in the menu'),
|
__('Number of favorite visual consoles to show in the menu'),
|
||||||
"<input ' value=".$config['vc_menu_items']." size='5' name='vc_menu_items' min='0' max='25'>"
|
"<input ' value=".$config['vc_menu_items']." size='5' name='vc_menu_items' min='0' max='25'>"
|
||||||
);
|
);
|
||||||
|
$row++;
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Default line thickness for the Visual Console'),
|
__('Default line thickness for the Visual Console'),
|
||||||
@ -1419,7 +1408,6 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$row++;
|
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Lock screen orientation when viewing on mobile devices'),
|
__('Lock screen orientation when viewing on mobile devices'),
|
||||||
@ -1430,6 +1418,7 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$row++;
|
||||||
|
|
||||||
$table_vc->data[$row][] = html_print_label_input_block(
|
$table_vc->data[$row][] = html_print_label_input_block(
|
||||||
__('Display item frame on alert triggered'),
|
__('Display item frame on alert triggered'),
|
||||||
|
@ -3479,10 +3479,6 @@ function config_process_config()
|
|||||||
config_update_value('dbtype', 'mysql');
|
config_update_value('dbtype', 'mysql');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['legacy_vc'])) {
|
|
||||||
config_update_value('legacy_vc', 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($config['vc_default_cache_expiration'])) {
|
if (!isset($config['vc_default_cache_expiration'])) {
|
||||||
config_update_value('vc_default_cache_expiration', 60);
|
config_update_value('vc_default_cache_expiration', 60);
|
||||||
}
|
}
|
||||||
|
@ -1274,7 +1274,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||||||
);
|
);
|
||||||
$form_items_advance['element_group_row']['html'] .= '</td>';
|
$form_items_advance['element_group_row']['html'] .= '</td>';
|
||||||
|
|
||||||
if (!$config['legacy_vc']) {
|
|
||||||
$intervals = [
|
$intervals = [
|
||||||
10 => '10 '.__('seconds'),
|
10 => '10 '.__('seconds'),
|
||||||
30 => '30 '.__('seconds'),
|
30 => '30 '.__('seconds'),
|
||||||
@ -1319,7 +1318,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background)
|
|||||||
$intervals
|
$intervals
|
||||||
);
|
);
|
||||||
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
|
$form_items_advance['cache_expiration_row']['html'] .= '</td>';
|
||||||
}
|
|
||||||
|
|
||||||
// Insert and modify before the buttons to create or update.
|
// Insert and modify before the buttons to create or update.
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
@ -1454,12 +1452,9 @@ function visual_map_editor_print_toolbox()
|
|||||||
visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item', true);
|
visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item', true);
|
||||||
visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item', true);
|
visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item', true);
|
||||||
visual_map_print_button_editor('color_cloud', __('Color cloud'), 'left', false, 'color_cloud_min', true);
|
visual_map_print_button_editor('color_cloud', __('Color cloud'), 'left', false, 'color_cloud_min', true);
|
||||||
if (isset($config['legacy_vc']) === false
|
|
||||||
|| (bool) $config['legacy_vc'] === false
|
|
||||||
) {
|
|
||||||
// Applies only on modern VC.
|
// Applies only on modern VC.
|
||||||
visual_map_print_button_editor('network_link', __('Network link'), 'left', false, 'network_link_min', true);
|
visual_map_print_button_editor('network_link', __('Network link'), 'left', false, 'network_link_min', true);
|
||||||
}
|
|
||||||
|
|
||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
echo '<a href="javascript:" class="tip"><img src="'.$config['homeurl_static'].'/images/tip.png" data-title="The data displayed in editor mode is not real" data-use_title_for_force_title="1"
|
echo '<a href="javascript:" class="tip"><img src="'.$config['homeurl_static'].'/images/tip.png" data-title="The data displayed in editor mode is not real" data-use_title_for_force_title="1"
|
||||||
|
@ -60,7 +60,6 @@ class Home
|
|||||||
'icon' => 'ui-icon-menu-group ui-widget-icon-floatbeginning ui-icon-menu-square',
|
'icon' => 'ui-icon-menu-group ui-widget-icon-floatbeginning ui-icon-menu-square',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ((bool) $system->getConfig('legacy_vc', false) === false) {
|
|
||||||
// Show Visual consoles only if new system is enabled.
|
// Show Visual consoles only if new system is enabled.
|
||||||
$items['visualmaps'] = [
|
$items['visualmaps'] = [
|
||||||
'name' => __('Visual consoles'),
|
'name' => __('Visual consoles'),
|
||||||
@ -68,7 +67,6 @@ class Home
|
|||||||
'menu_item' => true,
|
'menu_item' => true,
|
||||||
'icon' => 'ui-icon-menu-visual_console ui-widget-icon-floatbeginning ui-icon-menu-square',
|
'icon' => 'ui-icon-menu-visual_console ui-widget-icon-floatbeginning ui-icon-menu-square',
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
$items['alerts'] = [
|
$items['alerts'] = [
|
||||||
'name' => __('Alerts'),
|
'name' => __('Alerts'),
|
||||||
|
@ -15,13 +15,8 @@
|
|||||||
// The session is configured and started inside the config process.
|
// The session is configured and started inside the config process.
|
||||||
require_once '../../include/config.php';
|
require_once '../../include/config.php';
|
||||||
|
|
||||||
$legacy = (bool) get_parameter('legacy', $config['legacy_vc']);
|
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
$config['requirements_use_base_url'] = true;
|
$config['requirements_use_base_url'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($legacy === false) {
|
require_once $config['homedir'].'/operation/visual_console/public_view.php';
|
||||||
include_once $config['homedir'].'/operation/visual_console/public_view.php';
|
|
||||||
} else {
|
|
||||||
include_once $config['homedir'].'/operation/visual_console/legacy_public_view.php';
|
|
||||||
}
|
|
||||||
|
@ -13,9 +13,4 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$legacy = (bool) get_parameter('legacy', $config['legacy_vc']);
|
require_once $config['homedir'].'/operation/visual_console/view.php';
|
||||||
if ($legacy === false) {
|
|
||||||
include_once $config['homedir'].'/operation/visual_console/view.php';
|
|
||||||
} else {
|
|
||||||
include_once $config['homedir'].'/operation/visual_console/legacy_view.php';
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user