mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge pull request #41081 from votdev/issue_49718_disable_nfs_v3
mgr/dashboard: disable NFSv3 support in dashboard Reviewed-by: Alfonso Martínez <almartin@redhat.com> Reviewed-by: Alexandra Settle <asettle@suse.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com> Reviewed-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
commit
21ab6c57ac
@ -322,7 +322,8 @@
|
||||
class="custom-control-input"
|
||||
id="protocolNfsv3"
|
||||
name="protocolNfsv3"
|
||||
formControlName="protocolNfsv3">
|
||||
formControlName="protocolNfsv3"
|
||||
disabled>
|
||||
<label i18n
|
||||
class="custom-control-label"
|
||||
for="protocolNfsv3">NFSv3</label>
|
||||
|
@ -98,7 +98,7 @@ describe('NfsFormComponent', () => {
|
||||
daemons: [],
|
||||
fsal: { fs_name: 'a', name: '', rgw_user_id: '', user_id: '' },
|
||||
path: '',
|
||||
protocolNfsv3: true,
|
||||
protocolNfsv3: false,
|
||||
protocolNfsv4: true,
|
||||
pseudo: '',
|
||||
sec_label_xattr: 'security.selinux',
|
||||
@ -145,6 +145,15 @@ describe('NfsFormComponent', () => {
|
||||
expect(component.nfsForm.get('cluster_id').disabled).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should mark NFSv4 protocol as required', () => {
|
||||
component.nfsForm.patchValue({
|
||||
protocolNfsv4: false
|
||||
});
|
||||
component.nfsForm.updateValueAndValidity({ emitEvent: false });
|
||||
expect(component.nfsForm.valid).toBeFalsy();
|
||||
expect(component.nfsForm.get('protocolNfsv4').hasError('required')).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('should submit request', () => {
|
||||
beforeEach(() => {
|
||||
component.nfsForm.patchValue({
|
||||
|
@ -174,7 +174,7 @@ export class NfsFormComponent extends CdForm implements OnInit {
|
||||
})
|
||||
}),
|
||||
path: new FormControl(''),
|
||||
protocolNfsv3: new FormControl(true, {
|
||||
protocolNfsv3: new FormControl(false, {
|
||||
validators: [
|
||||
CdValidators.requiredIf({ protocolNfsv4: false }, (value: boolean) => {
|
||||
return !value;
|
||||
|
Loading…
Reference in New Issue
Block a user