Skip to content

Commit

Permalink
export button
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Feb 13, 2024
1 parent 19eed07 commit cc380c1
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 19 deletions.
188 changes: 185 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"github-usage-report": "^1.5.0",
"highcharts": "^11.2.0",
"highcharts-angular": "^4.0.0",
"jspdf": "^2.5.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Expand All @@ -49,4 +50,4 @@
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~5.3.3"
}
}
}
16 changes: 10 additions & 6 deletions src/app/components/usage/usage.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ <h1 class="mat-headline-2" style="user-select: none; font-weight: 800; text-alig
<mat-progress-bar *ngIf="progress && progress < 99" mode="determinate" [value]="progress"></mat-progress-bar>
<mat-progress-bar *ngIf="progress && progress >= 99" mode="indeterminate"></mat-progress-bar>

<ng-container *ngIf="usage">
<button mat-button *ngIf="usage" (click)="exportHtml()">
<mat-icon>download</mat-icon>
Export
</button>

<div id="usage-report" *ngIf="usage">
<form class="mat-app-background">
<mat-form-field appearance="fill">
<mat-label>Choose a date range</mat-label>
Expand Down Expand Up @@ -61,7 +66,7 @@ <h1 class="mat-headline-2" style="user-select: none; font-weight: 800; text-alig
</ng-template>
<ng-template matTabContent>
<div style="margin-top: 25px;"></div>
<app-actions [data]="usageLinesActions" [currency]="currency"></app-actions>
<app-actions [data]="this.usageLines.actions" [currency]="currency"></app-actions>
</ng-template>
</mat-tab>
<mat-tab>
Expand All @@ -71,7 +76,7 @@ <h1 class="mat-headline-2" style="user-select: none; font-weight: 800; text-alig
</ng-template>
<ng-template matTabContent>
<div style="margin-top: 25px;"></div>
<app-shared-storage [data]="usageLinesSharedStorage" [currency]="currency"></app-shared-storage>
<app-shared-storage [data]="this.usageLines.sharedStorage" [currency]="currency"></app-shared-storage>
</ng-template>
</mat-tab>
<mat-tab>
Expand All @@ -81,12 +86,11 @@ <h1 class="mat-headline-2" style="user-select: none; font-weight: 800; text-alig
</ng-template>
<ng-template matTabContent>
<div style="margin-top: 25px;"></div>
<app-copilot [data]="usageLinesCopilot" [currency]="currency"></app-copilot>
<app-copilot [data]="this.usageLines.copilot" [currency]="currency"></app-copilot>
</ng-template>
</mat-tab>
</mat-tab-group>

</ng-container>
</div>

<ng-container *ngIf="!usage && !progress">
<div class="flex-center-column full-width" style="text-align: center;">
Expand Down
Loading

0 comments on commit cc380c1

Please sign in to comment.