Fix server updates on docker

Which update changed this behaviour?
This commit is contained in:
Amelia 2025-04-15 10:16:19 +02:00
parent 5c5b0df814
commit 467e67ff68
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA

View file

@ -40,6 +40,7 @@ export class ManageSettingsComponent implements OnInit {
settingsForm: FormGroup = new FormGroup({});
taskFrequencies: Array<string> = [];
logLevels: Array<string> = [];
isDocker: boolean = false;
allowStatsTooltip = translate('manage-settings.allow-stats-tooltip-part-1') + ' <a href="' +
WikiLink.DataCollection +
@ -94,6 +95,7 @@ export class ManageSettingsComponent implements OnInit {
).subscribe();
this.serverService.getServerInfo().subscribe(info => {
this.isDocker = info.isDocker;
if (info.isDocker) {
this.settingsForm.get('ipAddresses')?.disable();
this.settingsForm.get('port')?.disable();
@ -130,12 +132,18 @@ export class ManageSettingsComponent implements OnInit {
}
packData() {
const modelSettings = this.settingsForm.value;
const modelSettings: ServerSettings = this.settingsForm.value;
modelSettings.bookmarksDirectory = this.serverSettings.bookmarksDirectory;
modelSettings.smtpConfig = this.serverSettings.smtpConfig;
modelSettings.installId = this.serverSettings.installId;
modelSettings.installVersion = this.serverSettings.installVersion;
// Disabled FormControls are not added to the value
if (this.isDocker) {
modelSettings.ipAddresses = this.serverSettings.ipAddresses;
modelSettings.port = this.serverSettings.port;
}
return modelSettings;
}