added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / layout / virtual-test-heads / virtual-test-heads.component.pug
1 //-  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 //-                                                                             #\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
6 //-                                                                             #\r
7 //-      http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 //-                                                                             #\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
15 \r
16 \r
17 div([@routerTransition])\r
18   app-page-header([heading]="'Virtual Test Heads'", [icon]="'fa-edit'")\r
19   \r
20   .card-mb-12 \r
21     .pull-left\r
22       mat-form-field\r
23         input(matInput, name="filter", (keyup)="applyFilter($event.target.value)", placeholder="Filter")\r
24     .pull-right\r
25       button(mat-raised-button, color="primary", (click)="createTestHead()") New\r
26 \r
27     div(style="width: 100%", [hidden]="!loading")\r
28       mat-spinner(style="margin: auto", color="primary")\r
29     \r
30     table.mat-elevation-z8(mat-table, [dataSource]="dataSource", style="width: 100%", [hidden]="loading")\r
31 \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
35 \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
39 \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
44             i.fa.fa-pencil\r
45           button.text-white(mat-mini-fab, aria-label='Remove', color='warn', (click)='deleteTestHead(element)')\r
46             i.fa.fa-remove\r
47 \r
48       tr(mat-header-row, *matHeaderRowDef="displayedColumns")\r
49       tr(mat-row, *matRowDef="let row; columns: displayedColumns")\r
50 \r
51     mat-paginator([length]="resultsLength", [pageSizeOptions]="[10, 25, 100]", [hidden]="loading")\r
52 \r
53     //.card-body\r
54       .row\r
55         div.col-6\r
56           input.form-control.bg-light.mb-1([(ngModel)]="search.test_head_id", type="text", placeholder="Search...")\r
57         div.col-6\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
60         thead\r
61           tr\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
69         tbody\r
70           tr\r
71             td Ping Test Head\r
72             td Tiffany, Patrick \r
73             td 7/21/18\r
74             td \r
75               button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='View', (click)='viewTestHead(null)') \r
76                 i.fa.fa-eye\r
77               button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='Edit', (click)='editTestHead()')\r
78                 i.fa.fa-pencil\r
79               button.mbtn.text-white(mat-mini-fab, aria-label='Remove', color='warn', (click)='deleteTestHead()')\r
80                 i.fa.fa-remove\r