diff --git a/core/imageroot/var/lib/nethserver/cluster/actions/alter-backup-repository/validate-input.json b/core/imageroot/var/lib/nethserver/cluster/actions/alter-backup-repository/validate-input.json index df5b84d20..c5bbd8637 100644 --- a/core/imageroot/var/lib/nethserver/cluster/actions/alter-backup-repository/validate-input.json +++ b/core/imageroot/var/lib/nethserver/cluster/actions/alter-backup-repository/validate-input.json @@ -203,7 +203,7 @@ "type": ["null", "string"], "maxLength": 100000, "description": "Basic INI-like string validation", - "pattern": "^(\\[[^\\]]+\\]\\n)?(\\s*([A-Za-z_][A-Za-z0-9_]*)\\s*=\\s*[^\\n]*\\n)*$" + "pattern": "^(\\[[^\\]]+\\]\\n)?(\\s*([A-Za-z_][A-Za-z0-9_]*)\\s*=\\s*[^\\n]*(\\n|$))*$" }, "rclone_conf_b64_secret": { "type": "string", diff --git a/core/ui/package.json b/core/ui/package.json index 958572e2b..0da6d9233 100644 --- a/core/ui/package.json +++ b/core/ui/package.json @@ -16,7 +16,7 @@ "@carbon/icons-vue": "^10.37.0", "@carbon/themes": "^10.34.0", "@carbon/vue": "^2.40.0", - "@nethserver/ns8-ui-lib": "^1.12.2", + "@nethserver/ns8-ui-lib": "^1.12.3", "await-to-js": "^3.0.0", "axios": "^0.32.0", "carbon-components": "^10.41.0", diff --git a/core/ui/public/i18n/en/translation.json b/core/ui/public/i18n/en/translation.json index 48098f03f..1798d3676 100644 --- a/core/ui/public/i18n/en/translation.json +++ b/core/ui/public/i18n/en/translation.json @@ -366,11 +366,11 @@ "set-external-provider-name": "Set external provider name", "list-backup-repositories": "List backup repositories", "list-backups": "List backups", - "add-backup-repository": "Add backup destination", + "add-backup-repository": "Add destination", "add-backup": "Add backup", "remove-backup-repository": "Remove backup destination", "remove-backup": "Remove backup", - "alter-backup-repository": "Alter backup destination", + "alter-backup-repository": "Edit destination", "alter-backup": "Alter backup", "run-backup": "Run backup", "restore-module": "Restore application", @@ -471,30 +471,33 @@ "smb": "Windows File Share (SMB2/3)", "cluster": "Local storage", "generic-s3": "S3 compatible provider", - "azure": "Microsoft Azure blob storage", + "rclone": "Rclone compatible provider", + "rclone_short": "Rclone", "backblaze_short": "B2", "aws_short": "S3", "genericS3_short": "Generic S3", - "azure_short": "Azure", "download": "Download", "instances": "instance | instances", "Instances": "Instance | Instances", "applications": "Application | Applications", - "delete_backup_repository": "Delete backup destination", + "delete_destination": "Delete destination", "delete_repository_confirm": "Delete backup destination '{name}'?", - "delete_repo_explanation_1": "Any scheduled backup using this destination will be deleted too, but your backed up data will be left intact on the original destination. This action is NOT reversible.", + "delete_repo_notice_title": "Preserve backup access", + "delete_repo_notice_description": "Removing this destination also deletes all scheduled backups that use it. Existing backup data will remain on the storage. Keep a previously downloaded cluster backup or the destination data encryption key to preserve access to the stored data.", + "delete_repo_explanation_1": "This action cannot be undone.", "data_encryption_key": "Data encryption key", "type_repo_password_to_confirm": "Type destination password to confirm deletion", "select_backup_provider": "Select backup provider", "repository_name": "Backup destination name", - "repository_name_helper": "An easy to remember name for the destination", - "azure_url_label": "Azure container name", + "repository_name_helper": "An easy-to-remember name for the destination", "aws_url_label": "AWS bucket name", "backblaze_url_label": "B2 bucket name", "genericS3_url_label": "Bucket address", "genericS3_url_tooltip": "Enter an address with format 'serverfqdn/bucketname'. Note: the server must have a valid TLS certificate", "genericS3_placeholder": "e.g. myminio.example.com/mybucket", "smb_url_label": "Share name", + "smb_protocol_warning_title": "SMB2 and SMB3 protocols supported", + "smb_protocol_warning_description": "Only file shares using SMB2 or SMB3 are supported. SMB1/CIFS shares are deprecated, insecure and cannot be accessed.", "backup_repository_exists": "A backup destination with this URL already exists", "choose_destination_repository": "Choose backup destination", "select_by_category": "Select by category", @@ -506,8 +509,7 @@ "delete_scheduled_backup_confirm": "Delete scheduled backup {name}?", "delete_backup_explanation_1": "{instanceName} won't be backed up anymore. If you change your mind, you'll have to schedule a new backup. | {numInstances} applications won't be backed up anymore. If you change your mind, you'll have to schedule a new backup.", "delete_backup_explanation_2": "Existing backed up data will be left intact on the original destination.", - "edit_backup_repository": "Edit backup destination", - "repository_details": "Destination details", + "edit_destination": "Edit destination", "name": "Name", "provider": "Provider", "b2_account_id": "B2 application key ID", @@ -517,8 +519,6 @@ "aws_secret_access_key": "AWS secret access key", "genericS3_access_key_id": "Access key ID", "genericS3_secret_access_key": "Secret access key", - "azure_account_name": "Azure account name", - "azure_account_key": "Azure storage account key", "repository": "Destination", "backup_details": "Backup details", "backup_enabled": "Backup enabled", @@ -527,11 +527,11 @@ "app_instances_not_backed_up_description": "{numInstances} application is not included in any backup. Edit an existing schedule or add a new one.| {numInstances} applications are not included in any backup. Edit an existing schedule or add a new one.", "disabled_backups": "Disabled backups", "disabled_backups_description": "There is {num} backup disabled | There are {num} backups disabled", - "repository_password_helper": "Enter data encryption key if backup destination was configured previously", + "repository_password_helper": "Enter the encryption key previously used for this backup destination, or leave empty to generate one automatically. The key cannot be changed later.", "not_backed_up": "Not backed up", "search_instances": "Search applications", "not_backed_up_instances_selected": "Instances not backed up are currently selected", - "data_encryption_key_tooltip": "This password is used to encrypt data in the backup destination and is saved inside your cluster backup. Store this password in a safe place, or remember to download cluster backup regularly.", + "data_encryption_key_tooltip": "This encryption key is used to protect data in the backup destination and is saved inside your cluster backup. Store it in a safe place, or remember to download the cluster backup regularly.", "run_backup": "Run backup", "run_backup_now": "Run backup now", "last_backup": "Last backup", @@ -570,7 +570,6 @@ "enabling_backup": "Enabling {backupName}", "disabling_backup": "Disabling {backupName}", "retention_tooltip": "Number of backup snapshots stored before automatic deletion", - "default_repository_name": "{provider} destination", "schedule_backup_for_instance": "Create a backup schedule for {instance}", "schedule_action": "Schedule", "no_backup": "No backup", @@ -589,10 +588,11 @@ "restoring_app_to_node": "Restoring {app} to {node}", "instance_restored_to_node": "{module_id} restored to {node}", "open_app": "Open application", - "backup_repository_not_accessible": "Cannot access destination", - "backup_repository_auth_error": "Cannot authenticate", - "backup_repository_auth_error_description": "Check the error in the Notifications drawer for details", - "go_to_notification_drawer": "Open Notifications drawer", + "no_read_permission": "Cannot connect, authenticate, or read from the backup destination.", + "no_write_permission": "Cannot create files or directories on the backup destination. Check write permissions.", + "no_delete_permission": "Cannot delete files or directories from the backup destination. Check delete permissions.", + "backup_repository_not_accessible": "Cannot access the backup destination. Check the error notification or System logs for details.", + "backup_repository_connection_error": "Cannot access destination", "no_instance_to_restore": "No application to restore", "no_snapshot_to_restore": "No backup snapshot to restore", "no_instance_to_restore_description": "It looks like there is no application backed up on your destinations", @@ -627,12 +627,9 @@ "smb_domain": "Domain name (NT/Workgroup)", "samba": "Windows file share", "smb_short": "SMB", - "samba_tooltips": "Only shares with SMB2/3 protocols are supported. Deprecated SMB1/CIFS shares are not secure and cannot be accessed.", "cluster_short": "Local storage", "select_cluster_node": "Select a cluster node", - "cluster_placeholder": "Choose a node in the cluster", "parameters_format": "Incorrect value", - "url": "URL", "url_pattern": "The S3-compatible hostname and bucket name must be separated by a slash '/'", "from_node_name_of_this_cluster": "From node {name} of this cluster", "from_node_name_of_different_cluster": "From node {name} of a different cluster", @@ -660,6 +657,16 @@ "set_cluster_backup_password_to_restore_applications": "Set the encryption password to configure backup and restore", "no_cluster_backup_password": "Encryption password not configured", "error_reading_backup_file": "Error reading backup file", + "rclone_configuration_source": "Configuration source", + "rclone_configuration_source_paste_configuration": "Paste configuration", + "rclone_configuration_content": "Rclone configuration", + "rclone_configuration_content_single_destination_helper_text": "Paste a configuration containing a single destination", + "rclone_configuration_source_upload_configuration": "Upload configuration file", + "rclone_configuration_file": "Rclone configuration file", + "rclone_configuration_file_helper": "Supported file types: .conf, .txt", + "rclone_conf_error": "Invalid rclone configuration", + "rclone_base_path": "Path", + "rclone_configuration_source_keep_configuration": "Keep current configuration", "invalid_base64": "Invalid base64 file format" }, "calendar": { diff --git a/core/ui/src/assets/aws.png b/core/ui/src/assets/aws.png new file mode 100644 index 000000000..677a0796d Binary files /dev/null and b/core/ui/src/assets/aws.png differ diff --git a/core/ui/src/assets/azure.png b/core/ui/src/assets/azure.png deleted file mode 100644 index 685cb3ef7..000000000 Binary files a/core/ui/src/assets/azure.png and /dev/null differ diff --git a/core/ui/src/assets/node_storage.png b/core/ui/src/assets/node_storage.png new file mode 100644 index 000000000..206636a15 Binary files /dev/null and b/core/ui/src/assets/node_storage.png differ diff --git a/core/ui/src/assets/rclone.png b/core/ui/src/assets/rclone.png new file mode 100644 index 000000000..e0f815282 Binary files /dev/null and b/core/ui/src/assets/rclone.png differ diff --git a/core/ui/src/assets/s3-generic.png b/core/ui/src/assets/s3-generic.png index e7f434546..7793a760a 100644 Binary files a/core/ui/src/assets/s3-generic.png and b/core/ui/src/assets/s3-generic.png differ diff --git a/core/ui/src/assets/s3.png b/core/ui/src/assets/s3.png deleted file mode 100644 index b143fe0ed..000000000 Binary files a/core/ui/src/assets/s3.png and /dev/null differ diff --git a/core/ui/src/assets/samba.png b/core/ui/src/assets/samba.png index e286e792d..04323b2f0 100644 Binary files a/core/ui/src/assets/samba.png and b/core/ui/src/assets/samba.png differ diff --git a/core/ui/src/components/backup/AddRepositoryModal.vue b/core/ui/src/components/backup/AddRepositoryModal.vue index 249221963..5197b30bf 100644 --- a/core/ui/src/components/backup/AddRepositoryModal.vue +++ b/core/ui/src/components/backup/AddRepositoryModal.vue @@ -41,48 +41,48 @@ - +
backblaze logo
- {{ $t("backup.backblaze") }} + {{ $t("backup.cluster") }}
- +
azure logo
- {{ $t("backup.azure") }} + {{ $t("backup.samba") }}
@@ -100,7 +100,7 @@
amazon s3 logo
@@ -110,80 +110,71 @@
- +
generic s3 logo
- {{ $t("backup.generic-s3") }} + {{ $t("backup.backblaze") }}
- +
samba logo
- {{ $t("backup.samba") }} - - - + {{ $t("backup.generic-s3") }}
- +
cluster logo
- {{ $t("backup.cluster") }} + {{ $t("backup.rclone") }}
@@ -216,11 +207,9 @@ - - - - { - const url = window.URL.createObjectURL(new Blob([response.data])); - const link = document.createElement("a"); - link.href = url; - link.setAttribute("download", fileName); - document.body.appendChild(link); - link.click(); - }); + timeout: 60000, + }) + .then((response) => { + const blobUrl = window.URL.createObjectURL(new Blob([response.data])); + const link = document.createElement("a"); + link.href = blobUrl; + link.setAttribute("download", fileName); + document.body.appendChild(link); + link.click(); + link.remove(); + window.URL.revokeObjectURL(blobUrl); + }) + .catch((err) => { + console.error("downloadClusterBackupCompleted", err); + this.error.downloadClusterBackup = this.getErrorMessage(err); + }); }, reloadBackupRepositories() { this.isSetClusterBackupPassword = true; diff --git a/core/ui/yarn.lock b/core/ui/yarn.lock index 051cdb75a..384b2faa4 100644 --- a/core/ui/yarn.lock +++ b/core/ui/yarn.lock @@ -2235,9 +2235,9 @@ __metadata: languageName: node linkType: hard -"@nethserver/ns8-ui-lib@npm:^1.12.2": - version: 1.12.2 - resolution: "@nethserver/ns8-ui-lib@npm:1.12.2" +"@nethserver/ns8-ui-lib@npm:^1.12.3": + version: 1.12.3 + resolution: "@nethserver/ns8-ui-lib@npm:1.12.3" dependencies: "@rollup/plugin-json": ^4.1.0 core-js: ^3.15.2 @@ -2246,7 +2246,7 @@ __metadata: vue-date-fns: ^2.0.1 peerDependencies: vue: ^2.6.12 - checksum: 1f52a07bf3fb43cadfb78d6634186998be0927d3d84f0f4bdd24e2b22f6ea8efe828e8c0cf594c2d3ed96e713f4c74c1d324fb425d6be71cd85bb95abdb4856e + checksum: 1955ccf33c62df3aebc2bd74a3881a9fd99fa57182921a85a2bf65d5f81abe5eb26d584763cec7323dd1a6debceea9240f82079e76a89d895d129e5f533288ea languageName: node linkType: hard @@ -13656,7 +13656,7 @@ __metadata: "@carbon/icons-vue": ^10.37.0 "@carbon/themes": ^10.34.0 "@carbon/vue": ^2.40.0 - "@nethserver/ns8-ui-lib": ^1.12.2 + "@nethserver/ns8-ui-lib": ^1.12.3 "@storybook/addon-actions": ^6.2.9 "@storybook/addon-essentials": ^6.2.9 "@storybook/addon-links": ^6.2.9