mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Make isDockerSocketProxyEnabled an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
af76dbaeeb
commit
33fb191dfc
5 changed files with 10 additions and 24 deletions
|
|
@ -135,7 +135,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
|||
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
|
||||
'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(),
|
||||
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
|
||||
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(),
|
||||
'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled,
|
||||
'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled,
|
||||
'community_containers' => $configurationManager->listAvailableCommunityContainers(),
|
||||
'community_containers_enabled' => $configurationManager->GetEnabledCommunityContainers(),
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ readonly class ContainerDefinitionFetcher {
|
|||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-docker-socket-proxy') {
|
||||
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
||||
if (!$this->configurationManager->isDockerSocketProxyEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-whiteboard') {
|
||||
|
|
@ -196,7 +196,7 @@ readonly class ContainerDefinitionFetcher {
|
|||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-docker-socket-proxy') {
|
||||
if (!$this->configurationManager->isDockerSocketProxyEnabled()) {
|
||||
if (!$this->configurationManager->isDockerSocketProxyEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-whiteboard') {
|
||||
|
|
|
|||
|
|
@ -114,11 +114,7 @@ readonly class ConfigurationController {
|
|||
} else {
|
||||
$this->configurationManager->SetFulltextsearchEnabledState(0);
|
||||
}
|
||||
if (isset($request->getParsedBody()['docker-socket-proxy'])) {
|
||||
$this->configurationManager->SetDockerSocketProxyEnabledState(1);
|
||||
} else {
|
||||
$this->configurationManager->SetDockerSocketProxyEnabledState(0);
|
||||
}
|
||||
$this->configurationManager->isDockerSocketProxyEnabled = isset($request->getParsedBody()['docker-socket-proxy']);
|
||||
$this->configurationManager->isWhiteboardEnabled = isset($request->getParsedBody()['whiteboard']);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ class ConfigurationManager
|
|||
set { $this->set('password', $value); }
|
||||
}
|
||||
|
||||
public bool $isDockerSocketProxyEnabled {
|
||||
get => $this->get('isDockerSocketProxyEnabled', false);
|
||||
set { $this->set('isDockerSocketProxyEnabled', $value); }
|
||||
}
|
||||
|
||||
public bool $isWhiteboardEnabled {
|
||||
get => $this->get('isWhiteboardEnabled', true);
|
||||
set { $this->set('isWhiteboardEnabled', $value); }
|
||||
|
|
@ -202,21 +207,6 @@ class ConfigurationManager
|
|||
}
|
||||
}
|
||||
|
||||
public function isDockerSocketProxyEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isDockerSocketProxyEnabled']) && $config['isDockerSocketProxyEnabled'] === 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function SetDockerSocketProxyEnabledState(int $value) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['isDockerSocketProxyEnabled'] = $value;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function SetClamavEnabledState(int $value) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['isClamavEnabled'] = $value;
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ readonly class DockerActionManager {
|
|||
'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(),
|
||||
'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled() ? 'yes' : '',
|
||||
'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled() ? 'yes' : '',
|
||||
'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled() ? 'yes' : '',
|
||||
'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '',
|
||||
'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->GetNextcloudUploadLimit(),
|
||||
'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->GetNextcloudMemoryLimit(),
|
||||
'NEXTCLOUD_MAX_TIME' => $this->configurationManager->GetNextcloudMaxTime(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue