1
- <!-- <div class="full-width">
2
- <mat-list *ngFor="let log of logContents">
3
- <mat-list-item class="log-item"><p>{{log}}</p></mat-list-item>
4
- </mat-list>
5
- </div> -->
6
- < div class ="full-width ">
1
+ < div class ="full-width top-panel-ctrl ">
2
+ < mat-form-field appearance ="standard ">
3
+ < mat-label > # of log entries</ mat-label >
4
+ < input matInput type ="number " min ="1 " step ="1 " id ="targetPrice " name ="targetPrice " [(ngModel)] ="limit ">
5
+ </ mat-form-field >
7
6
< button mat-icon-button matTooltip ="Refresh Log " (click) ="refreshLogs() ">
8
7
< mat-icon > refresh</ mat-icon >
9
8
</ button >
10
- < button mat-icon-button matTooltip ="Copy Log " *ngIf ="logContents ">
11
- < mat-icon [cdkCopyToClipboard] ="this.logContents.join('\n' ) "> file_copy</ mat-icon >
9
+ < button mat-icon-button matTooltip ="Copy All Log Records " *ngIf ="logs ">
10
+ < mat-icon [cdkCopyToClipboard] ="getClipboard( ) "> file_copy</ mat-icon >
12
11
</ button >
13
12
</ div >
14
- < div class ="full-width " *ngFor ="let log of logContents ">
15
- < p > {{log}}</ p >
16
- </ div >
13
+
14
+ < mat-progress-bar *ngIf ="!logs " mode ="query "> </ mat-progress-bar >
15
+ < div >
16
+ < table mat-table [dataSource] ="dataSource " matSort class ="mat-elevation-z2 ">
17
+
18
+ < ng-container matColumnDef ="date ">
19
+ < th mat-header-cell *matHeaderCellDef mat-sort-header ="d "> Date </ th >
20
+ < td mat-cell *matCellDef ="let log "> {{log.d.toLocaleString()}} </ td >
21
+ </ ng-container >
22
+
23
+ < ng-container matColumnDef ="level ">
24
+ < th mat-header-cell *matHeaderCellDef mat-sort-header ="l "> Level </ th >
25
+ < td mat-cell *matCellDef ="let log "> {{log.l}} </ td >
26
+ </ ng-container >
27
+
28
+ < ng-container matColumnDef ="origin ">
29
+ < th mat-header-cell *matHeaderCellDef mat-sort-header ="o "> Origin </ th >
30
+ < td mat-cell *matCellDef ="let log "> {{log.o}} </ td >
31
+ </ ng-container >
32
+
33
+ < ng-container matColumnDef ="message ">
34
+ < th mat-header-cell *matHeaderCellDef > Message </ th >
35
+ < td mat-cell *matCellDef ="let log "> {{log.t}} </ td >
36
+ </ ng-container >
37
+
38
+ < tr mat-header-row *matHeaderRowDef ="['date', 'level', 'origin', 'message'] "> </ tr >
39
+ < tr mat-row *matRowDef ="let row; columns: ['date', 'level', 'origin', 'message']; "> </ tr >
40
+ </ table >
41
+
42
+ </ div >
43
+ < mat-paginator [pageSizeOptions] ="[30, 50, 100] " showFirstLastButtons > </ mat-paginator >
0 commit comments