added svcapi ui and camunda code
[it/otf.git] / otf-frontend / client / src / app / shared / modules / create-test-head-form / create-test-head-form.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 form(#testHeadForm="ngForm", style="width:100%")\r
18   .row\r
19     .col-sm-6\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
22 \r
23       mat-form-field\r
24         input(matInput, type="text", name="test_head_name", placeholder="Name", [(ngModel)]="vth.testHeadName", required)\r
25 \r
26       mat-form-field\r
27         input(matInput, type="text", name="test_head_hostname", placeholder="Hostname", [(ngModel)]="vth.hostname")\r
28 \r
29       mat-form-field\r
30         input(matInput, type="text", name="test_head_urlPath", placeholder="Resource Path", [(ngModel)]="vth.resourcePath")\r
31 \r
32     .col-sm-6\r
33       mat-form-field\r
34         input(matInput, name="description", placeholder="Description", [(ngModel)]="vth.testHeadDescription", required)\r
35 \r
36       mat-form-field\r
37         input(matInput, type="text", name="test_head_port", placeholder="Port", [(ngModel)]="vth.port")\r
38 \r
39       .row\r
40           .col-sm-4\r
41              mat-checkbox(name="test_head_authorization_enabled", (change)="markAsDirty()", [(ngModel)]="vth.authorizationEnabled") Authorization\r
42 \r
43           .col-sm-3\r
44               mat-form-field\r
45                   input(matInput, type="text", name="test_head_authorization_type", placeholder="Type (ex: ApiKey)", [(ngModel)]="vth.authorizationType")\r
46 \r
47           .col-sm-5\r
48               mat-form-field\r
49                   input(matInput, type="text", autocomplete="off", name="test_head_authorization_credential", placeholder="Password", [(ngModel)]="vth.authorizationCredential")\r
50 \r
51 \r
52 \r
53           //- mat-form-field\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
56 \r
57     .col-12\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
62 \r
63   //- .row.mt-3\r
64   //-   .col\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
68 \r
69 \r
70   .row(style="height:30px")\r
71   .row.form-buttons\r
72     .col-12\r
73       .pull-left\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
76       .pull-right\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