SelfService: provide ConvertEndpointIPConfig

refs 
This commit is contained in:
Thomas Gelf 2020-11-24 17:57:36 +01:00
parent f77de7992b
commit 0cb0904d14
3 changed files with 34 additions and 18 deletions
application
library/Director

View File

@ -268,7 +268,8 @@ class SelfServiceController extends ActionController
'fetch_agent_name' => $settings->get('self-service/agent_name') === 'hostname', 'fetch_agent_name' => $settings->get('self-service/agent_name') === 'hostname',
'fetch_agent_fqdn' => $settings->get('self-service/agent_name') === 'fqdn', 'fetch_agent_fqdn' => $settings->get('self-service/agent_name') === 'fqdn',
'transform_hostname' => $transform, 'transform_hostname' => $transform,
'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y' 'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y',
'ConvertEndpointIPConfig' => '0',
]; ];
$username = $settings->get('self-service/icinga_service_user'); $username = $settings->get('self-service/icinga_service_user');
if (strlen($username)) { if (strlen($username)) {

View File

@ -39,6 +39,19 @@ class SelfServiceSettingsForm extends DirectorForm
], ],
'value' => $settings->getStoredOrDefaultValue('self-service/transform_hostname') 'value' => $settings->getStoredOrDefaultValue('self-service/transform_hostname')
]); ]);
$this->addElement('select', 'transform_parent_host', [
'label' => $this->translate('Transform Parent Host to IP'),
'description' => $this->translate(
'This is only important in case your master/satellite nodes do not'
. ' have IP addresses as their "host" property. The Agent can be'
. ' told to issue related DNS lookups on it\' own'
),
'multiOptions' => [
'0' => $this->translate("Don't care, my host settings are fine"),
'1' => $this->translate('My Agents should use DNS to look up Endpoint names'),
],
'value' => $settings->getStoredOrDefaultValue('self-service/transform_parent_host')
]);
$this->addElement('extensibleSet', 'global_zones', [ $this->addElement('extensibleSet', 'global_zones', [
'label' => $this->translate('Global Zones'), 'label' => $this->translate('Global Zones'),

View File

@ -13,7 +13,8 @@ class Settings
protected $defaults = [ protected $defaults = [
'default_global_zone' => 'director-global', 'default_global_zone' => 'director-global',
'icinga_package_name' => 'director', 'icinga_package_name' => 'director',
'magic_apply_for' => '_director_apply_for', /* @deprecated to be removed in 1.8.0 #1850 #1851 */ /* @deprecated to be removed in 1.8.0 #1850 #1851 */
'magic_apply_for' => '_director_apply_for',
'config_format' => 'v2', 'config_format' => 'v2',
'override_services_varname' => '_override_servicevars', 'override_services_varname' => '_override_servicevars',
'override_services_templatename' => 'host var overrides (Director)', 'override_services_templatename' => 'host var overrides (Director)',
@ -24,6 +25,7 @@ class Settings
'activation_script_v1' => null, 'activation_script_v1' => null,
'self-service/agent_name' => 'fqdn', 'self-service/agent_name' => 'fqdn',
'self-service/transform_hostname' => '0', 'self-service/transform_hostname' => '0',
'self-service/transform_parent_host' => '0',
'self-service/global_zones' => ['director-global'], 'self-service/global_zones' => ['director-global'],
'ignore_bug7530' => 'n', 'ignore_bug7530' => 'n',
// 'experimental_features' => null, // 'allow' // 'experimental_features' => null, // 'allow'