Skip to content

Commit

Permalink
Fix bug in login functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Jan 24, 2024
1 parent 5d85adb commit ec2758f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export class ChartLineUsageTimeComponent {
name: 'Usage',
data: this.data.reduce((acc, line) => {
minutes += line.quantity;
acc.push([line.date, minutes]);
acc.push([line.date.getTime(), minutes]);
return acc;
}, [] as [Date, number][])
}, [] as [number, number][])
}];
} else if (this.chartType === 'perRepo') {
(this.options.series as any) = this.data.reduce((acc, line) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ export class LineUsageTimeComponent {
name: 'Usage',
data: this.data.reduce((acc, line) => {
gbs += line.quantity;
acc.push([line.date, gbs]);
acc.push([line.date.getTime(), gbs]);
return acc;
}, [] as [Date, number][])
}, [] as [number, number][])
}];
} else if (this.chartType === 'perRepo') {
(this.options.series as any) = this.data.reduce((acc, line) => {
gbs += line.quantity;
if (acc.find(a => a.name === line.repositorySlug)) {
const existing = acc.find(a => a.name === line.repositorySlug);
existing?.data.push([new Date(line.date).getTime(), existing.data[existing.data.length - 1][1] + line.quantity]);
existing?.data.push([line.date.getTime(), existing.data[existing.data.length - 1][1] + line.quantity]);
} else {
acc.push({
name: line.repositorySlug,
data: [
[new Date(line.date).getTime(), line.quantity]
[line.date.getTime(), line.quantity]
]
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class TableSharedStorageComponent {
) { }

ngOnInit() {
console.log('SharedStorageComponent ngOnInit()', this.data);
}

ngOnChanges() {
Expand Down
1 change: 1 addition & 0 deletions src/app/components/usage/usage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class UsageComponent {

this.usageReportService.getUsageReportFiltered().subscribe((usage) => {
this.usageLines = usage;
this.usageLinesSharedStorage = usage.filter(line => line.sku === 'Shared Storage');
this.cdr.detectChanges();
});
}
Expand Down

0 comments on commit ec2758f

Please sign in to comment.