mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-30 23:40:08 +00:00
Add EuroOffice support modeled after OnlyOffice implementation
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/bd87016f-c321-49f1-93dd-d8baab660d3f Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
99ea91c5ef
commit
8471d870eb
@@ -6,6 +6,7 @@
|
||||
"documentation": "https://github.com/nextcloud/all-in-one/discussions/2105",
|
||||
"depends_on": [
|
||||
"nextcloud-aio-onlyoffice",
|
||||
"nextcloud-aio-eurooffice",
|
||||
"nextcloud-aio-collabora",
|
||||
"nextcloud-aio-talk",
|
||||
"nextcloud-aio-notify-push",
|
||||
@@ -47,6 +48,7 @@
|
||||
"APACHE_PORT=%APACHE_PORT%",
|
||||
"AIO_LOG_LEVEL=%AIO_LOG_LEVEL%",
|
||||
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
|
||||
"EUROOFFICE_HOST=nextcloud-aio-eurooffice",
|
||||
"TZ=%TIMEZONE%",
|
||||
"APACHE_MAX_SIZE=%APACHE_MAX_SIZE%",
|
||||
"APACHE_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
|
||||
@@ -223,6 +225,7 @@
|
||||
"TURN_SECRET=%TURN_SECRET%",
|
||||
"SIGNALING_SECRET=%SIGNALING_SECRET%",
|
||||
"ONLYOFFICE_SECRET=%ONLYOFFICE_SECRET%",
|
||||
"EUROOFFICE_SECRET=%EUROOFFICE_SECRET%",
|
||||
"AIO_URL=%AIO_URL%",
|
||||
"AIO_LOG_LEVEL=%AIO_LOG_LEVEL%",
|
||||
"NC_AIO_VERSION=v%AIO_VERSION%",
|
||||
@@ -230,10 +233,12 @@
|
||||
"CLAMAV_ENABLED=%CLAMAV_ENABLED%",
|
||||
"CLAMAV_HOST=nextcloud-aio-clamav",
|
||||
"ONLYOFFICE_ENABLED=%ONLYOFFICE_ENABLED%",
|
||||
"EUROOFFICE_ENABLED=%EUROOFFICE_ENABLED%",
|
||||
"COLLABORA_ENABLED=%COLLABORA_ENABLED%",
|
||||
"COLLABORA_HOST=nextcloud-aio-collabora",
|
||||
"TALK_ENABLED=%TALK_ENABLED%",
|
||||
"ONLYOFFICE_HOST=nextcloud-aio-onlyoffice",
|
||||
"EUROOFFICE_HOST=nextcloud-aio-eurooffice",
|
||||
"UPDATE_NEXTCLOUD_APPS=%UPDATE_NEXTCLOUD_APPS%",
|
||||
"TZ=%TIMEZONE%",
|
||||
"TALK_PORT=%TALK_PORT%",
|
||||
@@ -357,6 +362,7 @@
|
||||
"secrets": [
|
||||
"REDIS_PASSWORD",
|
||||
"ONLYOFFICE_SECRET",
|
||||
"EUROOFFICE_SECRET",
|
||||
"RECORDING_SECRET"
|
||||
],
|
||||
"restart": "unless-stopped",
|
||||
@@ -758,6 +764,50 @@
|
||||
"NET_RAW"
|
||||
]
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-eurooffice",
|
||||
"image_tag": "%AIO_CHANNEL%",
|
||||
"display_name": "EuroOffice",
|
||||
"image": "ghcr.io/nextcloud-releases/aio-eurooffice",
|
||||
"init": true,
|
||||
"healthcheck": {
|
||||
"start_period": "60s",
|
||||
"test": "/healthcheck.sh",
|
||||
"interval": "30s",
|
||||
"timeout": "30s",
|
||||
"start_interval": "5s",
|
||||
"retries": 9
|
||||
},
|
||||
"expose": [
|
||||
"80"
|
||||
],
|
||||
"internal_port": "80",
|
||||
"environment": [
|
||||
"AIO_LOG_LEVEL=%AIO_LOG_LEVEL%",
|
||||
"LOG_LEVEL=%AIO_LOG_LEVEL%",
|
||||
"TZ=%TIMEZONE%",
|
||||
"JWT_ENABLED=true",
|
||||
"JWT_HEADER=AuthorizationJwt",
|
||||
"JWT_SECRET=%EUROOFFICE_SECRET%"
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"source": "nextcloud_aio_eurooffice",
|
||||
"destination": "/var/lib/eurooffice",
|
||||
"writeable": true
|
||||
}
|
||||
],
|
||||
"secrets": [
|
||||
"EUROOFFICE_SECRET"
|
||||
],
|
||||
"restart": "unless-stopped",
|
||||
"profiles": [
|
||||
"eurooffice"
|
||||
],
|
||||
"cap_drop": [
|
||||
"NET_RAW"
|
||||
]
|
||||
},
|
||||
{
|
||||
"container_name": "nextcloud-aio-imaginary",
|
||||
"image_tag": "%AIO_CHANNEL%",
|
||||
|
||||
@@ -22,9 +22,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
// Office suite radio buttons
|
||||
const collaboraRadio = document.getElementById('office-collabora');
|
||||
const onlyofficeRadio = document.getElementById('office-onlyoffice');
|
||||
const euroofficeRadio = document.getElementById('office-eurooffice');
|
||||
const noneRadio = document.getElementById('office-none');
|
||||
const collaboraHidden = document.getElementById('collabora');
|
||||
const onlyofficeHidden = document.getElementById('onlyoffice');
|
||||
const euroofficeHidden = document.getElementById('eurooffice');
|
||||
let initialOfficeSelection = null;
|
||||
|
||||
optionsContainersCheckboxes.forEach(checkbox => {
|
||||
@@ -36,11 +38,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
});
|
||||
|
||||
// Store initial office suite selection
|
||||
if (collaboraRadio && onlyofficeRadio && noneRadio) {
|
||||
if (collaboraRadio && onlyofficeRadio && euroofficeRadio && noneRadio) {
|
||||
if (collaboraRadio.checked) {
|
||||
initialOfficeSelection = 'collabora';
|
||||
} else if (onlyofficeRadio.checked) {
|
||||
initialOfficeSelection = 'onlyoffice';
|
||||
} else if (euroofficeRadio.checked) {
|
||||
initialOfficeSelection = 'eurooffice';
|
||||
} else {
|
||||
initialOfficeSelection = 'none';
|
||||
}
|
||||
@@ -57,20 +61,28 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
});
|
||||
|
||||
// Check office suite changes and sync to hidden inputs
|
||||
if (collaboraRadio && onlyofficeRadio && noneRadio && collaboraHidden && onlyofficeHidden) {
|
||||
if (collaboraRadio && onlyofficeRadio && euroofficeRadio && noneRadio && collaboraHidden && onlyofficeHidden && euroofficeHidden) {
|
||||
let currentOfficeSelection = null;
|
||||
if (collaboraRadio.checked) {
|
||||
currentOfficeSelection = 'collabora';
|
||||
collaboraHidden.value = 'on';
|
||||
onlyofficeHidden.value = '';
|
||||
euroofficeHidden.value = '';
|
||||
} else if (onlyofficeRadio.checked) {
|
||||
currentOfficeSelection = 'onlyoffice';
|
||||
collaboraHidden.value = '';
|
||||
onlyofficeHidden.value = 'on';
|
||||
euroofficeHidden.value = '';
|
||||
} else if (euroofficeRadio.checked) {
|
||||
currentOfficeSelection = 'eurooffice';
|
||||
collaboraHidden.value = '';
|
||||
onlyofficeHidden.value = '';
|
||||
euroofficeHidden.value = 'on';
|
||||
} else {
|
||||
currentOfficeSelection = 'none';
|
||||
collaboraHidden.value = '';
|
||||
onlyofficeHidden.value = '';
|
||||
euroofficeHidden.value = '';
|
||||
}
|
||||
|
||||
if (currentOfficeSelection !== initialOfficeSelection) {
|
||||
@@ -144,9 +156,10 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
handleTalkVisibility(); // Ensure talk-recording is correctly initialized
|
||||
|
||||
// Add event listeners for office suite radio buttons
|
||||
if (collaboraRadio && onlyofficeRadio && noneRadio) {
|
||||
if (collaboraRadio && onlyofficeRadio && euroofficeRadio && noneRadio) {
|
||||
collaboraRadio.addEventListener('change', checkForOptionContainerChanges);
|
||||
onlyofficeRadio.addEventListener('change', checkForOptionContainerChanges);
|
||||
euroofficeRadio.addEventListener('change', checkForOptionContainerChanges);
|
||||
noneRadio.addEventListener('change', checkForOptionContainerChanges);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,12 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
const onlyoffice = document.getElementById("office-onlyoffice");
|
||||
onlyoffice.disabled = true;
|
||||
|
||||
// EuroOffice
|
||||
const eurooffice = document.getElementById("office-eurooffice");
|
||||
if (eurooffice) {
|
||||
eurooffice.disabled = true;
|
||||
}
|
||||
|
||||
// Imaginary
|
||||
let imaginary = document.getElementById("imaginary");
|
||||
imaginary.disabled = true;
|
||||
|
||||
@@ -152,6 +152,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||
'current_channel' => $dockerActionManager->GetCurrentChannel(),
|
||||
'is_clamav_enabled' => $configurationManager->isClamavEnabled,
|
||||
'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled,
|
||||
'is_eurooffice_enabled' => $configurationManager->isEuroofficeEnabled,
|
||||
'is_collabora_enabled' => $configurationManager->isCollaboraEnabled,
|
||||
'is_talk_enabled' => $configurationManager->isTalkEnabled,
|
||||
'borg_restore_password' => $configurationManager->borgRestorePassword,
|
||||
|
||||
@@ -74,6 +74,10 @@ readonly class ContainerDefinitionFetcher {
|
||||
if (!$this->configurationManager->isOnlyofficeEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-eurooffice') {
|
||||
if (!$this->configurationManager->isEuroofficeEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['container_name'] === 'nextcloud-aio-collabora') {
|
||||
if (!$this->configurationManager->isCollaboraEnabled) {
|
||||
continue;
|
||||
@@ -190,6 +194,10 @@ readonly class ContainerDefinitionFetcher {
|
||||
if (!$this->configurationManager->isOnlyofficeEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-eurooffice') {
|
||||
if (!$this->configurationManager->isEuroofficeEnabled) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-collabora') {
|
||||
if (!$this->configurationManager->isCollaboraEnabled) {
|
||||
continue;
|
||||
|
||||
@@ -81,12 +81,19 @@ readonly class ConfigurationController {
|
||||
if ($officeSuiteChoice === 'collabora') {
|
||||
$this->configurationManager->isCollaboraEnabled = true;
|
||||
$this->configurationManager->isOnlyofficeEnabled = false;
|
||||
$this->configurationManager->isEuroofficeEnabled = false;
|
||||
} elseif ($officeSuiteChoice === 'onlyoffice') {
|
||||
$this->configurationManager->isCollaboraEnabled = false;
|
||||
$this->configurationManager->isOnlyofficeEnabled = true;
|
||||
$this->configurationManager->isEuroofficeEnabled = false;
|
||||
} elseif ($officeSuiteChoice === 'eurooffice') {
|
||||
$this->configurationManager->isCollaboraEnabled = false;
|
||||
$this->configurationManager->isOnlyofficeEnabled = false;
|
||||
$this->configurationManager->isEuroofficeEnabled = true;
|
||||
} else {
|
||||
$this->configurationManager->isCollaboraEnabled = false;
|
||||
$this->configurationManager->isOnlyofficeEnabled = false;
|
||||
$this->configurationManager->isEuroofficeEnabled = false;
|
||||
}
|
||||
$this->configurationManager->isClamavEnabled = isset($request->getParsedBody()['clamav']);
|
||||
$this->configurationManager->isTalkEnabled = isset($request->getParsedBody()['talk']);
|
||||
|
||||
@@ -98,6 +98,12 @@ class ConfigurationManager
|
||||
set { $this->set('isOnlyofficeEnabled', $value); }
|
||||
}
|
||||
|
||||
public bool $isEuroofficeEnabled {
|
||||
// Type-cast because old configs could have 1/0 for this key.
|
||||
get => (bool) $this->get('isEuroofficeEnabled', false);
|
||||
set { $this->set('isEuroofficeEnabled', $value); }
|
||||
}
|
||||
|
||||
public bool $isCollaboraEnabled {
|
||||
// Type-cast because old configs could have 1/0 for this key.
|
||||
get => (bool) $this->get('isCollaboraEnabled', true);
|
||||
@@ -1086,6 +1092,7 @@ class ConfigurationManager
|
||||
'CLAMAV_ENABLED' => $this->isClamavEnabled ? 'yes' : '',
|
||||
'TALK_RECORDING_ENABLED' => $this->isTalkRecordingEnabled ? 'yes' : '',
|
||||
'ONLYOFFICE_ENABLED' => $this->isOnlyofficeEnabled ? 'yes' : '',
|
||||
'EUROOFFICE_ENABLED' => $this->isEuroofficeEnabled ? 'yes' : '',
|
||||
'COLLABORA_ENABLED' => $this->isCollaboraEnabled ? 'yes' : '',
|
||||
'TALK_ENABLED' => $this->isTalkEnabled ? 'yes' : '',
|
||||
'UPDATE_NEXTCLOUD_APPS' => ($this->isDailyBackupRunning() && $this->areAutomaticUpdatesEnabled()) ? 'yes' : '',
|
||||
|
||||
@@ -81,6 +81,37 @@
|
||||
{% endif %}
|
||||
</label>
|
||||
<input type="hidden" id="onlyoffice" name="onlyoffice" value="" data-initial-state="{% if is_onlyoffice_enabled == true %}true{% else %}false{% endif %}">
|
||||
<input
|
||||
type="radio"
|
||||
id="office-eurooffice"
|
||||
name="office_suite_choice"
|
||||
value="eurooffice"
|
||||
class="office-radio"
|
||||
{% if is_eurooffice_enabled == true %}
|
||||
checked="checked"
|
||||
{% endif %}
|
||||
>
|
||||
<label class="office-card{{ isAnyRunning ? ' office-card-disabled' : '' }}" for="office-eurooffice">
|
||||
<div class="office-card-header">
|
||||
<h4>EuroOffice</h4>
|
||||
<svg class="office-checkmark" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="10" fill="var(--color-nextcloud-blue)"/>
|
||||
<path d="M7 12L10.5 15.5L17 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<ul class="office-features">
|
||||
<li>Good Nextcloud integration</li>
|
||||
<li>European alternative</li>
|
||||
<li>Good performance</li>
|
||||
<li>Good Microsoft compatibility</li>
|
||||
</ul>
|
||||
{% if isAnyRunning == false %}
|
||||
<a href="https://www.eurooffice.org/" target="_blank" class="office-learn-more" data-stop-event-propagation="true">
|
||||
Learn more
|
||||
</a>
|
||||
{% endif %}
|
||||
</label>
|
||||
<input type="hidden" id="eurooffice" name="eurooffice" value="" data-initial-state="{% if is_eurooffice_enabled == true %}true{% else %}false{% endif %}">
|
||||
</div>
|
||||
{% if isAnyRunning == false %}
|
||||
<div class="office-none-card">
|
||||
@@ -90,7 +121,7 @@
|
||||
name="office_suite_choice"
|
||||
value=""
|
||||
class="office-radio"
|
||||
{% if is_collabora_enabled == false and is_onlyoffice_enabled == false %}
|
||||
{% if is_collabora_enabled == false and is_onlyoffice_enabled == false and is_eurooffice_enabled == false %}
|
||||
checked="checked"
|
||||
{% endif %}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user