Skip to content

Commit 351b713

Browse files
authored
Handle additional volumes during samba provider setup (#1059)
NethServer/dev#7757
1 parent 730dc9c commit 351b713

File tree

11 files changed

+877
-61
lines changed

11 files changed

+877
-61
lines changed

core/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@carbon/icons-vue": "^10.37.0",
1717
"@carbon/themes": "^10.34.0",
1818
"@carbon/vue": "^2.40.0",
19-
"@nethserver/ns8-ui-lib": "^1.11.0",
19+
"@nethserver/ns8-ui-lib": "^1.12.0",
2020
"await-to-js": "^3.0.0",
2121
"axios": "^0.30.2",
2222
"carbon-components": "^10.41.0",

core/ui/public/i18n/en/translation.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,10 @@
13611361
"go_to_smtp_settings": "Go to Email notifications",
13621362
"password_expired": "Password expired",
13631363
"must_change_password_on_next_login": "Required password change",
1364-
"password_does_not_expire": "Password never expires"
1364+
"password_does_not_expire": "Password never expires",
1365+
"nodes_with_additional_storage_info": "Additional storage for shared folders",
1366+
"nodes_with_additional_storage_info_description": "Shared folders can be enabled in the next step. Only one provider per domain can host them.",
1367+
"select_node_volume_for_installation": "Select the volume for shared folders data on {node}"
13651368
},
13661369
"samba": {
13671370
"adminuser": "Samba admin username",
@@ -1380,9 +1383,9 @@
13801383
"enter_samba_admin_username": "Login as Samba admin",
13811384
"enter_samba_admin_password": "Enter Samba admin password",
13821385
"samba_configuration": "Samba configuration",
1383-
"enable_file_server_label": "Provide file shares and authentication to Windows clients",
1386+
"enable_file_server_label": "Provide shared folders and authentication to Windows clients",
13841387
"enable_file_server_tooltip": "Enable this switch and select the desired IP address to provide Active Directory services to clients in the local private network",
1385-
"enable_file_server_disabled_info": "File shares and authentication to Windows clients cannot be enabled because they are already configured on another provider of this domain",
1388+
"enable_file_server_disabled_info": "Shared folders and authentication to Windows clients cannot be enabled because they are already configured on another provider of this domain",
13861389
"provider_on_vpn_address_message": "The new provider will be configured on the VPN IP address {vpnIpAddress}",
13871390
"choose_ip_address_warning": "Make sure to select an IP address reachable by Windows clients. This choice is NOT reversible",
13881391
"file_server": "File server",

core/ui/src/components/backup/RestoreSingleInstanceModal.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@cancel="$emit('hide')"
2121
@previousStep="previousStep"
2222
@nextStep="nextStep"
23+
:isLastStep="isLastStep"
2324
>
2425
<template slot="title">{{ $t("backup.restore_app") }}</template>
2526
<template slot="content">
@@ -289,6 +290,15 @@ export default {
289290
return this.stepIndex == 0;
290291
},
291292
isLastStep() {
293+
if (this.step == "node" && this.selectedNode) {
294+
// If volumes step will be skipped, current step is the last step
295+
if (
296+
!this.nodesWithAdditionalStorage.includes(this.selectedNode.id) ||
297+
this.appVolumes.length === 0
298+
) {
299+
return true;
300+
}
301+
}
292302
return this.stepIndex == this.steps.length - 1;
293303
},
294304
isNextButtonDisabled() {
@@ -489,6 +499,7 @@ export default {
489499
},
490500
previousStep() {
491501
if (!this.isFirstStep) {
502+
this.selectedVolume = {}; // reset selected volume when going back to node selection
492503
this.step = this.steps[this.stepIndex - 1];
493504
}
494505
},

0 commit comments

Comments
 (0)