mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-25 02:47:04 +00:00
Restore the backup S3 host select box if an S3 target has been set
Also remove unnecessary import added in 7cda439c
. Was a mistake from edits during PR review.
This commit is contained in:
parent
3fd2e3efa9
commit
58ded74181
@ -122,7 +122,6 @@ def index():
|
|||||||
no_admins_exist = (len(get_admins(env)) == 0)
|
no_admins_exist = (len(get_admins(env)) == 0)
|
||||||
|
|
||||||
import boto3.s3
|
import boto3.s3
|
||||||
from urllib.parse import urlparse
|
|
||||||
backup_s3_hosts = [(r, f"s3.{r}.amazonaws.com") for r in boto3.session.Session().get_available_regions('s3')]
|
backup_s3_hosts = [(r, f"s3.{r}.amazonaws.com") for r in boto3.session.Session().get_available_regions('s3')]
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,6 +269,7 @@ function show_custom_backup() {
|
|||||||
$("#backup-target-type").val("s3");
|
$("#backup-target-type").val("s3");
|
||||||
var hostpath = r.target.substring(5).split('/');
|
var hostpath = r.target.substring(5).split('/');
|
||||||
var host = hostpath.shift();
|
var host = hostpath.shift();
|
||||||
|
$("#backup-target-s3-host-select").val(host);
|
||||||
$("#backup-target-s3-host").val(host);
|
$("#backup-target-s3-host").val(host);
|
||||||
$("#backup-target-s3-path").val(hostpath.join('/'));
|
$("#backup-target-s3-path").val(hostpath.join('/'));
|
||||||
} else if (r.target.substring(0, 5) == "b2://") {
|
} else if (r.target.substring(0, 5) == "b2://") {
|
||||||
|
Loading…
Reference in New Issue
Block a user