Skip to content

Commit

Permalink
ui: add storage parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Aug 25, 2023
1 parent a5cc1a9 commit e297ffc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
7 changes: 5 additions & 2 deletions ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"common": {
"required": "Required",
"work_in_progress": "Work in progress",
"processing": "Processing..."
"processing": "Processing...",
"advanced": "Advanced"
},
"status": {
"title": "Status",
Expand Down Expand Up @@ -31,7 +32,9 @@
"password": "MinIO root password",
"disabled": "Disabled",
"enabled": "Enabled",
"different": "API and web interface hosts must be different"
"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."
},
"about": {
"title": "About"
Expand Down
30 changes: 26 additions & 4 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@
:invalid-message="error.password"
ref="password"
></cv-text-input>
<cv-accordion ref="accordion">
<cv-accordion-item :open="toggleAccordion[0]">
<template slot="title">{{ $t("common.advanced") }}</template>
<template slot="content">
<cv-text-input
:label="$t('settings.storage_path')"
v-model="storage"
:helper-text="$t('settings.storage_path_helper')"
:invalid-message="error.storage"
:disabled="loading.getConfiguration || loading.configureModule"
ref="storage"
>
</cv-text-input>
</template>
</cv-accordion-item>
</cv-accordion>
<br/>
<cv-row v-if="error.configureModule">
<cv-column>
<NsInlineNotification
Expand Down Expand Up @@ -116,6 +133,7 @@ export default {
host_server: "",
host_console: "",
lets_encrypt: true,
storage: "",
loading: {
getConfiguration: false,
configureModule: false,
Expand All @@ -127,7 +145,8 @@ export default {
host_server: "",
user: "",
password: "",
lets_encrypt: ""
lets_encrypt: "",
storage: "",
},
};
},
Expand Down Expand Up @@ -199,6 +218,7 @@ export default {
this.user = config.user;
this.password = config.password;
this.lets_encrypt = config.lets_encrypt;
this.storage = config.storage;
this.focusElement("host_server");
},
Expand All @@ -207,7 +227,7 @@ export default {
let isValidationOk = true;
if (!this.host_server) {
// test field cannot be empty
// host_server field cannot be empty
this.error.host_server = this.$t("common.required");
if (isValidationOk) {
Expand All @@ -217,7 +237,7 @@ export default {
}
if (!this.host_console) {
// test field cannot be empty
// host_console field cannot be empty
this.error.host_console = this.$t("common.required");
if (isValidationOk) {
Expand All @@ -235,6 +255,7 @@ export default {
isValidationOk = false;
}
}
return isValidationOk;
},
configureModuleValidationFailed(validationErrors) {
Expand Down Expand Up @@ -285,7 +306,8 @@ export default {
host_console: this.host_console,
user: this.user,
password: this.password,
lets_encrypt: this.lets_encrypt ? true : false
lets_encrypt: this.lets_encrypt ? true : false,
storage: this.storage
},
extra: {
title: this.$t("settings.configure_instance", {
Expand Down

0 comments on commit e297ffc

Please sign in to comment.