1 //- Copyright (c) 2019 AT&T Intellectual Property. #
\r
3 //- Licensed under the Apache License, Version 2.0 (the "License"); #
\r
4 //- you may not use this file except in compliance with the License. #
\r
5 //- You may obtain a copy of the License at #
\r
7 //- http://www.apache.org/licenses/LICENSE-2.0 #
\r
9 //- Unless required by applicable law or agreed to in writing, software #
\r
10 //- distributed under the License is distributed on an "AS IS" BASIS, #
\r
11 //- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
\r
12 //- See the License for the specific language governing permissions and #
\r
13 //- limitations under the License. #
\r
14 //- #############################################################################
\r
17 div([@routerTransition])
\r
18 app-page-header([heading]="'Virtual Test Heads'", [icon]="'fa-edit'")
\r
23 input(matInput, name="filter", (keyup)="applyFilter($event.target.value)", placeholder="Filter")
\r
25 button(mat-raised-button, color="primary", (click)="createTestHead()") New
\r
27 div(style="width: 100%", [hidden]="!loading")
\r
28 mat-spinner(style="margin: auto", color="primary")
\r
30 table.mat-elevation-z8(mat-table, [dataSource]="dataSource", style="width: 100%", [hidden]="loading")
\r
32 ng-container(matColumnDef="name")
\r
33 th(mat-header-cell, *matHeaderCellDef) Name
\r
34 td(mat-cell, *matCellDef="let element", [routerLink]="['/test-heads', element._id]") {{ element.testHeadName}}
\r
36 ng-container(matColumnDef="description")
\r
37 th(mat-header-cell, *matHeaderCellDef) Description
\r
38 td(mat-cell, *matCellDef="let element", [routerLink]="['/test-heads', element._id]") {{ element.testHeadDescription}}
\r
40 ng-container(matColumnDef="options")
\r
41 th(mat-header-cell, *matHeaderCellDef) Options
\r
42 td(mat-cell, *matCellDef="let element")
\r
43 button.mr-3(mat-mini-fab, aria-label='Edit', color="primary", (click)='editTestHead(element)')
\r
45 button.text-white(mat-mini-fab, aria-label='Remove', color='warn', (click)='deleteTestHead(element)')
\r
48 tr(mat-header-row, *matHeaderRowDef="displayedColumns")
\r
49 tr(mat-row, *matRowDef="let row; columns: displayedColumns")
\r
51 mat-paginator([length]="resultsLength", [pageSizeOptions]="[10, 25, 100]", [hidden]="loading")
\r
56 input.form-control.bg-light.mb-1([(ngModel)]="search.test_head_id", type="text", placeholder="Search...")
\r
58 button.bg-primary.mbtn.pull-right.text-white.mb-1(mat-raised-button, (click)='createTestHead()') Create VTH
\r
59 table.table.table-striped([mfData]='data', #mf='mfDataTable', [mfRowsOnPage]='5')
\r
62 th(style='width: 20%')
\r
63 mfDefaultSorter(by='name') Name
\r
64 th(style='width: 50%')
\r
65 mfDefaultSorter(by='creator') Creator
\r
66 th(style='width: 10%')
\r
67 mfDefaultSorter(by='date') Date
\r
68 th(style='width: 20%') Options
\r
72 td Tiffany, Patrick
\r
75 button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='View', (click)='viewTestHead(null)')
\r
77 button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='Edit', (click)='editTestHead()')
\r
79 button.mbtn.text-white(mat-mini-fab, aria-label='Remove', color='warn', (click)='deleteTestHead()')
\r