4
4
< button mat-raised-button color ="primary " routerLink ="/edit/0 "> Add new</ button >
5
5
< button mat-raised-button color ="primary " routerLink ="/settings "> Settings</ button >
6
6
</ div >
7
- < div *ngFor ="let results of chart; trackBy: trackChart " class ="ui-g ui-g-12 ui-lg-6 chart ">
8
- < span class ="environment " (click) ="setEnvironment(results.environmentID) "> {{results.name}}</ span >
9
- < ngx-charts-advanced-pie-chart [scheme] ="chartColors "
10
- [results] ="results.results "
11
- (select) ="onChartSelect(results, $event) ">
12
- </ ngx-charts-advanced-pie-chart >
13
- </ div >
14
- < div class ="ui-g-12 " *ngIf ="dataSource ">
15
- < mat-checkbox [(ngModel)] ="activeOnly "> Active Only</ mat-checkbox >
16
- < mat-form-field class ="full ">
17
- < input matInput [(ngModel)] ="filter " (keyup) ="applyFilter() " placeholder ="Search ">
18
- </ mat-form-field >
19
- < table mat-table [dataSource] ="dataSource " class ="full mat-elevation-z2 " matSort #sort ="matSort ">
20
- < ng-container matColumnDef ="name ">
21
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Name</ th >
22
- < td mat-cell *matCellDef ="let check "> {{check.Name}} </ td >
23
- </ ng-container >
7
+ </ mat-card-content >
8
+ </ mat-card >
9
+ < div *ngFor ="let results of chart; trackBy: trackChart " class ="ui-g ui-g-12 ui-lg-6 chart ">
10
+ < span class ="environment " (click) ="setEnvironment(results.environmentID) "> {{results.name}}</ span >
11
+ < ngx-charts-advanced-pie-chart [scheme] ="chartColors "
12
+ [results] ="results.results "
13
+ (select) ="onChartSelect(results, $event) ">
14
+ </ ngx-charts-advanced-pie-chart >
15
+ </ div >
16
+ < div class ="ui-g-12 " *ngIf ="dataSource ">
17
+ < mat-checkbox [(ngModel)] ="activeOnly " matTooltip ="Shows only active checks in above charts " matTooltipPosition ="above "> Active Only</ mat-checkbox >
18
+ < br />
19
+ < br />
20
+ < mat-form-field class ="full ">
21
+ < input matInput [(ngModel)] ="filter " (keyup) ="applyFilter() " placeholder ="Search ">
22
+ </ mat-form-field >
23
+ < div class ="mat-elevation-z2 ">
24
+ < table mat-table [dataSource] ="dataSource " class ="full " matSort #sort ="matSort ">
25
+ < ng-container matColumnDef ="name ">
26
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Name</ th >
27
+ < td mat-cell *matCellDef ="let check "> {{check.Name}} </ td >
28
+ </ ng-container >
24
29
25
- < ng-container matColumnDef ="active ">
26
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Active</ th >
27
- < td mat-cell *matCellDef ="let check "> {{check.Active ? "Yes" : "No"}} </ td >
28
- </ ng-container >
30
+ < ng-container matColumnDef ="active ">
31
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Active</ th >
32
+ < td mat-cell *matCellDef ="let check "> {{check.Active ? "Yes" : "No"}} </ td >
33
+ </ ng-container >
29
34
30
- < ng-container matColumnDef ="group ">
31
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Group</ th >
32
- < td mat-cell *matCellDef ="let check "> {{check.GroupID ? checkGroupLookup[check.GroupID].Name : "None"}}</ td >
33
- </ ng-container >
35
+ < ng-container matColumnDef ="group ">
36
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Group</ th >
37
+ < td mat-cell *matCellDef ="let check "> {{check.GroupID ? checkGroupLookup[check.GroupID].Name : "None"}}</ td >
38
+ </ ng-container >
34
39
35
- < ng-container matColumnDef ="environment ">
36
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Environment</ th >
37
- < td mat-cell *matCellDef ="let check "> {{environmentLookup[check.EnvironmentID].Name}}</ td >
38
- </ ng-container >
40
+ < ng-container matColumnDef ="environment ">
41
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Environment</ th >
42
+ < td mat-cell *matCellDef ="let check "> {{environmentLookup[check.EnvironmentID].Name}}</ td >
43
+ </ ng-container >
39
44
40
- < ng-container matColumnDef ="type ">
41
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Type</ th >
42
- < td mat-cell *matCellDef ="let check "> {{typeLookup[check.TypeID].Name}}</ td >
43
- </ ng-container >
45
+ < ng-container matColumnDef ="type ">
46
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Type</ th >
47
+ < td mat-cell *matCellDef ="let check "> {{typeLookup[check.TypeID].Name}}</ td >
48
+ </ ng-container >
44
49
45
- < ng-container matColumnDef ="lastResultStatus ">
46
- < th mat-header-cell *matHeaderCellDef mat-sort-header > Last Result Status</ th >
47
- < td mat-cell *matCellDef ="let check "> {{CheckResultStatus[check.LastResultStatus]}}</ td >
48
- </ ng-container >
50
+ < ng-container matColumnDef ="lastResultStatus ">
51
+ < th mat-header-cell *matHeaderCellDef mat-sort-header > Last Result Status</ th >
52
+ < td mat-cell *matCellDef ="let check "> {{CheckResultStatus[check.LastResultStatus]}}</ td >
53
+ </ ng-container >
49
54
50
- < ng-container matColumnDef ="options ">
51
- < th mat-header-cell *matHeaderCellDef > Options</ th >
52
- < td mat-cell *matCellDef ="let check ">
53
- < div class ="rowbuttons ">
54
- < button matTooltip ="Edit " matTooltipPosition ="above " mat-icon-button color ="primary " routerLink ="/edit/{{check.ID}} ">
55
- < mat-icon class ="md-24 "> edit</ mat-icon >
56
- </ button >
57
- < button matTooltip ="Copy " matTooltipPosition ="above " mat-icon-button color ="primary " routerLink ="/edit/{{check.ID}}/copy ">
58
- < mat-icon class ="md-24 "> content_copy</ mat-icon >
59
- </ button >
60
- < button matTooltip ="Run " matTooltipPosition ="above " mat-icon-button color ="primary " (click) ="run(check) ">
61
- < mat-icon class ="md-24 "> play_arrow</ mat-icon >
62
- </ button >
63
- </ div >
64
- </ td >
65
- </ ng-container >
55
+ < ng-container matColumnDef ="options ">
56
+ < th mat-header-cell *matHeaderCellDef > Options</ th >
57
+ < td mat-cell *matCellDef ="let check ">
58
+ < div class ="rowbuttons ">
59
+ < button matTooltip ="Edit " matTooltipPosition ="above " mat-icon-button color ="primary " routerLink ="/edit/{{check.ID}} ">
60
+ < mat-icon class ="md-24 "> edit</ mat-icon >
61
+ </ button >
62
+ < button matTooltip ="Copy " matTooltipPosition ="above " mat-icon-button color ="primary " routerLink ="/edit/{{check.ID}}/copy ">
63
+ < mat-icon class ="md-24 "> content_copy</ mat-icon >
64
+ </ button >
65
+ < button matTooltip ="Run " matTooltipPosition ="above " mat-icon-button color ="primary " (click) ="run(check) ">
66
+ < mat-icon class ="md-24 "> play_arrow</ mat-icon >
67
+ </ button >
68
+ </ div >
69
+ </ td >
70
+ </ ng-container >
66
71
67
- < tr mat-header-row *matHeaderRowDef ="displayedColumns "> </ tr >
68
- < tr mat-row *matRowDef ="let row; columns: displayedColumns; "> </ tr >
69
- </ table >
70
- <!--<p-dataTable #dt [value]="checks" [paginator]="true" [rowsPerPageOptions]="[10,25,50,100]" [rows]="25" [responsive]="true" selectionMode="single" (onRowSelect)="onCheckSelected($event)">
71
- <p-column header="Name" field="Name" sortable="true" [filter]="true"></p-column>
72
- <p-column header="Active" field="Active" sortable="true" [filter]="true" filterMatchMode="equals" [style]="{'overflow':'visible'}">
73
- <ng-template pTemplate="filter" let-col>
74
- <p-dropdown [options]="activeOptions" [(ngModel)]="activeOption" [style]="{'width':'100%'}" (onChange)="updateActiveFilter()"
75
- styleClass="ui-column-filter"></p-dropdown>
76
- </ng-template>
77
- <ng-template let-check="rowData" pTemplate="body">
78
- {{check.Active ? "Yes" : "No"}}
79
- </ng-template>
80
- </p-column>
81
- <p-column header="Group" field="GroupID" sortable="true" [filter]="true" filterMatchMode="equals" [style]="{'overflow':'visible'}">
82
- <ng-template pTemplate="filter" let-col>
83
- <p-dropdown [options]="checkGroupOptions" [(ngModel)]="checkGroupOption" [style]="{'width':'100%'}" (onChange)="updateCheckGroupFilter()"
84
- styleClass="ui-column-filter"></p-dropdown>
85
- </ng-template>
86
- <ng-template let-check="rowData" pTemplate="body">
87
- {{check.GroupID ? checkGroupLookup[check.GroupID].Name : "None"}}
88
- </ng-template>
89
- </p-column>
90
- <p-column header="Environment" field="EnvironmentID" sortable="true" [filter]="true" filterMatchMode="equals" [style]="{'overflow':'visible'}">
91
- <ng-template pTemplate="filter" let-col>
92
- <p-dropdown [options]="environmentOptions" [(ngModel)]="environmentOption" [style]="{'width':'100%'}" (onChange)="updateEnvironmentFilter()"
93
- styleClass="ui-column-filter"></p-dropdown>
94
- </ng-template>
95
- <ng-template let-check="rowData" pTemplate="body">
96
- {{environmentLookup[check.EnvironmentID].Name}}
97
- </ng-template>
98
- </p-column>
99
- <p-column header="Type" field="TypeID" sortable="true" [filter]="true" filterMatchMode="equals" [style]="{'overflow':'visible'}">
100
- <ng-template pTemplate="filter" let-col>
101
- <p-dropdown [options]="typeOptions" [(ngModel)]="typeOption" [style]="{'width':'100%'}" (onChange)="updateTypeFilter()"
102
- styleClass="ui-column-filter"></p-dropdown>
103
- </ng-template>
104
- <ng-template let-check="rowData" pTemplate="body">
105
- {{typeLookup[check.TypeID].Name}}
106
- </ng-template>
107
- </p-column>
108
- <p-column header="Last Result Status" field="LastResultStatus" sortable="true" [filter]="true" filterMatchMode="equals" [style]="{'overflow':'visible'}">
109
- <ng-template pTemplate="filter" let-col>
110
- <p-dropdown [options]="resultOptions" [(ngModel)]="resultOption" [style]="{'width':'100%'}" (onChange)="updateResultFilter()"
111
- styleClass="ui-column-filter"></p-dropdown>
112
- </ng-template>
113
- <ng-template let-check="rowData" pTemplate="body">
114
- {{CheckResultStatus[check.LastResultStatus]}}
115
- </ng-template>
116
- </p-column>
117
- <p-column header="Options">
118
- <ng-template let-check="rowData" pTemplate="body">
119
- <div class="rowbuttons">
120
- <button matTooltip="Edit" matTooltipPosition="above" mat-icon-button color="primary" routerLink="/edit/{{check.ID}}">
121
- <mat-icon class="md-24">edit</mat-icon>
122
- </button>
123
- <button matTooltip="Copy" matTooltipPosition="above" mat-icon-button color="primary" routerLink="/edit/{{check.ID}}/copy">
124
- <mat-icon class="md-24">content_copy</mat-icon>
125
- </button>
126
- <button matTooltip="Run" matTooltipPosition="above" mat-icon-button color="primary" (click)="run(check)">
127
- <mat-icon class="md-24">play_arrow</mat-icon>
128
- </button>
129
- </div>
130
- </ng-template>
131
- </p-column>
132
- </p-dataTable>-->
133
- </ div >
134
- </ mat-card-content >
135
- </ mat-card >
72
+ < tr mat-header-row *matHeaderRowDef ="displayedColumns "> </ tr >
73
+ < tr mat-row *matRowDef ="let row; columns: displayedColumns; "> </ tr >
74
+ </ table >
75
+ < mat-paginator [pageSize] ="25 " [pageSizeOptions] ="[10,25,50,100] "> </ mat-paginator >
76
+ </ div >
77
+ </ div >
0 commit comments