-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1464 from Orange-OpenSource/master-3.0
Master 3.0: Update group management
- Loading branch information
Showing
11 changed files
with
207 additions
and
58 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
4 changes: 4 additions & 0 deletions
4
src/app/components/group-details/group-details.component.scss
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
table { | ||
width: 100%; | ||
} | ||
|
||
.main { | ||
display: flex; | ||
justify-content: space-around; | ||
|
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
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,3 +5,7 @@ | |
.button-div { | ||
float: right; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { | ||
Router, Resolve, | ||
RouterStateSnapshot, | ||
ActivatedRouteSnapshot | ||
} from '@angular/router'; | ||
import {Observable,Subscriber} from 'rxjs'; | ||
import {ACE} from "../models/api/ACE"; | ||
import {ControllerService} from "../services/controller.service"; | ||
import {AclService} from "../services/acl.service"; | ||
import {Controller} from "../models/controller"; | ||
import {UserService} from "@services/user.service"; | ||
import {GroupService} from "@services/group.service"; | ||
import {RoleService} from "@services/role.service"; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class GroupAcesResolver implements Resolve<ACE[]> { | ||
|
||
constructor(private controllerService: ControllerService, | ||
private aceService: AclService) { | ||
} | ||
|
||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<ACE[]> { | ||
return new Observable<ACE[]>((subscriber: Subscriber<ACE[]>) => { | ||
|
||
const controllerId = route.paramMap.get('controller_id'); | ||
const groupId = route.paramMap.get('user_group_id'); | ||
|
||
this.controllerService.get(+controllerId).then((controller: Controller) => { | ||
this.aceService.list(controller).subscribe((aces: ACE[]) => { | ||
const filter = aces.filter((ace: ACE) => ace.group_id === groupId) | ||
|
||
subscriber.next(filter); | ||
subscriber.complete() | ||
}) | ||
}); | ||
}); | ||
} | ||
} |
Oops, something went wrong.