[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / Windows / Dictionary / ActionPolicyDictionary.html
1 <!--/*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */-->
20 <script type="text/ng-template" id="add_actionPolicyDict_popup.html">
21   <div class="modal" tabindex="-1">
22                  <div class="modal-dialog modal-lg">
23                         <div class="modal-content">
24         <div class="modal-header">
25             <h2 class="font-showcase-font-name" style="color : #157bb2">{{label}}</h2>
26         </div>
27                 <form name="formdata" ng-submit="saveActionDict(editActionDict);" novalidate>
28         <div class="modal-body">
29                         <div class="form-group row">
30             <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.attributeName.$invalid && !formdata.attributeName.$pristine }">
31                 <label>Attribute Name:<sup><b>*</b></sup></label><br>
32                 <input type="text" class="form-control" ng-model="editActionDict.attributeName" name= "attributeName"  required/>
33                                 <p ng-show="formdata.attributeName.$invalid && !formdata.attributeName.$pristine" class="help-block">Attribute Name is required.</p>
34             </div>
35             <div class="form-group col-sm-2" ng-class="{ 'has-error' : formdata.type.$invalid && !formdata.type.$pristine }">
36                 <label>Type:<sup><b>*</b></sup></label><BR>
37                 <select class="form-control" ng-model="editActionDict.type" name= "type"  required>
38                     <option>REST</option>
39                 </select>
40                                 <p ng-show="formdata.type.$invalid && !formdata.type.$pristine" class="help-block">Type is required.</p>
41             </div>
42                         </div>
43                         <div class="form-group row">
44             <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.url.$invalid && !formdata.url.$pristine }">
45                 <label>URL:<sup><b>*</b></sup></label><br>
46                 <input class="form-control" type="text" ng-model="editActionDict.url"  name= "url"  required/>
47                                 <p ng-show="formdata.url.$invalid && !formdata.url.$pristine" class="help-block">URL is required.</p>
48             </div>
49                         <div class="form-group col-sm-2" ng-class="{ 'has-error' : formdata.method.$invalid && !formdata.method.$pristine }">
50                 <label>Method:<sup><b>*</b></sup></label><BR>
51                 <select class="form-control" ng-model="editActionDict.method" name= "method"  required>
52                     <option>GET</option>
53                                         <option>PUT</option>
54                                         <option>POST</option>
55                 </select>
56                                 <p ng-show="formdata.method.$invalid && !formdata.method.$pristine" class="help-block">Method is required.</p>
57             </div>
58                         </div>
59                         <div class="form-group row">
60                         <div class="form-group col-sm-6" >
61                 <label>Description:</label><br>
62                 <input type="text" class="form-control" ng-model="editActionDict.description" />
63             </div>
64                         </div>
65                         <div class="form-group row">
66                         <div class="form-group col-sm-1">
67                                         <label>Headers:</label><br>
68                         <button type="button" class="btn btn-secondary btn-small" ng-click="addNewChoice()"><i class="fa fa-plus"></i></button>
69                         </div>
70                         </div>
71                         <div class="form-group row">
72                         <div class="form-group">
73                         <div  data-ng-repeat="choice in choices">
74                                 <div class="form-group row">            
75                                 <div  class="form-group col-sm-4" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
76                                 <input type="text" class="form-control"  ng-model= "choice.option" placeholder="key" name= "onapName"  required/>
77                                                 <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Header Key is required.</p>
78                                 </div>
79                                 <div  class="form-group col-sm-4" ng-class="{ 'has-error' : formdata.number.$invalid && !formdata.number.$pristine }">
80                                 <input type="text" class="form-control"  ng-model= "choice.number" placeholder="Value" name= "onapName"  required/>
81                                                 <p ng-show="formdata.number.$invalid && !formdata.number.$pristine" class="help-block">Header Value is required.</p>
82                                 </div>
83                                 <div  class="form-group col-sm-1">
84                                 <button type="button" class="btn btn-secondary btn-small" ng-show="$last" ng-click="removeChoice()"><i class="fa fa-minus"></i></button>
85                                 </div>
86                                 </div>
87                         </div>  
88                         </div> 
89                         </div>
90                         <div class="form-group row">
91                         <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.body.$invalid && !formdata.body.$pristine }">
92                 <label>Body:<sup><b>*</b></sup></label><br>
93                 <textarea type="text" class="form-control" ng-model="editActionDict.body" style="height :200px; width:500px;" name= "body"  required></textarea>
94                                 <p ng-show="formdata.body.$invalid && !formdata.body.$pristine" class="help-block">Action Body is required.</p>
95             </div>
96                         </div>
97         </div>
98         <div class="modal-footer">
99             <button class="btn btn-success" type="submit" ng-disabled="formdata.$invalid">Save</button>
100             <button class="btn btn-default" ng-click="$dismiss('cancel')">Close</button>
101         </div>
102                 </form>
103                         </div>
104 </div>
105     </div>
106 </script>