added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / layout / test-definition-expanded-details / test-definition-expanded-details.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 .row.mt-2\r
18   .col-sm-4(*ngIf="data")\r
19     h3 {{ data.testName }}\r
20     p {{ data.testDescription }}\r
21     p.text-muted Updated At {{ data.updatedAt }}\r
22     p.text-muted Created At {{ data.createdAt }}\r
23   .col-sm-8\r
24     mat-card.mb-4\r
25       div(mat-card-image, style="padding: 5% 2px; margin:0px; width:100%; position: relative; cursor: pointer", #canvas, (click)="enlargeBpmn()", [attr.id]="'canvas' + testDefinitionId")\r
26         button(mat-icon-button, color="primary", style="position: absolute; top: 0px; right: 0px; z-index: 100")\r
27           mat-icon zoom_in\r
28 \r
29 .row(*ngIf="testInstanceList")\r
30   .col-12\r
31     table.mat-elevation-z4(mat-table, [dataSource]="testInstanceList", style="width: 100%")\r
32 \r
33       ng-container(matColumnDef="name")\r
34         th(mat-header-cell, *matHeaderCellDef) Instances\r
35         td(mat-cell, *matCellDef="let element")\r
36           a([routerLink]="['/test-instances', {filter: element._id}]") {{ element.testInstanceName}}\r
37 \r
38       ng-container(matColumnDef="{{status}}", *ngFor="let status of statusList")\r
39         th(mat-header-cell, *matHeaderCellDef) # {{status.toLowerCase()}}\r
40         td(mat-cell, *matCellDef="let element") \r
41           .dropdown(ngbDropdown, placement="top-right", *ngIf="element[status]")\r
42             a(ngbDropdownToggle) {{ element[status]}}\r
43             .dropdown-menu(ngbDropdownMenu, style="max-height: 200px; overflow-y: scroll")\r
44               div(*ngFor="let execution of testExecutionList | filterBy: {testResult: status}")\r
45                 a.dropdown-item([routerLink]="['/control-panel']", [queryParams]="{id: execution._id}", *ngIf="execution.historicTestInstance._id == element._id" )\r
46                   i.fa.fa-fw.fa-bar-chart(style="color: orange")\r
47                   span.pl-1 {{execution.startTime}}\r
48       \r
49       ng-container(matColumnDef="options", stickyEnd)\r
50         th.optionsColumn(mat-header-cell, *matHeaderCellDef)\r
51         td.optionsColumn(mat-cell, *matCellDef="let element") \r
52           .dropdown.options(ngbDropdown, placement="left", style="margin-right: -20px")\r
53             button(mat-icon-button, ngbDropdownToggle) \r
54               mat-icon more_vert\r
55             .dropdown-menu(ngbDropdownMenu)\r
56               a.dropdown-item((click)='executeTestInstance(element)')\r
57                 i.fa.fa-fw.fa-refresh(style="color: green")\r
58                 span.pl-1 Execute\r
59 \r
60       tr(mat-header-row, *matHeaderRowDef="displayedColumns")\r
61       tr(mat-row, *matRowDef="let row; columns: displayedColumns")\r
62 \r
63     mat-paginator([pageSizeOptions]="[5, 10]")