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) {
|
private router: Router) {
|
||||||
this.apiService.getAccountDetails()
|
this.apiService.getAccountDetails()
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.account = data.manager;
|
this.account = data.content.manager;
|
||||||
this.logged = data.logged_in;
|
this.logged = data.content.logged_in;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export class AuthService {
|
|||||||
() => {
|
() => {
|
||||||
this.apiService.getAccountDetails()
|
this.apiService.getAccountDetails()
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.account = data.manager;
|
this.account = data.content.manager;
|
||||||
this.logged = true;
|
this.logged = true;
|
||||||
this.router.navigateByUrl("/account");
|
this.router.navigateByUrl("/account");
|
||||||
})
|
})
|
||||||
@ -61,7 +61,7 @@ export class AuthService {
|
|||||||
this.apiService.getAccountDetails()
|
this.apiService.getAccountDetails()
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.logged = true;
|
this.logged = true;
|
||||||
this.account = data.manager;
|
this.account = data.content.manager;
|
||||||
this.router.navigateByUrl("/account");
|
this.router.navigateByUrl("/account");
|
||||||
}),
|
}),
|
||||||
error => {
|
error => {
|
||||||
|
@ -38,7 +38,7 @@ export class CreateProjectComponent implements OnInit {
|
|||||||
|
|
||||||
this.apiService.createProject(this.project).subscribe(
|
this.apiService.createProject(this.project).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.router.navigateByUrl("/project/" + data["id"]);
|
this.router.navigateByUrl("/project/" + data["content"]["id"]);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error.error.message);
|
console.log(error.error.message);
|
||||||
|
@ -46,7 +46,7 @@ export class LogsComponent implements OnInit {
|
|||||||
private getLogs(level: number) {
|
private getLogs(level: number) {
|
||||||
this.apiService.getLogs(level).subscribe(
|
this.apiService.getLogs(level).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.data.data = _.map(data["logs"], (entry) => {
|
this.data.data = _.map(data["content"]["logs"], (entry) => {
|
||||||
return <LogEntry>{
|
return <LogEntry>{
|
||||||
message: entry.message,
|
message: entry.message,
|
||||||
timestamp: moment.unix(entry.timestamp).format("YYYY-MM-DD HH:mm:ss"),
|
timestamp: moment.unix(entry.timestamp).format("YYYY-MM-DD HH:mm:ss"),
|
||||||
|
@ -57,7 +57,7 @@ export class ManagerListComponent implements OnInit {
|
|||||||
private getManagers() {
|
private getManagers() {
|
||||||
this.apiService.getAllManagers()
|
this.apiService.getAllManagers()
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
this.data.data = data["managers"]
|
this.data.data = data["content"]["managers"]
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if (error && (error.status == 401 || error.status == 403)) {
|
if (error && (error.status == 401 || error.status == 403)) {
|
||||||
|
@ -61,7 +61,7 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
this.apiService.getMonitoringSnapshots(60, this.projectId)
|
this.apiService.getMonitoringSnapshots(60, this.projectId)
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.snapshots = data.snapshots;
|
this.snapshots = data.content.snapshots;
|
||||||
this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => {
|
this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => {
|
||||||
return b.time_stamp - a.time_stamp
|
return b.time_stamp - a.time_stamp
|
||||||
})[0] : null;
|
})[0] : null;
|
||||||
@ -99,7 +99,7 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
this.apiService.getAssigneeStats(this.projectId)
|
this.apiService.getAssigneeStats(this.projectId)
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.assignees = data.assignees;
|
this.assignees = data.content.assignees;
|
||||||
let colors = this.assignees.map(() => {
|
let colors = this.assignees.map(() => {
|
||||||
return this.colors.random[Math.floor(Math.random() * this.colors.random.length)]
|
return this.colors.random[Math.floor(Math.random() * this.colors.random.length)]
|
||||||
});
|
});
|
||||||
@ -305,11 +305,11 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
private getProject() {
|
private getProject() {
|
||||||
this.apiService.getProject(this.projectId).subscribe((data: any) => {
|
this.apiService.getProject(this.projectId).subscribe((data: any) => {
|
||||||
this.project = data.project;
|
this.project = data.content.project;
|
||||||
|
|
||||||
this.apiService.getMonitoringSnapshots(60, this.projectId)
|
this.apiService.getMonitoringSnapshots(60, this.projectId)
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.snapshots = data.snapshots;
|
this.snapshots = data.content.snapshots;
|
||||||
this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => {
|
this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => {
|
||||||
return b.time_stamp - a.time_stamp
|
return b.time_stamp - a.time_stamp
|
||||||
})[0] : null;
|
})[0] : null;
|
||||||
@ -323,7 +323,7 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
this.apiService.getAssigneeStats(this.projectId)
|
this.apiService.getAssigneeStats(this.projectId)
|
||||||
.subscribe((data: any) => {
|
.subscribe((data: any) => {
|
||||||
this.assignees = data.assignees;
|
this.assignees = data.content.assignees;
|
||||||
this.setupAssigneesPie();
|
this.setupAssigneesPie();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -25,7 +25,8 @@ export class ProjectListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getProjects() {
|
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() {
|
private getProject() {
|
||||||
this.apiService.getProject(this.projectId).subscribe(data => {
|
this.apiService.getProject(this.projectId).subscribe(data => {
|
||||||
this.project = data["project"]
|
this.project = data["content"]["project"]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private getProjectAccesses() {
|
private getProjectAccesses() {
|
||||||
this.apiService.getProjectAccess(this.projectId).subscribe(
|
this.apiService.getProjectAccess(this.projectId).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.accesses = data["accesses"]
|
this.accesses = data["content"]["accesses"]
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if (error && (error.status == 401 || error.status == 403)) {
|
if (error && (error.status == 401 || error.status == 403)) {
|
||||||
|
@ -22,7 +22,7 @@ export class ProjectSelectComponent implements OnInit {
|
|||||||
|
|
||||||
loadProjectList() {
|
loadProjectList() {
|
||||||
this.apiService.getProjects().subscribe(data => {
|
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() {
|
private getProject() {
|
||||||
this.apiService.getProject(this.projectId).subscribe(data => {
|
this.apiService.getProject(this.projectId).subscribe(data => {
|
||||||
this.project = data["project"];
|
this.project = data["content"]["project"];
|
||||||
this.selectedProject = <Project>{id: this.project.chain}
|
this.selectedProject = <Project>{id: this.project.chain}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ export class WorkerDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
public refresh() {
|
public refresh() {
|
||||||
this.apiService.getWorkerStats()
|
this.apiService.getWorkerStats()
|
||||||
.subscribe((data: any) => {
|
.subscribe(data => {
|
||||||
this.updateChart(data.stats)
|
this.updateChart(data["content"]["stats"])
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user