Update regions in import Dialog

This commit is contained in:
Johannes Zellner
2025-04-29 17:06:31 +02:00
parent 34583c834d
commit a8cb0a0e9c
+8 -7
View File
@@ -5,6 +5,7 @@ import { Dialog, FormGroup, TextInput } from 'pankow';
import { s3like } from '../utils.js';
import BackupProviderForm from './BackupProviderForm.vue';
import AppsModel from '../models/AppsModel.js';
import { REGIONS_CONTABO, REGIONS_VULTR, REGIONS_IONOS, REGIONS_OVH, REGIONS_LINODE, REGIONS_SCALEWAY, REGIONS_WASABI } from '../constants.js';
const appsModel = AppsModel.create();
@@ -53,25 +54,25 @@ async function onSubmit() {
backupConfig.region = 'us-east-1';
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'wasabi') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_WASABI.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'scaleway-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_SCALEWAY.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'linode-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_LINODE.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'ovh-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_OVH.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'ionos-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_IONOS.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'vultr-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_VULTR.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
} else if (provider.value === 'contabo-objectstorage') {
backupConfig.region = providerConfig.value.endpoint;
backupConfig.region = REGIONS_CONTABO.find(function (x) { return x.value === backupConfig.endpoint; }).region;
backupConfig.signatureVersion = 'v4';
backupConfig.s3ForcePathStyle = true; // https://docs.contabo.com/docs/products/Object-Storage/technical-description (no virtual buckets)
} else if (provider.value === 'upcloud-objectstorage') {