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
diff --git a/otf-frontend/client/src/app/shared/modules/create-test-head-form/create-test-head-form.component.pug b/otf-frontend/client/src/app/shared/modules/create-test-head-form/create-test-head-form.component.pug
new file mode 100644 (file)
index 0000000..8807f2d
--- /dev/null
@@ -0,0 +1,78 @@
+//-  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+//-                                                                             #\r
+//-  Licensed under the Apache License, Version 2.0 (the "License");            #\r
+//-  you may not use this file except in compliance with the License.           #\r
+//-  You may obtain a copy of the License at                                    #\r
+//-                                                                             #\r
+//-      http://www.apache.org/licenses/LICENSE-2.0                             #\r
+//-                                                                             #\r
+//-  Unless required by applicable law or agreed to in writing, software        #\r
+//-  distributed under the License is distributed on an "AS IS" BASIS,          #\r
+//-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+//-  See the License for the specific language governing permissions and        #\r
+//-  limitations under the License.                                             #\r
+//- #############################################################################\r
+\r
+\r
+form(#testHeadForm="ngForm", style="width:100%")\r
+  .row\r
+    .col-sm-6\r
+      mat-form-field(*ngIf="vth._id")\r
+        input(matInput, type="text", name="_id", placeholder="Test Head ID", [ngModel]='vth._id', disabled)\r
+\r
+      mat-form-field\r
+        input(matInput, type="text", name="test_head_name", placeholder="Name", [(ngModel)]="vth.testHeadName", required)\r
+\r
+      mat-form-field\r
+        input(matInput, type="text", name="test_head_hostname", placeholder="Hostname", [(ngModel)]="vth.hostname")\r
+\r
+      mat-form-field\r
+        input(matInput, type="text", name="test_head_urlPath", placeholder="Resource Path", [(ngModel)]="vth.resourcePath")\r
+\r
+    .col-sm-6\r
+      mat-form-field\r
+        input(matInput, name="description", placeholder="Description", [(ngModel)]="vth.testHeadDescription", required)\r
+\r
+      mat-form-field\r
+        input(matInput, type="text", name="test_head_port", placeholder="Port", [(ngModel)]="vth.port")\r
+\r
+      .row\r
+          .col-sm-4\r
+             mat-checkbox(name="test_head_authorization_enabled", (change)="markAsDirty()", [(ngModel)]="vth.authorizationEnabled") Authorization\r
+\r
+          .col-sm-3\r
+              mat-form-field\r
+                  input(matInput, type="text", name="test_head_authorization_type", placeholder="Type (ex: ApiKey)", [(ngModel)]="vth.authorizationType")\r
+\r
+          .col-sm-5\r
+              mat-form-field\r
+                  input(matInput, type="text", autocomplete="off", name="test_head_authorization_credential", placeholder="Password", [(ngModel)]="vth.authorizationCredential")\r
+\r
+\r
+\r
+          //- mat-form-field\r
+      //-   mat-select((selectionChange)="markAsDirty()", name="ns", placeholder="User Group", [(value)]="vth.groupId", required)\r
+      //-     mat-option(*ngFor="let group of groups", value="{{group._id}}") {{ group.groupName }}\r
+\r
+    .col-12\r
+      h5.text-muted vthInputTemplate.yaml\r
+      input( type="file", id="file", (change)="saveFileContents()")\r
+      div(style="border: 1px solid lightgrey; font-size: 16px !important")\r
+        codemirror([config]="codeConfig", [(ngModel)]='vth.vthInputTemplate', name="vthInputTemplate")\r
+\r
+  //- .row.mt-3\r
+  //-   .col\r
+  //-     h5.text-muted vthOutputTemplate.yaml\r
+  //-     div(style="border: 1px solid lightgrey; font-size: 16px !important")\r
+  //-       codemirror([config]="codeConfig", [(ngModel)]='vth.vthOutputTemplate', name="vthOutputTemplate")\r
+\r
+\r
+  .row(style="height:30px")\r
+  .row.form-buttons\r
+    .col-12\r
+      .pull-left\r
+        .mr-3(mat-button, *ngIf="testHeadForm.form.valid && !testHeadForm.form.dirty && options.goal == 'edit'") saved\r
+          mat-icon(style="color:green") check\r
+      .pull-right\r
+        button.mr-3(mat-raised-button, color="primary", (click)='create()', *ngIf="options.goal == 'create'", [disabled]="!testHeadForm.form.valid") Create\r
+        button.mr-3(mat-raised-button, color="accent", (click)='update()', *ngIf="options.goal == 'edit'", [disabled]="!testHeadForm.form.valid || !testHeadForm.form.dirty") Update\r