|
|
|
@ -66,19 +66,22 @@ export class DashboardPageComponent implements OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
|
this.usagesService.getTodayStorage(this.ctx.appName) |
|
|
|
this.ctx.appChanges |
|
|
|
.switchMap(app => this.usagesService.getTodayStorage(app.name)) |
|
|
|
.subscribe(dto => { |
|
|
|
this.assetsCurrent = dto.size; |
|
|
|
this.assetsMax = dto.maxAllowed; |
|
|
|
}); |
|
|
|
|
|
|
|
this.usagesService.getMonthCalls(this.ctx.appName) |
|
|
|
this.ctx.appChanges |
|
|
|
.switchMap(app => this.usagesService.getMonthCalls(app.name)) |
|
|
|
.subscribe(dto => { |
|
|
|
this.callsCurrent = dto.count; |
|
|
|
this.callsMax = dto.maxAllowed; |
|
|
|
}); |
|
|
|
|
|
|
|
this.usagesService.getStorageUsages(this.ctx.appName, DateTime.today().addDays(-20), DateTime.today()) |
|
|
|
this.ctx.appChanges |
|
|
|
.switchMap(app => this.usagesService.getStorageUsages(app.name, DateTime.today().addDays(-20), DateTime.today())) |
|
|
|
.subscribe(dtos => { |
|
|
|
this.chartStorageCount = { |
|
|
|
labels: createLabels(dtos), |
|
|
|
@ -111,7 +114,8 @@ export class DashboardPageComponent implements OnInit { |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
this.usagesService.getCallsUsages(this.ctx.appName, DateTime.today().addDays(-20), DateTime.today()) |
|
|
|
this.ctx.appChanges |
|
|
|
.switchMap(app => this.usagesService.getCallsUsages(app.name, DateTime.today().addDays(-20), DateTime.today())) |
|
|
|
.subscribe(dtos => { |
|
|
|
this.chartCallsCount = { |
|
|
|
labels: createLabels(dtos), |
|
|
|
|