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 form(#testHeadForm="ngForm", style="width:100%")
\r
20 mat-form-field(*ngIf="vth._id")
\r
21 input(matInput, type="text", name="_id", placeholder="Test Head ID", [ngModel]='vth._id', disabled)
\r
24 input(matInput, type="text", name="test_head_name", placeholder="Name", [(ngModel)]="vth.testHeadName", required)
\r
27 input(matInput, type="text", name="test_head_hostname", placeholder="Hostname", [(ngModel)]="vth.hostname")
\r
30 input(matInput, type="text", name="test_head_urlPath", placeholder="Resource Path", [(ngModel)]="vth.resourcePath")
\r
34 input(matInput, name="description", placeholder="Description", [(ngModel)]="vth.testHeadDescription", required)
\r
37 input(matInput, type="text", name="test_head_port", placeholder="Port", [(ngModel)]="vth.port")
\r
41 mat-checkbox(name="test_head_authorization_enabled", (change)="markAsDirty()", [(ngModel)]="vth.authorizationEnabled") Authorization
\r
45 input(matInput, type="text", name="test_head_authorization_type", placeholder="Type (ex: ApiKey)", [(ngModel)]="vth.authorizationType")
\r
49 input(matInput, type="text", autocomplete="off", name="test_head_authorization_credential", placeholder="Password", [(ngModel)]="vth.authorizationCredential")
\r
54 //- mat-select((selectionChange)="markAsDirty()", name="ns", placeholder="User Group", [(value)]="vth.groupId", required)
\r
55 //- mat-option(*ngFor="let group of groups", value="{{group._id}}") {{ group.groupName }}
\r
58 h5.text-muted vthInputTemplate.yaml
\r
59 input( type="file", id="file", (change)="saveFileContents()")
\r
60 div(style="border: 1px solid lightgrey; font-size: 16px !important")
\r
61 codemirror([config]="codeConfig", [(ngModel)]='vth.vthInputTemplate', name="vthInputTemplate")
\r
65 //- h5.text-muted vthOutputTemplate.yaml
\r
66 //- div(style="border: 1px solid lightgrey; font-size: 16px !important")
\r
67 //- codemirror([config]="codeConfig", [(ngModel)]='vth.vthOutputTemplate', name="vthOutputTemplate")
\r
70 .row(style="height:30px")
\r
74 .mr-3(mat-button, *ngIf="testHeadForm.form.valid && !testHeadForm.form.dirty && options.goal == 'edit'") saved
\r
75 mat-icon(style="color:green") check
\r
77 button.mr-3(mat-raised-button, color="primary", (click)='create()', *ngIf="options.goal == 'create'", [disabled]="!testHeadForm.form.valid") Create
\r
78 button.mr-3(mat-raised-button, color="accent", (click)='update()', *ngIf="options.goal == 'edit'", [disabled]="!testHeadForm.form.valid || !testHeadForm.form.dirty") Update
\r