mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
parent
0fa784e0a9
commit
5931c4ee5e
@ -130,6 +130,8 @@ class SelfServiceController extends ActionController
|
|||||||
foreach ($params as $key => $value) {
|
foreach ($params as $key => $value) {
|
||||||
if (is_bool($value)) {
|
if (is_bool($value)) {
|
||||||
$value = $this->makePowerShellBoolean($value);
|
$value = $this->makePowerShellBoolean($value);
|
||||||
|
} elseif (is_array($value)) {
|
||||||
|
$value = implode(',', $value);
|
||||||
}
|
}
|
||||||
$plain .= "$key: $value\r\n";
|
$plain .= "$key: $value\r\n";
|
||||||
}
|
}
|
||||||
@ -191,7 +193,7 @@ class SelfServiceController extends ActionController
|
|||||||
'transform_hostname' => $settings->get('self-service/transform_hostname'),
|
'transform_hostname' => $settings->get('self-service/transform_hostname'),
|
||||||
'parent_zone' => $zoneName,
|
'parent_zone' => $zoneName,
|
||||||
'ca_server' => $master->getObjectName(),
|
'ca_server' => $master->getObjectName(),
|
||||||
'parent_endpoints' => implode(',', $zone->listEndpoints()),
|
'parent_endpoints' => $zone->listEndpoints(),
|
||||||
'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y'
|
'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y'
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -199,7 +201,11 @@ class SelfServiceController extends ActionController
|
|||||||
$params['download_url'] = $settings->get('self-service/download_url');
|
$params['download_url'] = $settings->get('self-service/download_url');
|
||||||
$params['agent_version'] = $settings->get('self-service/agent_version');
|
$params['agent_version'] = $settings->get('self-service/agent_version');
|
||||||
$params['allow_updates'] = $settings->get('self-service/allow_updates') === 'y';
|
$params['allow_updates'] = $settings->get('self-service/allow_updates') === 'y';
|
||||||
|
|
||||||
$params['accept_config'] = $host->getSingleResolvedProperty('accept_config')=== 'y';
|
$params['accept_config'] = $host->getSingleResolvedProperty('accept_config')=== 'y';
|
||||||
|
if ($hashes = $settings->get('self-service/installer_hashes')) {
|
||||||
|
$params['installer_hashes'] = json_decode($hashes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getRequest()->getHeader('X-Director-Accept') === 'text/plain') {
|
if ($this->getRequest()->getHeader('X-Director-Accept') === 'text/plain') {
|
||||||
|
@ -114,6 +114,12 @@ class SelfServiceSettingsForm extends DirectorForm
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$hashes = $settings->getStoredOrDefaultValue('self-service/installer_hashes');
|
||||||
|
if ($hashes) {
|
||||||
|
$hashes = json_decode($hashes);
|
||||||
|
} else {
|
||||||
|
$hashes = null;
|
||||||
|
}
|
||||||
$this->addElement('extensibleSet', 'installer_hashes', [
|
$this->addElement('extensibleSet', 'installer_hashes', [
|
||||||
'label' => $this->translate('Installer Hashes'),
|
'label' => $this->translate('Installer Hashes'),
|
||||||
'description' => $this->translate(
|
'description' => $this->translate(
|
||||||
@ -125,7 +131,7 @@ class SelfServiceSettingsForm extends DirectorForm
|
|||||||
. ' the downloaded MSI package is not matching one of the'
|
. ' the downloaded MSI package is not matching one of the'
|
||||||
. ' provided hashes of this setting'
|
. ' provided hashes of this setting'
|
||||||
),
|
),
|
||||||
'value' => $settings->getStoredOrDefaultValue('self-service/installer_hashes'),
|
'value' => $hashes,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addBoolean('allow_updates', [
|
$this->addBoolean('allow_updates', [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user