diff --git a/web/angular/src/app/auth.service.ts b/web/angular/src/app/auth.service.ts index ac16069..a34ee34 100644 --- a/web/angular/src/app/auth.service.ts +++ b/web/angular/src/app/auth.service.ts @@ -17,8 +17,8 @@ export class AuthService { private router: Router) { this.apiService.getAccountDetails() .subscribe((data: any) => { - this.account = data.manager; - this.logged = data.logged_in; + this.account = data.content.manager; + this.logged = data.content.logged_in; }) } @@ -28,7 +28,7 @@ export class AuthService { () => { this.apiService.getAccountDetails() .subscribe((data: any) => { - this.account = data.manager; + this.account = data.content.manager; this.logged = true; this.router.navigateByUrl("/account"); }) @@ -61,7 +61,7 @@ export class AuthService { this.apiService.getAccountDetails() .subscribe((data: any) => { this.logged = true; - this.account = data.manager; + this.account = data.content.manager; this.router.navigateByUrl("/account"); }), error => { diff --git a/web/angular/src/app/create-project/create-project.component.ts b/web/angular/src/app/create-project/create-project.component.ts index 2746eb3..32d493d 100644 --- a/web/angular/src/app/create-project/create-project.component.ts +++ b/web/angular/src/app/create-project/create-project.component.ts @@ -38,7 +38,7 @@ export class CreateProjectComponent implements OnInit { this.apiService.createProject(this.project).subscribe( data => { - this.router.navigateByUrl("/project/" + data["id"]); + this.router.navigateByUrl("/project/" + data["content"]["id"]); }, error => { console.log(error.error.message); diff --git a/web/angular/src/app/logs/logs.component.ts b/web/angular/src/app/logs/logs.component.ts index 70de835..a5653a3 100644 --- a/web/angular/src/app/logs/logs.component.ts +++ b/web/angular/src/app/logs/logs.component.ts @@ -46,7 +46,7 @@ export class LogsComponent implements OnInit { private getLogs(level: number) { this.apiService.getLogs(level).subscribe( data => { - this.data.data = _.map(data["logs"], (entry) => { + this.data.data = _.map(data["content"]["logs"], (entry) => { return { message: entry.message, timestamp: moment.unix(entry.timestamp).format("YYYY-MM-DD HH:mm:ss"), diff --git a/web/angular/src/app/manager-list/manager-list.component.ts b/web/angular/src/app/manager-list/manager-list.component.ts index 6f7c0ab..2eb45b1 100644 --- a/web/angular/src/app/manager-list/manager-list.component.ts +++ b/web/angular/src/app/manager-list/manager-list.component.ts @@ -57,7 +57,7 @@ export class ManagerListComponent implements OnInit { private getManagers() { this.apiService.getAllManagers() .subscribe(data => { - this.data.data = data["managers"] + this.data.data = data["content"]["managers"] }, error => { if (error && (error.status == 401 || error.status == 403)) { diff --git a/web/angular/src/app/project-dashboard/project-dashboard.component.ts b/web/angular/src/app/project-dashboard/project-dashboard.component.ts index c52b083..8029580 100644 --- a/web/angular/src/app/project-dashboard/project-dashboard.component.ts +++ b/web/angular/src/app/project-dashboard/project-dashboard.component.ts @@ -61,7 +61,7 @@ export class ProjectDashboardComponent implements OnInit { this.apiService.getMonitoringSnapshots(60, this.projectId) .subscribe((data: any) => { - this.snapshots = data.snapshots; + this.snapshots = data.content.snapshots; this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => { return b.time_stamp - a.time_stamp })[0] : null; @@ -99,7 +99,7 @@ export class ProjectDashboardComponent implements OnInit { this.apiService.getAssigneeStats(this.projectId) .subscribe((data: any) => { - this.assignees = data.assignees; + this.assignees = data.content.assignees; let colors = this.assignees.map(() => { return this.colors.random[Math.floor(Math.random() * this.colors.random.length)] }); @@ -305,11 +305,11 @@ export class ProjectDashboardComponent implements OnInit { private getProject() { this.apiService.getProject(this.projectId).subscribe((data: any) => { - this.project = data.project; + this.project = data.content.project; this.apiService.getMonitoringSnapshots(60, this.projectId) .subscribe((data: any) => { - this.snapshots = data.snapshots; + this.snapshots = data.content.snapshots; this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => { return b.time_stamp - a.time_stamp })[0] : null; @@ -323,7 +323,7 @@ export class ProjectDashboardComponent implements OnInit { this.apiService.getAssigneeStats(this.projectId) .subscribe((data: any) => { - this.assignees = data.assignees; + this.assignees = data.content.assignees; this.setupAssigneesPie(); }); }) diff --git a/web/angular/src/app/project-list/project-list.component.ts b/web/angular/src/app/project-list/project-list.component.ts index 432e3d6..f183f26 100755 --- a/web/angular/src/app/project-list/project-list.component.ts +++ b/web/angular/src/app/project-list/project-list.component.ts @@ -25,7 +25,8 @@ export class ProjectListComponent implements OnInit { } getProjects() { - this.apiService.getProjects().subscribe(data => this.projects = data["projects"]); + this.apiService.getProjects().subscribe(data => + this.projects = data["content"]["projects"]); } } diff --git a/web/angular/src/app/project-perms/project-perms.component.ts b/web/angular/src/app/project-perms/project-perms.component.ts index f52c567..c081c6a 100644 --- a/web/angular/src/app/project-perms/project-perms.component.ts +++ b/web/angular/src/app/project-perms/project-perms.component.ts @@ -48,14 +48,14 @@ export class ProjectPermsComponent implements OnInit { private getProject() { this.apiService.getProject(this.projectId).subscribe(data => { - this.project = data["project"] + this.project = data["content"]["project"] }) } private getProjectAccesses() { this.apiService.getProjectAccess(this.projectId).subscribe( data => { - this.accesses = data["accesses"] + this.accesses = data["content"]["accesses"] }, error => { if (error && (error.status == 401 || error.status == 403)) { diff --git a/web/angular/src/app/project-select/project-select.component.ts b/web/angular/src/app/project-select/project-select.component.ts index 94927b1..1f50c73 100644 --- a/web/angular/src/app/project-select/project-select.component.ts +++ b/web/angular/src/app/project-select/project-select.component.ts @@ -22,7 +22,7 @@ export class ProjectSelectComponent implements OnInit { loadProjectList() { this.apiService.getProjects().subscribe(data => { - this.projectList = data["projects"] + this.projectList = data["content"]["projects"] }) } } diff --git a/web/angular/src/app/update-project/update-project.component.ts b/web/angular/src/app/update-project/update-project.component.ts index f6e3f8e..86ee576 100644 --- a/web/angular/src/app/update-project/update-project.component.ts +++ b/web/angular/src/app/update-project/update-project.component.ts @@ -30,7 +30,7 @@ export class UpdateProjectComponent implements OnInit { private getProject() { this.apiService.getProject(this.projectId).subscribe(data => { - this.project = data["project"]; + this.project = data["content"]["project"]; this.selectedProject = {id: this.project.chain} }) } diff --git a/web/angular/src/app/worker-dashboard/worker-dashboard.component.ts b/web/angular/src/app/worker-dashboard/worker-dashboard.component.ts index b27b579..164b56f 100644 --- a/web/angular/src/app/worker-dashboard/worker-dashboard.component.ts +++ b/web/angular/src/app/worker-dashboard/worker-dashboard.component.ts @@ -22,8 +22,8 @@ export class WorkerDashboardComponent implements OnInit { public refresh() { this.apiService.getWorkerStats() - .subscribe((data: any) => { - this.updateChart(data.stats) + .subscribe(data => { + this.updateChart(data["content"]["stats"]) } ) }