diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 1bbf1384c8..639017b796 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -618,6 +618,10 @@ if ($id_agente) { case 'module': $type_module_t = get_parameter('moduletype', ''); + if ($_SESSION['create_module']) { + $type_module_t = 'Networking'; + } + $tab_description = '- '.__('Modules'); $tab_name = 'Modules'; if ($type_module_t == 'webux') { @@ -2266,7 +2270,7 @@ if ($updateGIS) { // ----------------------------------- // Load page depending on tab selected // ----------------------------------- -if (!$_SESSION['create_module']) { +if ($_SESSION['create_module']) { $edit_module = true; } diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index feb52a945c..2972998b9a 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -321,7 +321,7 @@ if ($id_agent_module) { } else { if (!isset($moduletype)) { $moduletype = (string) get_parameter('moduletype'); - if (!$_SESSION['create_module']) { + if ($_SESSION['create_module']) { $moduletype = 'networkserver'; } diff --git a/pandora_console/include/class/NewInstallationWelcomeWindow.class.php b/pandora_console/include/class/NewInstallationWelcomeWindow.class.php index 7eab288cc6..62c06213cb 100644 --- a/pandora_console/include/class/NewInstallationWelcomeWindow.class.php +++ b/pandora_console/include/class/NewInstallationWelcomeWindow.class.php @@ -365,6 +365,7 @@ class NewInstallationWelcomeWindow extends Wizard { $sec2 = get_parameter('sec2', ''); $mail_user = get_parameter('email_username', ''); + $mail_configured = db_get_value('value', 'tconfig', 'token', 'email_username'); $_SESSION['agente'] = db_get_value('MAX(id_agente)', 'tagente'); if ($sec2 == '' && $config['initial_wizard'] == false) { @@ -374,7 +375,7 @@ class NewInstallationWelcomeWindow extends Wizard $welcome->run(); } - if ($mail_user !== '' && $sec2 === 'godmode/setup/setup' && !$_SESSION['mail_configured']) { + if ($mail_user !== '' && $sec2 === 'godmode/setup/setup' && !$_SESSION['mail_configured'] && $mail_configured) { $welcome = new NewInstallationWelcomeWindow( 'general/new_installation_welcome_window' ); @@ -383,7 +384,6 @@ class NewInstallationWelcomeWindow extends Wizard } $create_agent = (bool) get_parameter('create_agent'); - $_SESSION['create_module'] = false; if ($create_agent && $sec2 === 'godmode/agentes/configurar_agente' && $_SESSION['create_agent']) { $welcome = new NewInstallationWelcomeWindow( 'general/new_installation_welcome_window' @@ -395,7 +395,7 @@ class NewInstallationWelcomeWindow extends Wizard $create_module = (bool) get_parameter('create_module'); $sec2_module = explode('&', ui_get_full_url()); - if ($create_agent && $sec2_module[2] === 'tab=module' && $_SESSION['create_module']) { + if ($create_agent && $sec2_module[2] === 'tab=module' && !$_SESSION['create_module']) { $welcome = new NewInstallationWelcomeWindow( 'general/new_installation_welcome_window' ); @@ -407,8 +407,8 @@ class NewInstallationWelcomeWindow extends Wizard $create_alert = (int) get_parameter('create_alert', 0); - $check_module = db_get_value('MAX(id_module)', 'tmodule'); - if ($create_alert && $sec2_alert[2] == 'tab=alert' && $_SESSION['create_alert']) { + // $check_module = db_get_value('MAX(id_module)', 'tmodule'); + if ($create_alert && $sec2_alert[2] == 'tab=alert' && !$_SESSION['create_alert']) { $welcome = new NewInstallationWelcomeWindow( 'general/new_installation_welcome_window' ); @@ -416,8 +416,6 @@ class NewInstallationWelcomeWindow extends Wizard $_SESSION['create_alert'] = true; } - $_SESSION['create_module'] = true; - } @@ -430,27 +428,46 @@ class NewInstallationWelcomeWindow extends Wizard if( '..') { document.getElementById("button-btn_email_conf").className = "btn_email_conf_ok"; document.getElementById("button-btn_email_conf").onclick = ""; - document.getElementById("button-btn_create_agent").className = "btn_email_conf"; + + document.getElementById("button-btn_create_agent").className = "btn_agent_on"; document.getElementById("button-btn_create_agent").setAttribute('onclick', 'createNewAgent()'); } - if( '..') { + if( '..') { document.getElementById("button-btn_create_agent").className = "btn_agent_ok"; - document.getElementById("button-btn_check_agent").className = "btn_email_conf"; + document.getElementById("button-btn_create_agent").onclick = ""; + + document.getElementById("button-btn_check_agent").className = "btn_agent_online_on"; document.getElementById("button-btn_check_agent").setAttribute('onclick', 'checkAgentOnline()'); - + } + if( '..') { + document.getElementById("button-btn_check_agent").className = "btn_agent_online_ok"; + document.getElementById("button-btn_check_agent").onclick = ""; + + + document.getElementById("button-btn_create_alert").className = "btn_alert_module_on"; + document.getElementById("button-btn_create_alert").setAttribute('onclick', 'createAlertModule()'); + + } + + if( '..') { - document.getElementById("button-btn_create_alert").className = "btn_alert_module_ok"; - document.getElementById("button-btn_create_alert").onclick = ""; - document.getElementById("button-btn_discover_devices").className = "btn_email_conf"; + document.getElementById("button-btn_create_alert").className = "btn_alert_module__ok"; + document.getElementById("button-btn_create_alert").onclick = ""; + + + document.getElementById("button-btn_discover_devices").className = "btn_discover_on"; document.getElementById("button-btn_discover_devices").setAttribute('onclick', 'discoverDevicesNetwork()'); } - + if('..'){ + document.getElementById("button-btn_discover_devices").className = "btn_discover_ok"; + document.getElementById("button-btn_discover_devices").onclick = ""; + } function configureEmail() { @@ -484,7 +501,7 @@ class NewInstallationWelcomeWindow extends Wizard { window.open(''); - + } diff --git a/pandora_console/include/styles/new_installation_welcome_window.css b/pandora_console/include/styles/new_installation_welcome_window.css index b7af7dbf1e..fc8c2876d4 100644 --- a/pandora_console/include/styles/new_installation_welcome_window.css +++ b/pandora_console/include/styles/new_installation_welcome_window.css @@ -75,7 +75,7 @@ label { } .btn_alert_module { background-image: url(../../images/go_next_g.png); - margin-left: 120px; + margin-left: 115px; width: 25px; border: none; } @@ -93,6 +93,37 @@ label { border: none; } +.btn_agent_on { + background-image: url(../../images/darrowright.png); + margin-left: 469px; + width: 25px; + border: none; +} +.btn_agent_online_on { + background-image: url(../../images/darrowright.png); + margin-left: 213px; + width: 25px; + border: none; +} +.btn_alert_module_on { + background-image: url(../../images/darrowright.png); + margin-left: 115px; + width: 25px; + border: none; +} +.btn_remote-command_on { + background-image: url(../../images/darrowright.png); + margin-left: 295px; + width: 25px; + border: none; +} + +.btn_discover_on { + background-image: url(../../images/darrowright.png); + margin-left: 323px; + width: 25px; + border: none; +} .btn_is_not_ok { background-image: url(../../images/icono_warning.png); margin-left: 288px; @@ -121,7 +152,7 @@ label { .btn_alert_module_ok { background-image: url(../../images/input_tick.png); background-repeat: no-repeat; - margin-left: 120px; + margin-left: 115px; width: 20px; border: none; }