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
22 app-page-header([heading]="'Test Definitions'", [icon]="'fa-edit'")
\r
24 button(mat-raised-button, color="primary", (click)="create()") New
\r
28 input(matInput, name="filter", (keyup)="applyFilter($event.target.value)", placeholder="Filter")
\r
30 button(mat-raised-button, color="primary", (click)="create()") New
\r
32 div(style="width: 100%", [hidden]="!loading")
\r
33 mat-spinner(style="margin: auto", color="primary")
\r
35 table.mat-elevation-z8(mat-table, *ngIf="dataSource && dataSource.data && dataSource.data.length > 0", [dataSource]="dataSource", style="width: 100%", [hidden]="loading")
\r
37 ng-container(matColumnDef="lock")
\r
38 th(mat-header-cell, *matHeaderCellDef)
\r
39 td(mat-cell, *matCellDef="let element", (click)="expand(element)")
\r
41 i.fa.fa-lock(*ngIf="element.disabled")
\r
43 ng-container(matColumnDef="name")
\r
44 th(mat-header-cell, *matHeaderCellDef) Name
\r
45 td(mat-cell, *matCellDef="let element", (dblclick)="navToDefinition(element._id)") {{ element.testName }}
\r
47 ng-container(matColumnDef="description")
\r
48 th(mat-header-cell, *matHeaderCellDef) Description
\r
49 td(mat-cell, *matCellDef="let element", (dblclick)="navToDefinition(element._id)") {{ element.testDescription }}
\r
51 ng-container(matColumnDef="id")
\r
52 th(mat-header-cell, *matHeaderCellDef) Id
\r
53 td(mat-cell, *matCellDef="let element", (dblclick)="navToDefinition(element._id)") {{ element._id }}
\r
55 ng-container(matColumnDef="processDefinitionKey")
\r
56 th(mat-header-cell, *matHeaderCellDef) Process Definition Key
\r
57 td(mat-cell, *matCellDef="let element", (dblclick)="navToDefinition(element._id)") {{ element.processDefinitionKey }}
\r
59 ng-container(matColumnDef="options")
\r
60 th(mat-header-cell, *matHeaderCellDef) Options
\r
61 td(mat-cell, *matCellDef="let element")
\r
62 .dropdown(ngbDropdown, placement="bottom-right")
\r
63 button(mat-mini-fab, color="primary", ngbDropdownToggle)
\r
65 //mat-icon more_vert
\r
66 .dropdown-menu(ngbDropdownMenu)
\r
67 a.dropdown-item(*ngIf="isDeployed(element) && !element.disabled", (click)='createInstance(element)')
\r
68 i.fa.fa-fw.fa-plus(style="color: #005000")
\r
69 span.pl-1 Create Instance
\r
70 //- a.dropdown-item((click)='view(element)')
\r
71 //- i.fa.fa-fw.fa-eye(style="color: #ff9100")
\r
73 a.dropdown-item(*ngIf="element.disabled", (click)='unlock(element)')
\r
74 i.fa.fa-fw.far.fa-unlock(style="color: black")
\r
76 a.dropdown-item(*ngIf="!element.disabled", (click)='lock(element)')
\r
77 i.fa.fa-fw.far.fa-lock(style="color: black")
\r
79 a.dropdown-item(*ngIf="favorites.indexOf(element._id) < 0", (click)='favorite(element)')
\r
80 i.fa.fa-fw.far.fa-star(style="color: yellow")
\r
82 a.dropdown-item(*ngIf="favorites.indexOf(element._id) >= 0", (click)='unfavorite(element)')
\r
83 i.fa.fa-fw.fas.fa-star(style="color: yellow")
\r
84 span.pl-1 Unfavorite
\r
85 a.dropdown-item((click)='edit(element)')
\r
86 i.fa.fa-fw.fa-pencil(style="color: #0d47a1")
\r
88 a.dropdown-item([routerLink]="['/modeler']", [queryParams]="{testDefinitionId: element._id}")
\r
89 i.fa.fa-fw.bpmn-icon-bpmn-io(style="color: green")
\r
91 a.dropdown-item((click)='delete(element)')
\r
92 i.fa.fa-fw.fa-remove(style="color: #dd2c00")
\r
94 //- button.mr-3(mat-mini-fab, matTooltip="View Workflow", color="accent", (click)='view(element)')
\r
96 //- button.mr-3(mat-mini-fab, matTooltip="Edit", color="primary", (click)='edit(element)')
\r
98 //- button.text-white(mat-mini-fab, matTooltip="Delete", color='warn', (click)='delete(element)')
\r
101 tr(mat-header-row, *matHeaderRowDef="displayedColumns")
\r
102 tr(mat-row, *matRowDef="let row; columns: displayedColumns")
\r
104 //-mat-paginator([length]="resultsLength", [pageSizeOptions]="[10, 25, 100]", [hidden]="loading")
\r
112 button.mr-2.pull-right(color="primary", matTooltip="Create Test Instance", mat-icon-button, (click)="createInstance()", [disabled] = "((!selectedSingleRow) || (selectedLockedRows))")
\r
115 button.mr-4.pull-right(color="primary", matTooltip="Lock Test Definition", mat-icon-button, (click)="lockMultiple()", [disabled]="(!hasSelectedRows)", [hidden]="(!selectedUnlockedRows)")
\r
118 button.mr-2.pull-right(color="primary", matTooltip="Unlock Test Definition", mat-icon-button, (click)="unlockMultiple()", [disabled]="", [hidden] = "((!selectedLockedRows) || (!selectedRows))")
\r
122 button.mr-2.pull-right(color="primary", matTooltip="Edit Test Definition", mat-icon-button, (click)="edit()", [disabled]="(!selectedSingleRow)")
\r
125 button.mr-2.pull-right(color="primary", matTooltip="Delete Test Definition", mat-icon-button, (click)="deleteMultiple()", [disabled]="!hasSelectedRows")
\r
126 mat-icon delete_forever
\r
128 button.mr-2.pull-right(mat-raised-button, color="primary", (click)="testDefinitionModeler()", [disabled]="(!selectedSingleRow)") Modeler
\r
130 //-div(style="width: 100%", [hidden]="!loading") **Took this out because it would load quicker
\r
131 mat-spinner(style="margin: auto", color="primary")
\r
133 //- div(style="width: 100%;height: 40px;")
\r
137 ag-grid-angular.ag-theme-material(
\r
138 style="width:100%; height: 600px",
\r
139 [rowData]="rowData",
\r
140 [columnDefs]="columns",
\r
141 rowSelection="multiple",
\r
142 [rowMultiSelectWithClick]="true",
\r
143 (rowSelected)="onRowSelected($event)",
\r
144 (gridReady)="onGridReady($event)",
\r
145 [enableCellChangeFlash]="true",
\r
146 (cellDoubleClicked)="navToDefinition($event)",
\r
147 [singleClickEdit]="true"
\r
156 input.form-control.bg-light.mb-1([(ngModel)]="search.test_head_id", type="text", placeholder="Search...")
\r
158 button.bg-primary.mbtn.pull-right.text-white.mb-1(mat-raised-button, (click)='createTestHead()') Create VTH
\r
159 table.table.table-striped([mfData]='data', #mf='mfDataTable', [mfRowsOnPage]='5')
\r
162 th(style='width: 20%')
\r
163 mfDefaultSorter(by='name') Name
\r
164 th(style='width: 50%')
\r
165 mfDefaultSorter(by='creator') Creator
\r
166 th(style='width: 10%')
\r
167 mfDefaultSorter(by='date') Date
\r
168 th(style='width: 20%') Options
\r
172 td Tiffany, Patrick
\r
175 button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='View', (click)='viewTestHead(null)')
\r
177 button.bg-primary.mbtn.text-white.mr-1(mat-mini-fab, aria-label='Edit', (click)='editTestHead()')
\r
179 button.mbtn.text-white(mat-mini-fab, aria-label='Remove', color='warn', (click)='deleteTestHead()')
\r