Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sören Giller authored and Sören Giller committed Aug 3, 2018
2 parents f7705c5 + d5c8445 commit cdd68af
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 30 deletions.
21 changes: 4 additions & 17 deletions src/app/api-connector/group.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class GroupService {
getComputeCenters(): Observable<any> {


return this.http.get(this.settings.getApiBaseURL() + 'computecenters/', {
return this.http.get(this.settings.getApiBaseURL() + 'group/computecenters/', {
withCredentials: true,

}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))
Expand All @@ -24,7 +24,7 @@ export class GroupService {

getComputeCentersDetails(resource_id: number): Observable<any> {

return this.http.get(this.settings.getApiBaseURL() + 'facility_details/', {
return this.http.get(this.settings.getApiBaseURL() + 'group/facilityDetails/', {
withCredentials: true,
params: {resource_id: resource_id}
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))
Expand All @@ -33,7 +33,7 @@ export class GroupService {

getFacilityByGroup(groupid: string): Observable<any> {

return this.http.get(this.settings.getApiBaseURL() + 'getFacilityByGroup/', {
return this.http.get(this.settings.getApiBaseURL() + 'group/getFacilityByGroup/', {
withCredentials: true,
params: {groupid: groupid}
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))
Expand All @@ -48,7 +48,7 @@ export class GroupService {
});
urlSearchParams.append('compute_center', computecenter);
urlSearchParams.append('groupid', groupid);
return this.http.post(this.settings.getApiBaseURL() + 'assignGroupToResource/', urlSearchParams, {
return this.http.post(this.settings.getApiBaseURL() + 'group/assignGroupToResource/', urlSearchParams, {
withCredentials: true,
headers: header
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))
Expand Down Expand Up @@ -419,21 +419,8 @@ export class GroupService {
}


setNumberOfVms(groupid: string, numberofVms: string): Observable<any> {
let urlSearchParams = new URLSearchParams();
let header = new Headers({
'X-CSRFToken': this.settings.getCSRFToken(),
});
urlSearchParams.append('numberOfVms', numberofVms);
urlSearchParams.append('groupid', groupid);
return this.http.post(this.settings.getApiBaseURL() + 'setGroupNumberOfVms/', urlSearchParams, {
withCredentials: true,
headers: header
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))


}


setPerunGroupAttributes(application_id: number, groupid: number) {
let urlSearchParams = new URLSearchParams();
Expand Down
14 changes: 14 additions & 0 deletions src/app/api-connector/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,19 @@ export class UserService {

}

getFilteredMembersOfdeNBIVo(firstname: string, lastName: string, groupid: string) {

return this.http.get(this.settings.getApiBaseURL() + 'user/getFilteredMembers', {
withCredentials: true,
params: {
firstName: firstname,
lastName: lastName,
groupid: groupid
}
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))


}


}
12 changes: 0 additions & 12 deletions src/app/api-connector/vo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,7 @@ export class VoService {

}

getMembersOfdeNBIVo(firstname: string, lastName: string, groupid: string) {

return this.http.get(this.settings.getApiBaseURL() + 'filter_deNBIMembers/', {
withCredentials: true,
params: {
firstName: firstname,
lastName: lastName,
groupid: groupid
}
}).map((res: Response) => res.json()).catch((error: any) => Observable.throw(error.json().error || 'Server error'))


}



Expand Down
2 changes: 1 addition & 1 deletion src/app/projectmanagement/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export class OverviewComponent {
}

filterMembers(firstName: string, lastName: string, groupid: number) {
this.voservice.getMembersOfdeNBIVo(firstName, lastName, groupid.toString()).subscribe(result => {
this.userservice.getFilteredMembersOfdeNBIVo(firstName, lastName, groupid.toString()).subscribe(result => {
this.filteredMembers = result;
})
}
Expand Down

0 comments on commit cdd68af

Please sign in to comment.