From 26603b40e3ea4c9b96dc8ea7b49e1d585abb9d82 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 21 Feb 2024 12:32:13 +0100 Subject: [PATCH 1/3] Update hostname format in validate-input.json --- imageroot/actions/configure-module/validate-input.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/imageroot/actions/configure-module/validate-input.json b/imageroot/actions/configure-module/validate-input.json index 49e8527..f6ea1be 100644 --- a/imageroot/actions/configure-module/validate-input.json +++ b/imageroot/actions/configure-module/validate-input.json @@ -23,12 +23,14 @@ "host_console": { "type": "string", "description": "Host name for the server, this host will be use by S3 clients", - "format": "idn-hostname" + "format": "hostname", + "pattern": "\\." }, "host_server": { "type": "string", "description": "Host name for the UI, this how will serve the management UI", - "format": "idn-hostname" + "format": "hostname", + "pattern": "\\." }, "lets_encrypt": { "type": "boolean", From 0410be1de07ce79456bdc4ddb62cbb1ee4971e4f Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 21 Feb 2024 12:32:19 +0100 Subject: [PATCH 2/3] Add validation for host server and console names in translation.json --- ui/public/i18n/en/translation.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index 8a3bc32..84533fc 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -34,7 +34,11 @@ "enabled": "Enabled", "different": "API and web interface hosts must be different", "storage_path": "Storage path", - "storage_path_helper": "MinIO stores data in 'minio-data' by default. To use an external disk instead, enter a full path like '/mnt/data', make sure this location already exists and is a properly formatted and mounted disk. But remember, changing the storage path means it won't be part of the backup." + "storage_path_helper": "MinIO stores data in 'minio-data' by default. To use an external disk instead, enter a full path like '/mnt/data', make sure this location already exists and is a properly formatted and mounted disk. But remember, changing the storage path means it won't be part of the backup.", + "host_server_pattern": "Must be a valid fully qualified domain name", + "host_server_format": "Must be a valid fully qualified domain name", + "host_console_pattern": "Must be a valid fully qualified domain name", + "host_console_format": "Must be a valid fully qualified domain name" }, "about": { "title": "About" From d1df832c8c29bcb18b1860c235439412b7af0c27 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 21 Feb 2024 16:23:53 +0100 Subject: [PATCH 3/3] Update error translation handling in Settings.vue --- ui/src/views/Settings.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/views/Settings.vue b/ui/src/views/Settings.vue index c96e2a1..4a26a20 100644 --- a/ui/src/views/Settings.vue +++ b/ui/src/views/Settings.vue @@ -24,7 +24,7 @@ v-model="host_server" placeholder="minio.mydomain.org" :disabled="loading.getConfiguration || loading.configureModule" - :invalid-message="error.host_server" + :invalid-message="$t(error.host_server)" ref="host_server" >