-
Notifications
You must be signed in to change notification settings - Fork 63
feat(manage-accounts): add accounts view and allow to manage accounts #594
Conversation
# Conflicts: # src/app/shared/shared.module.ts # src/app/spare-drive/spare-drive-filter/spare-drive-filter.component.ts # src/app/vm/vm-filter/vm-filter.component.ts
# Conflicts: # src/app/shared/shared.module.ts
import { Component, OnInit } from '@angular/core'; | ||
import { State } from '../../reducers/index'; | ||
import { Store } from '@ngrx/store'; | ||
import * as accountEvent from '../redux/accounts.actions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, rename this to accountActions/domainActions/roleActions
} | ||
|
||
public ngOnInit() { | ||
this.store.dispatch(new domainEvent.LoadDomainsRequest({})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove payload if it's not required or make it optional
remove passing empty object to constructor
@@ -0,0 +1,28 @@ | |||
<cs-account-list-filter *ngIf="isAdmin()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should add some kind of top panel as other pages have
@@ -0,0 +1,46 @@ | |||
<cs-top-bar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add grouping widget
</a> | ||
<a | ||
mdTabLink | ||
[routerLink]="['./users']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clicking on this tab redirects me to index page
src/app/roles/redux/roles.effects.ts
Outdated
import { Injectable } from '@angular/core'; | ||
import { Actions, Effect } from '@ngrx/effects'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import * as roleEvent from './roles.actions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename
src/app/roles/redux/roles.effects.ts
Outdated
.map((roles: Role[]) => { | ||
return new roleEvent.LoadRolesResponse(roles); | ||
}) | ||
.catch(() => Observable.of(new roleEvent.LoadRolesResponse([]))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use optional payload or get rid of it. why do you use [] in constructor?
); | ||
|
||
export const roleTypes = createSelector( | ||
getRolesEntitiesState, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use list selector
getRolesEntitiesState, | ||
state => { | ||
const allTypes = state.list.map(role => role.type); | ||
return allTypes.filter((value, index) => allTypes.indexOf(value) == index ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use another approach to get unique list
readonly selectedStates$ = this.store.select(fromAccounts.filterSelectedStates); | ||
readonly selectedRoleTypes$ = this.store.select(fromAccounts.filterSelectedRoleTypes); | ||
|
||
readonly states: Array<string> = ['enabled', 'disabled', 'locked']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add states constants
# Conflicts: # src/app/vm/vm-creation/vm-creation.component.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the mentioned issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, remove a single tab on vm account sidebar and remove fab button from the listing page for now
(onGroupingsChange)="onGroupingsChange.emit($event)" | ||
cs-list | ||
></cs-account-list-filter> | ||
<cs-top-bar *ngIf="!isAdmin()"></cs-top-bar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let it be present for all the users but the content should be conditionally appear
#526