[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / Windows / Dictionary / FWTermListDictionary.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_fwTermList_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="saveTermName(editTermList);" 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.termName.$invalid && !formdata.termName.$pristine }">
31                 <label>Rule Name:<sup><b>*</b></sup></label><br>
32                 <input type="text" ng-model="editTermList.termName" class="form-control" name= "termName"  required/>
33                                 <p ng-show="formdata.termName.$invalid && !formdata.termName.$pristine" class="help-block">Rule Name is required.</p>
34             </div>
35             <div class="form-group col-sm-6" >
36                 <label>Rule Description:<sup><b>*</b></sup></label><br>
37                 <input type="text" ng-model="editTermList.termDescription" class="form-control"/>
38             </div>
39                         </div>
40                         <div class="form-group row">
41             <div class="form-group col-sm-6">
42                 <label>From-Zone:</label><br>
43                 <button type="button" class="btn btn-secondary btn-small"  ng-click="addFromZoneNewChoice()"><i class="fa fa-plus"></i></button>
44             </div>
45                         </div>
46                         <div class="form-group row">
47                         <div class="form-group">
48                         <div  data-ng-repeat="choice in fromZonechoices">
49                                         <div class="form-group row">            
50                                 <div  class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
51                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in zoneDictionaryDatas track by option" name= "option"  required>
52                                                 <option value = "">{{choice.option}}</option></select>
53                                                 <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">From-Zone is required.</p>
54                                 </div>
55                                 <div  class="form-group col-sm-1">
56                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeFromZoneChoice()"><i class="fa fa-minus"></i></button>
57                                 </div>
58                                         </div>
59                         </div>
60                         </div>
61                         </div> 
62                         <div class="form-group row">
63             <div class="form-group col-sm-6">
64                  <label>To-Zone:</label><br>
65                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addToZoneNewChoice()"><i class="fa fa-plus"></i></button>
66             </div>
67                         </div>
68                         <div class="form-group row">
69                         <div class="form-group">
70                         <div  data-ng-repeat="choice in toZonechoices"> 
71                                         <div class="form-group row">            
72                                 <div  class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
73                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in zoneDictionaryDatas track by option"><option value = "" name= "option"  required>{{choice.option}}</option></select>
74                                                 <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">To-Zone is required.</p>
75                                 </div>
76                                 <div  class="form-group col-sm-1">
77                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeToZoneChoice()"><i class="fa fa-minus"></i></button>
78                                 </div>
79                                         </div>
80                         </div>
81                         </div>
82                         </div> 
83                         <div class="form-group row">
84             <div class="form-group col-sm-6">
85                   <label>Source-List:</label><br>
86                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addSourceListNewChoice()"><i class="fa fa-plus"></i></button>
87             </div>
88                         </div>
89                         <div class="form-group row">
90                         <div class="form-group">
91                         <div  data-ng-repeat="choice in sourceListchoices">     
92                                         <div class="form-group row">    
93                                 <div  class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
94                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in groupAddresses track by option"><option value = "" name= "option"  required>{{choice.option}}</option></select>
95                                                 <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Source-List is required.</p>
96                                 </div>
97                                 <div  class="form-group col-sm-1">
98                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeSourceListChoice()"><i class="fa fa-minus"></i></button>
99                                 </div>
100                                         </div>
101                         </div>
102                 </div>
103                 </div> 
104                 <div class="form-group row">
105             <div class="form-group col-sm-6">
106                   <label>Destination-List:</label><br>
107                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addDListNewChoice()"><i class="fa fa-plus"></i></button>
108             </div>
109                 </div>
110                 <div class="form-group row">
111                         <div class="form-group">
112                         <div  data-ng-repeat="choice in destinationListchoices">
113                                         <div class="form-group row">            
114                                 <div class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
115                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in groupAddresses track by option"><option value = "" name= "option"  required>{{choice.option}}</option></select>
116                                                 <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Destination-List is required.</p>
117                                 </div>
118                                 <div  class="form-group col-sm-1">
119                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeDlistChoice()"><i class="fa fa-minus"></i></button>
120                                 </div>
121                                         </div>
122                         </div>
123                         </div>
124                 </div> 
125                 <div class="form-group row">
126             <div class="form-group col-sm-6">
127                  <label>Source-Services:</label><br>
128                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addSourceServiceNewChoice()"><i class="fa fa-plus"></i></button>
129             </div>
130                 </div>
131                 <div class="form-group row">
132                         <div class="form-group">
133                         <div  data-ng-repeat="choice in sourceServicechoices">  
134                                         <div class="form-group row">            
135                                 <div class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
136                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in groupServices track by option" ng-options="option for option in groupServices track by option"><option value = "" name= "option"  required>{{choice.option}}</option></select>
137                                         <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Source-Services is required.</p>
138                                         </div>
139                                 <div  class="form-group col-sm-1">
140                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeSourceServiceChoice()"><i class="fa fa-minus"></i></button>
141                                 </div>
142                                         </div>
143                         </div>
144                 </div> 
145                 </div>
146                 <div class="form-group row">
147             <div class="form-group col-sm-6">
148                  <label>Destination-Services:</label><br>
149                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addDServicesNewChoice()"><i class="fa fa-plus"></i></button>
150             </div>
151                 </div>
152                 <div class="form-group row">
153                         <div class="form-group">
154                         <div  data-ng-repeat="choice in destinationServicechoices">     
155                                         <div class="form-group row">    
156                                 <div  class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
157                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in groupServices track by option" ng-options="option for option in groupServices track by option" name= "option"  required><option value = "">{{choice.option}}</option></select>
158                                         <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Destination-Services is required.</p>
159                                         </div>
160                                 <div class="form-group col-sm-1">
161                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeDServicesChoice()"><i class="fa fa-minus"></i></button>
162                                 </div>
163                                         </div>
164                         </div>
165                         </div>
166                 </div> 
167                 </br>
168                 <div class="form-group row">
169             <div class="form-group col-sm-6">
170                  <label>Action-List:</label><br>
171                  <button type="button" class="btn btn-secondary btn-small"  ng-click="addActionListNewChoice()"><i class="fa fa-plus"></i></button>
172             </div>
173                 </div>
174                 <div class="form-group row">
175                         <div class="form-group">
176                         <div  data-ng-repeat="choice in actionListchoices">     
177                                         <div class="form-group row">    
178                                 <div  class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.option.$invalid && !formdata.option.$pristine }">
179                                 <select  class="form-control"  ng-model="choice.option" ng-options="option for option in actionListDictionaryDatas track by option" name= "option"  required><option value = "">{{choice.option}}</option></select>
180                                         <p ng-show="formdata.option.$invalid && !formdata.option.$pristine" class="help-block">Action-List is required.</p>
181                                         </div>
182                                 <div  class="form-group col-sm-1">
183                                 <button type="button" class="btn btn-secondary btn-small"  ng-show="$last" ng-click="removeActionListChoice()"><i class="fa fa-minus"></i></button>
184                                 </div>
185                                         </div>
186                         </div>
187                         </div>
188                 </div> 
189         </div>
190         <div class="modal-footer">
191             <button class="btn btn-success" type="submit" ng-disabled="formdata.$invalid">Save</button>
192             <button class="btn btn-default"  type="button" ng-click="close()">Close</button>
193                 </div>
194                 </form>
195     </div>
196                         </div>
197 </div>
198 </script>