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(#container, style="width:100%;height:100%")
\r
18 form(#testDefinitionForm="ngForm")
\r
22 input#file(type="file", #file, hidden, (change)="open()")
\r
23 input#fileForVersion(type="file", #fileForVersion, hidden, (change)="newVersion({fromFile: true})")
\r
26 //- BPMN Diagram items
\r
28 .col(style="flex: 0 0 180px;-ms-flex: 0 0 180px;")
\r
30 .small.text-muted BPMN Diagram
\r
31 .row.p-0.pl-2(style="margin-top: -10px")
\r
32 button(mat-icon-button, [matMenuTriggerFor]="newMenu")
\r
33 mat-icon insert_drive_file
\r
34 span(style="margin-left: -7px") arrow_drop_down
\r
35 mat-menu(#newMenu="matMenu")
\r
36 button.text-small(mat-menu-item, (click)="newWorkflow()") New Workflow
\r
37 button(mat-icon-button, matTooltip="Open BPMN", (click)="file.click()")
\r
38 mat-icon folder_open
\r
39 button(mat-icon-button, matTooltip="Download BPMN", (click)="download()")
\r
40 mat-icon cloud_download
\r
41 button(mat-icon-button, matTooltip="View XML", disabled)
\r
45 mat-divider([vertical]="true")
\r
47 //- Test Definition items
\r
51 .small.text-muted Test Definition
\r
52 .row.p-0.pl-2(style="margin-top: -10px")
\r
54 button(mat-icon-button, matTooltip="Save Test Definition", [disabled]="inProgress || !testDefinitionForm.form.valid || (hasBeenSaved && !testDefinitionForm.dirty)", (click)="save()")
\r
57 button(mat-icon-button, matTooltip="Deploy Test Definition", [disabled]="!testDefinitionForm.form.valid || ptd?.currentInstance?.isDeployed || !hasBeenSaved || !testDefinitionForm.pristine || inProgress", (click)="deploy()")
\r
58 mat-icon cloud_upload
\r
60 button(mat-icon-button, matTooltip="Delete Version", [disabled]="!hasBeenSaved || inProgress", (click)="deleteVersion()")
\r
61 mat-icon delete_forever
\r
64 mat-form-field(*ngIf="ptd", style="width: 80px")
\r
65 mat-select(disableOptionCentering, (selectionChange)="setVersion(ptd.currentVersionName)", placeholder="Version", name="selectedVersion", [(ngModel)]="ptd.currentVersionName")
\r
66 mat-option(*ngFor="let instance of ptd.bpmnInstances.slice().reverse()", value="{{instance.version}}") {{ instance.version }}
\r
67 button(mat-icon-button, [matMenuTriggerFor]="versionMenu", matTooltip="New Version")
\r
69 mat-menu(#versionMenu="matMenu")
\r
70 button(mat-menu-item, [matMenuTriggerFor]="fromVersion") Create from version
\r
71 button(mat-menu-item, (click)="newVersion()") Create blank version
\r
72 button(mat-menu-item, (click)="fileForVersion.click()") Create from file
\r
73 mat-menu(#fromVersion="matMenu")
\r
74 button(mat-menu-item, *ngFor="let instance of ptd?.bpmnInstances.slice().reverse(); let i = index", (click)="newVersion({versionIndex: ptd.bpmnInstances.length - i - 1})") {{ instance.version }}
\r
77 div#left_panel(#modeler)
\r
79 .properties-panel-button((click)="toggleProperties()") Properties Panel
\r
80 .properties-panel-button((click)="toggleTestDefinition()") Test Definition
\r
81 div.properties-panel(#sidebar, [hidden]="!showSidebar")
\r
82 div#properties(#properties, [hidden]="!showProperties", style="width:100%")
\r
83 div(#testDefinition, *ngIf="ptd", [hidden]="!showTestDefinition", style="width:100%;")
\r
88 //- Test Definition Form
\r
92 mat-form-field(style="width:100%")
\r
93 input(matInput, type="text", placeholder="Name", name="name", [disabled]="(existingTd && !hasBeenSaved)", [(ngModel)]="ptd.testName", required)
\r
95 mat-form-field(style="width:100%")
\r
96 input(matInput, type="text", placeholder="Description", name="description", [disabled]="(existingTd && !hasBeenSaved)", [(ngModel)]="ptd.testDescription", required)
\r
98 mat-form-field(style="width:100%")
\r
99 mat-select((selectionChange)="markFormAs('dirty')", name="ns", [disabled]="(existingTd && !hasBeenSaved)", placeholder="Group", [(value)]="ptd.groupId", required)
\r
100 mat-option(*ngFor="let group of groups", value="{{group._id}}") {{ group.groupName }}
\r
102 //- mat-form-field(style="width:100%")
\r
103 //- input(matInput, type="text", *ngIf="!hasBeenSaved", placeholder="Version", name="version", [(ngModel)]="ptd.currentInstance.version", (keyup)="checkVersionUnique()", required)
\r
104 //- mat-select((selectionChange)="switchVersion(ptd.currentVersionName)", placeholder="Version", name="selectedVersion", *ngIf="hasBeenSaved", [(value)]="ptd.currentVersionName", required)
\r
105 //- mat-option(*ngFor="let instance of ptd.bpmnInstances", value="{{instance.version}}") {{ instance.version }}
\r
106 //- mat-error Required
\r
107 //- button(mat-button, matSuffix, color="primary", *ngIf="hasBeenSaved", (click)="newVersion(this.ptd.processDefinitionKey)", onclick="file.click();") New
\r
112 //- .text-muted A single .zip file with scripts
\r
113 //- input(type="file", #scripts, id="scripts", name="scripts", hidden, (change)="markFormAs('dirty')", ng2FileSelect, [uploader]="uploader", accept="application/zip")
\r
114 //- .row.mt-1(*ngIf="ptd.currentInstance.resourceFileId")
\r
118 //- mat-icon(mat-list-icon) insert_drive_file
\r
119 //- h4(mat-line) {{ptd.currentInstance.resourceFileName }}
\r
120 //- .row(*ngIf="!ptd.currentInstance.isDeployed")
\r
122 //- button(mat-raised-button, onclick="scripts.click()", color="primary")
\r
123 //- | {{ !ptd.currentInstance.resourceFileId ? 'Choose File' : 'Replace File' }}
\r
126 //- div(*ngIf="uploader?.queue.length > 0")
\r
128 //- ul.list-group(style="position:relative")
\r
129 //- li.list-group-item(*ngFor="let item of uploader.queue")
\r
130 //- | {{ item?.file?.name }}
\r
131 //- div.upload-progress([ngStyle]="{'width': item.progress + '%'}")
\r
132 //- //- button.pull-right(mat-button, (click)="upload()") Upload All
\r
133 //- label(*ngIf="ptd.currentInstance.resourceFileId && uploader.queue.length > 0 && !saved") This will replace the previous resouce file
\r
134 //- button.pull-right(mat-button, color="primary", (click)="clearQueue()") Remove All
\r
135 //- .row(*ngIf="ptd.currentInstance.isDeployed")
\r
136 //- .col-12(*ngIf="!ptd.currentInstance.resourceFileId")
\r
137 //- | No resources were deployed with this version
\r
140 .col-12(*ngIf="ptd.currentInstance.testDataTemplate != {}")
\r
141 h4 testInputTemplate.yaml
\r
142 div(style="border: 1px solid lightgrey; font-size: 12px !important")
\r
143 codemirror(*ngIf="isRefreshed", [config]="codeConfig", [(ngModel)]="ptd.currentInstance.testDataTemplate", name="testConfig")
\r
148 div(style="position:absolute; bottom: 5px; left: 5px")
\r
149 div(*ngIf="inProgress")
\r
150 mat-spinner([diameter]="15", style="display:inline")
\r
151 div.ml-4(style="display:inline") In Progress
\r
152 div(*ngIf="ptd?.currentInstance?.isDeployed") Deployed
\r
153 div(*ngIf="hasBeenSaved && !testDefinitionForm.dirty") saved
\r
154 mat-icon(style="color:green") check
\r
156 //- div Form valid: {{ form.valid }}
\r
157 //- div Form dirty: {{ form.dirty }}
\r
158 //- div hasBeenSaved: {{ hasBeenSaved }}
\r
159 //- div(*ngIf="ptd?.currentInstance?.bpmnHasChanged") ptd.currentInstance.bpmnHasChanged
\r
161 //- button((click)="popup()") popup
\r
162 //- button((click)="nav()") nav
\r