Skip to content

Commit

Permalink
NAS-130830: Audit Logging status on SMB share tables is always Yes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKarpov98 authored Aug 30, 2024
1 parent 3752406 commit 93fcfdd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,15 @@ describe('SmbCardComponent', () => {
id: 3,
purpose: SmbPresetType.MultiUserTimeMachine,
path: '/mnt/APPS/smb1',
path_suffix: '',
home: true,
name: 'smb123',
comment: 'pool',
ro: false,
browsable: true,
recyclebin: false,
guestok: false,
hostsallow: [],
hostsdeny: [],
aapl_name_mangling: false,
abe: false,
acl: true,
durablehandle: true,
streams: true,
timemachine: true,
vuid: '04305a6f-7a37-43dc-8fc0-fe6662751437',
shadowcopy: true,
fsrvp: false,
enabled: true,
cluster_volname: '',
path_local: '/mnt/APPS/smb1',
locked: false,
audit: {
enable: true,
},
},
] as SmbShare[];

Expand Down Expand Up @@ -124,7 +110,7 @@ describe('SmbCardComponent', () => {
it('should show table rows', async () => {
const expectedRows = [
['Name', 'Path', 'Description', 'Enabled', 'Audit Logging', ''],
['smb123', '/mnt/APPS/smb1', 'pool', '', 'No', ''],
['smb123', '/mnt/APPS/smb1', 'pool', '', 'Yes', ''],
];

const cells = await table.getCellTexts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class SmbCardComponent implements OnInit {
}),
yesNoColumn({
title: this.translate.instant('Audit Logging'),
propertyName: 'audit',
getValue: (row) => Boolean(row.audit?.enable),
}),
actionsColumn({
cssClass: 'wide-actions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const shares: Partial<SmbShare>[] = [
comment: 'comment',
path: 'some-path',
path_local: 'some-local-path',
audit: {
enable: true,
},
},
];

Expand Down Expand Up @@ -143,7 +146,7 @@ describe('SmbListComponent', () => {
it('should show table rows', async () => {
const expectedRows = [
['Name', 'Path', 'Description', 'Enabled', 'Audit Logging', ''],
['some-name', 'some-local-path', 'comment', '', 'No', ''],
['some-name', 'some-local-path', 'comment', '', 'Yes', ''],
];

const cells = await table.getCellTexts();
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/sharing/smb/smb-list/smb-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class SmbListComponent implements OnInit {
}),
yesNoColumn({
title: this.translate.instant('Audit Logging'),
propertyName: 'audit',
getValue: (row) => Boolean(row.audit?.enable),
}),
actionsColumn({
actions: [
Expand Down

0 comments on commit 93fcfdd

Please sign in to comment.