2 # ============LICENSE_START=======================================================
3 # Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ============LICENSE_END=========================================================
19 <p-dialog *ngIf="visible" header="Component Spec ADD" [(visible)]="visible" appendTo="body" [modal]="true" [transitionOptions]="'300ms'"
20 [closeOnEscape]="false" [closable]="false" [style]="{width: '650px'}" (onHide)="closeDialog()">
22 <!-- * * * * * Input fields * * * * * -->
23 <form [formGroup]="csAddForm" (ngSubmit)="saveCs()" class="bg-faded">
24 <!-- * * * Type * * * -->
26 <label class="inputLabel">Type<span style="color:red">*</span></label>
27 <p-dropdown [options]="types" placeholder="Select Type" optionLabel="type" formControlName="type"></p-dropdown>
29 <!-- * * * Labels * * * -->
31 <label class="inputLabel">Labels</label>
32 <input class="inputFieldLg" type="text" pInputText formControlName="labels" />
34 <span style="padding: 9px 0px 0px 158px; font-size: 13px;">(Separate labels with a space)</span>
35 <!-- * * * Notes * * * -->
37 <label class="inputLabel" style="vertical-align: top">Notes</label>
38 <textarea class="inputFieldLg" [rows]="1" [cols]="30" pInputTextarea autoResize="autoResize" formControlName="notes"></textarea>
40 <!-- * * * Comp Spec File Select * * * -->
42 <label class="inputLabel">Component Spec<span style="color:red">*</span></label>
44 <input type="file" style="width: 460px; color:blue; font-style: italic;" (input)="onCompSpecUpload($event)" name="myfile" id="myfile" accept=".json">
47 <!-- * * * Policy File Select * * * -->
49 <label class="inputLabel">Policy</label>
51 <input type="file" style="width: 460px; color:blue; font-style: italic;" (input)="onPolicyUpload($event)"
52 name="myPolicyFile" id="myPolicyFile" accept=".json">
55 <!-- * * * ADD and Cancel buttons * * * -->
56 <div style="float: right; padding: 20px 45px">
57 <button pButton type="button" (click)="closeDialog()" label="Cancel"></button>
58 <button pButton type="submit" class="ui-button-success" label="Add" [disabled]="!csAddForm.valid || !compSpecSelected" style="width: 70px"></button>
62 <p-toast key="jsonError" [style]="{width: '430px'}"></p-toast>