Resolve conflicts

This commit is contained in:
Tatiana Llorente 2020-01-08 15:44:59 +01:00
parent eb222cc82f
commit 7701ff7ad1
1 changed files with 116 additions and 129 deletions

View File

@ -133,149 +133,136 @@ $buttons['notifications'] = [
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=notifications').'">'.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'</a>', 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=notifications').'">'.html_print_image('images/alerts_template.png', true, ['title' => __('Notifications')]).'</a>',
]; ];
$buttons['gis'] = [
'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup&section=gis').'">'.html_print_image('images/gis_tab.png', true, ['title' => __('GIS Map connection')]).'</a>',
$buttons['websocket_engine'] = [ $buttons['websocket_engine'] = [
'active' => false, 'active' => false,
'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=websocket_engine').'">'.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'</a>', 'text' => '<a href="'.ui_get_full_url('index.php?sec=gsetup&sec2=godmode/setup/setup&section=websocket_engine').'">'.html_print_image('images/websocket_small.png', true, ['title' => __('Websocket engine')]).'</a>',
]; ];
$help_header = ''; $help_header = '';
if (enterprise_installed()) { if (enterprise_installed()) {
$subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header); $subpage = setup_enterprise_add_subsection_main($section, $buttons, $help_header);
}
switch ($section) {
case 'general':
$buttons['general']['active'] = true;
$subpage = ' &raquo '.__('General');
$help_header = 'setup_general_tab';
break;
case 'auth':
$buttons['auth']['active'] = true;
$subpage = ' &raquo '.__('Authentication');
break;
case 'perf':
$buttons['perf']['active'] = true;
$subpage = ' &raquo '.__('Performance');
$help_header = '';
break;
case 'vis':
$buttons['vis']['active'] = true;
$subpage = ' &raquo '.__('Visual styles');
break;
case 'net':
$buttons['net']['active'] = true;
$subpage = ' &raquo '.__('Netflow');
break;
case 'ehorus':
$buttons['ehorus']['active'] = true;
$subpage = ' &raquo '.__('eHorus');
$help_header = 'setup_ehorus_tab';
break;
case 'integria':
$buttons['integria']['active'] = true;
$subpage = ' &raquo '.__('Integria IMS');
$help_header = 'setup_integria_tab';
break;
case 'notifications':
$buttons['notifications']['active'] = true;
$subpage = ' &raquo '.__('Notifications');
break;
case 'websocket_engine':
$buttons['websocket_engine']['active'] = true;
$subpage = ' &raquo '.__('Pandora Websocket Engine');
$help_header = 'quickshell_settings';
break;
case 'enterprise':
$buttons['enterprise']['active'] = true;
$subpage = ' &raquo '.__('Enterprise');
$help_header = 'setup_enterprise_tab';
break;
default:
// Default.
break;
}
// Header.
ui_print_page_header(
__('Configuration').$subpage,
'',
false,
$help_header,
true,
$buttons
);
if (isset($config['error_config_update_config'])) {
if ($config['error_config_update_config']['correct'] == false) {
ui_print_error_message($config['error_config_update_config']['message']);
} else {
ui_print_success_message(__('Correct update the setup options'));
} }
switch ($section) { unset($config['error_config_update_config']);
case 'general': }
$buttons['general']['active'] = true;
$subpage = ' &raquo '.__('General');
$help_header = 'setup_general_tab';
break;
case 'auth': switch ($section) {
$buttons['auth']['active'] = true; case 'general':
$subpage = ' &raquo '.__('Authentication'); include_once $config['homedir'].'/godmode/setup/setup_general.php';
break; break;
case 'perf': case 'auth':
$buttons['perf']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_auth.php';
$subpage = ' &raquo '.__('Performance'); break;
$help_header = '';
break;
case 'vis': case 'perf':
$buttons['vis']['active'] = true; include_once $config['homedir'].'/godmode/setup/performance.php';
$subpage = ' &raquo '.__('Visual styles'); break;
break;
case 'net': case 'net':
$buttons['net']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
$subpage = ' &raquo '.__('Netflow'); break;
break;
case 'ehorus': case 'vis':
$buttons['ehorus']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
$subpage = ' &raquo '.__('eHorus'); break;
$help_header = 'setup_ehorus_tab';
break;
case 'integria': case 'ehorus':
$buttons['integria']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_ehorus.php';
$subpage = ' &raquo '.__('Integria IMS'); break;
$help_header = 'setup_integria_tab';
break;
case 'gis': case 'integria':
$buttons['gis']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_integria.php';
$subpage = ' &raquo '.__('Map conections GIS'); break;
break;
case 'notifications': case 'notifications':
$buttons['notifications']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_notifications.php';
$subpage = ' &raquo '.__('Notifications'); break;
break;
case 'websocket_engine': case 'websocket_engine':
$buttons['websocket_engine']['active'] = true; include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php';
$subpage = ' &raquo '.__('Pandora Websocket Engine'); break;
$help_header = 'quickshell_settings';
break;
case 'enterprise': default:
$buttons['enterprise']['active'] = true; enterprise_hook('setup_enterprise_select_tab', [$section]);
$subpage = ' &raquo '.__('Enterprise'); break;
$help_header = 'setup_enterprise_tab'; }
break;
default:
// Default.
break;
}
// Header.
ui_print_page_header(
__('Configuration').$subpage,
'',
false,
$help_header,
true,
$buttons
);
if (isset($config['error_config_update_config'])) {
if ($config['error_config_update_config']['correct'] == false) {
ui_print_error_message($config['error_config_update_config']['message']);
} else {
ui_print_success_message(__('Correct update the setup options'));
}
unset($config['error_config_update_config']);
}
switch ($section) {
case 'general':
include_once $config['homedir'].'/godmode/setup/setup_general.php';
break;
case 'auth':
include_once $config['homedir'].'/godmode/setup/setup_auth.php';
break;
case 'perf':
include_once $config['homedir'].'/godmode/setup/performance.php';
break;
case 'net':
include_once $config['homedir'].'/godmode/setup/setup_netflow.php';
break;
case 'vis':
include_once $config['homedir'].'/godmode/setup/setup_visuals.php';
break;
case 'ehorus':
include_once $config['homedir'].'/godmode/setup/setup_ehorus.php';
break;
case 'integria':
include_once $config['homedir'].'/godmode/setup/setup_integria.php';
break;
case 'gis':
include_once $config['homedir'].'/godmode/setup/gis.php';
break;
case 'notifications':
include_once $config['homedir'].'/godmode/setup/setup_notifications.php';
break;
case 'websocket_engine':
include_once $config['homedir'].'/godmode/setup/setup_websocket_engine.php';
break;
default:
enterprise_hook('setup_enterprise_select_tab', [$section]);
break;
}