diff --git a/pandora_console/godmode/agentes/agent_wizard.php b/pandora_console/godmode/agentes/agent_wizard.php
index 949e1c3a94..c04edf4d66 100644
--- a/pandora_console/godmode/agentes/agent_wizard.php
+++ b/pandora_console/godmode/agentes/agent_wizard.php
@@ -45,3 +45,22 @@ switch ($wizard_section) {
*/
require 'agent_wizard.'.$wizard_section.'.php';
+
+?>
+
\ No newline at end of file
diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php
index 1fd9136a2c..21cb4eb378 100644
--- a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php
+++ b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php
@@ -738,11 +738,16 @@ $servers_to_exec[0] = __('Local console');
if (enterprise_installed()) {
enterprise_include_once('include/functions_satellite.php');
- $rows = get_proxy_servers(true);
+ $rows = get_proxy_servers();
+
+ // Check if satellite server has remote configuration enabled.
+ $satellite_remote = config_agents_has_remote_configuration($id_agent);
+
foreach ($rows as $row) {
if ($row['server_type'] != 13) {
$s_type = ' (Standard)';
} else {
+ $id_satellite = $row['id_server'];
$s_type = ' (Satellite)';
}
@@ -751,7 +756,15 @@ if (enterprise_installed()) {
}
$table->data[1][2] = ''.__('Server to execute command').''.ui_print_help_icon('agent_snmp_explorer_tab', true);
-$table->data[1][3] = html_print_select($servers_to_exec, 'server_to_exec', $server_to_exec, '', '', '', true);
+$table->data[1][3] = html_print_select(
+ $servers_to_exec,
+ 'server_to_exec',
+ $server_to_exec,
+ 'satellite_remote_warn('.$id_satellite.','.$satellite_remote.')',
+ '',
+ '',
+ true
+);
$snmp_versions['1'] = 'v. 1';
$snmp_versions['2'] = 'v. 2';
@@ -1020,6 +1033,8 @@ ui_require_javascript_file('pandora_modules');
var separator = '';
$(document).ready (function () {
+ $('#server_to_exec option').trigger('change');
+
$("#walk_form").submit(function() {
$("#oid_loading").show ();
});
diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
index 50ae676926..40c4e7fc84 100644
--- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
+++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php
@@ -734,20 +734,5 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
"json");
}
-
-function satellite_remote_warn(id_satellite, remote)
-{
- if(!remote)
- {
- $('#server_to_exec option[value='+id_satellite+']').prop('disabled', true);
- $('#satellite_remote_tip').removeAttr("style").show();
- }
- else
- {
- $('#satellite_remote_tip').removeAttr("style").hide();
- }
-
-}
-
/* ]]> */