mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-24 12:35:52 +00:00
Reflect last commit changes to web
This commit is contained in:
parent
71e05ecdd6
commit
16ffeb30f9
@ -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 => {
|
||||
|
@ -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);
|
||||
|
@ -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 <LogEntry>{
|
||||
message: entry.message,
|
||||
timestamp: moment.unix(entry.timestamp).format("YYYY-MM-DD HH:mm:ss"),
|
||||
|
@ -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)) {
|
||||
|
@ -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();
|
||||
});
|
||||
})
|
||||
|
@ -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"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
@ -22,7 +22,7 @@ export class ProjectSelectComponent implements OnInit {
|
||||
|
||||
loadProjectList() {
|
||||
this.apiService.getProjects().subscribe(data => {
|
||||
this.projectList = data["projects"]
|
||||
this.projectList = data["content"]["projects"]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -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 = <Project>{id: this.project.chain}
|
||||
})
|
||||
}
|
||||
|
@ -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"])
|
||||
}
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user