Skip to content

Commit

Permalink
NAS-128976 / 24.10 / TrueCloud | Bucket is not populated on Edit & se…
Browse files Browse the repository at this point in the history
…lected bucket is not sent to middleware (#10066)

* NAS-128970: TrueCloud Backup defaults to /mnt selected

* NAS-128976: TrueCloud | Bucket is not populated on Edit

* NAS-128976: TrueCloud | Bucket is not populated on Edit

* NAS-128976: TrueCloud | Bucket is not populated on Edit & selected bucket is not sent to middleware
  • Loading branch information
AlexKarpov98 authored May 15, 2024
1 parent c7730c2 commit 2525930
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ describe('CloudBackupFormComponent', () => {

expect(spectator.inject(WebSocketService).call).toHaveBeenLastCalledWith('cloud_backup.create', [{
args: '',
attributes: { folder: '/' },
attributes: { folder: '/', bucket: 'path_to_bucket1' },
bwlimit: undefined,
credentials: 2,
description: 'New Cloud Backup Task',
enabled: true,
Expand Down Expand Up @@ -218,6 +219,7 @@ describe('CloudBackupFormComponent', () => {
args: '',
attributes: {
folder: '/My Folder',
bucket: 'path_to_bucket1',
},
bwlimit: undefined,
credentials: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export class CloudBackupFormComponent implements OnInit {
path: [],
credentials: (this.editingTask.credentials as CloudCredential).id,
folder: this.editingTask.attributes.folder as string,
bucket: this.editingTask.attributes.bucket === newOption ? '' : this.editingTask.attributes.bucket as string || '',
});

if (this.editingTask.include?.length) {
Expand Down Expand Up @@ -263,6 +264,7 @@ export class CloudBackupFormComponent implements OnInit {
private prepareData(formValue: FormValue): CloudBackupUpdate {
const attributes: CloudBackupUpdate['attributes'] = {
folder: formValue.folder,
bucket: formValue.bucket,
};

const value: CloudBackupUpdate = {
Expand Down

0 comments on commit 2525930

Please sign in to comment.