-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgr/dashboard: Provide user enable/disable capability in the frontend
Fixes: http://tracker.ceph.com/issues/25229 Signed-off-by: Patrick Nawracay <[email protected]>
- Loading branch information
Showing
7 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import { ReactiveFormsModule } from '@angular/forms'; | |
import { Router, Routes } from '@angular/router'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
|
||
import { ButtonsModule } from 'ngx-bootstrap/buttons'; | ||
import { BsModalService } from 'ngx-bootstrap/modal'; | ||
import { ToastrModule } from 'ngx-toastr'; | ||
import { of } from 'rxjs'; | ||
|
@@ -48,7 +49,8 @@ describe('UserFormComponent', () => { | |
ReactiveFormsModule, | ||
ComponentsModule, | ||
ToastrModule.forRoot(), | ||
SharedModule | ||
SharedModule, | ||
ButtonsModule.forRoot() | ||
], | ||
declarations: [UserFormComponent, FakeComponent], | ||
providers: i18nProviders | ||
|
@@ -113,7 +115,8 @@ describe('UserFormComponent', () => { | |
password: 'pass0', | ||
name: 'User 0', | ||
email: '[email protected]', | ||
roles: ['administrator'] | ||
roles: ['administrator'], | ||
enabled: true | ||
}; | ||
formHelper.setMultipleValues(user); | ||
formHelper.setValue('confirmpassword', user.password); | ||
|
@@ -132,7 +135,8 @@ describe('UserFormComponent', () => { | |
password: undefined, | ||
name: 'User 1', | ||
email: '[email protected]', | ||
roles: ['administrator'] | ||
roles: ['administrator'], | ||
enabled: true | ||
}; | ||
const roles = [ | ||
{ | ||
|
@@ -222,7 +226,8 @@ describe('UserFormComponent', () => { | |
password: '', | ||
name: 'User 1', | ||
email: '[email protected]', | ||
roles: ['administrator'] | ||
roles: ['administrator'], | ||
enabled: true | ||
}); | ||
userReq.flush({}); | ||
expect(router.navigate).toHaveBeenCalledWith(['/user-management/users']); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ export class UserFormModel { | |
name: string; | ||
email: string; | ||
roles: Array<string>; | ||
enabled: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters