Initial OpenECOMP policy/engine commit
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / ClosedLoopFaultPolicyTemplate.html
1 <!--
2   ============LICENSE_START=======================================================
3   ECOMP 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
21 <div ng-app= "abs" ng-controller= "clFaultController">
22 <div class="modal__content">
23       <div class ="form-group">
24             <label>Policy Name:<sup><b>*</b></sup> </label><br>
25             <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName"  style="width:800px;"/>
26       </div>
27       <div class ="form-group">
28              <label>Description:</label><br>
29              <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.policyDescription" style="width:800px;"/>
30       </div>
31       <div class ="form-group">
32             <label>Ecomp Name:<sup><b>*</b></sup></label><br>
33             <select class="form-control" style="width:800px;" ng-disabled ="temp.policy.readOnly"  ng-model="temp.policy.ecompName" ng-options="option for option in ecompNameDictionaryDatas track by option"></select>
34       </div>
35       </br>
36       <div class="fn-ebz-container" >
37                 <label>Risk Type:<sup><b>*</b></sup></label>
38                         <div>
39                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.riskType"  ng-options="option for option in riskTypeDictionaryDatas track by option"></select>
40                         </div>
41                         <p><span ng-show="validateRiskType" style="color:red">Risk Type Field shouldn't be Empty</span></p>
42         </div> 
43          <div class="fn-ebz-container" >
44                 <label>Risk Level:<sup><b>*</b></sup></label>
45                         <div>
46                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.riskLevel"  ng-options="option for option in riskLevelDatas track by option"></select>
47                         </div>
48                         <p><span ng-show="validateRiskLevel" style="color:red">Risk Level Field shouldn't be Empty</span></p>
49         </div> 
50          <div class="fn-ebz-container" >
51                 <label>Guard:<sup><b>*</b></sup></label>
52                         <div>
53                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.guard"  ng-options="option for option in guardDatas track by option"></select>
54                         </div>
55                         <p><span ng-show="validateGuard" style="color:red">Guard Field shouldn't be Empty</span></p>
56                 </div> 
57         <div class ="fn-ebz-container">
58         <label>Time to Live Date:<sup><b>*</b></sup></label>
59         <div>
60                         <input type="date" name="ttlDate" class="date" ng-model="temp.policy.ttlDate"/>
61                 </div>
62         </div>
63       <div>
64             <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label><br>
65             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.trinity" > Hosted Voice (Trinity)</input>
66             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.vUSP" > vUSP</input>
67             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.mcr" > MCR</input>
68             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.gamma" > Gamma</input>
69             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.vDNS" > vDNS</input>
70        </div>
71         <br/>
72         <div class="fn-ebz-container" >
73             <label>Vnf Type:<sup><b>*</b></sup></label><br>
74             <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.vnfType" ng-options="option for option in vnfTypeDictionaryDatas  track by option">
75             <option value="">{{temp.policy.jsonBodyData.vnfType}}</option></select>
76       </div>
77         <div class="fn-ebz-container" >
78               <label>Policy Status:<sup><b>*</b></sup></label><BR>
79                 <select class="form-field" ng-disabled ="temp.policy.readOnly" ng-init="init(temp.policy.jsonBodyData);" ng-model="temp.policy.jsonBodyData.closedLoopPolicyStatus">
80                     <option value="Active">Active</option>
81                     <option>InActive</option>
82                 </select>
83         </div>
84          <br/>
85          <fieldset style="width:140%;">
86             <div class="fn-ebz-container" >
87             <label>Trigger Signature:</label><br>
88              <form  method="post" class="form-horizontal" >
89                         <div class="form-group">
90                                 <div class="fn-ebz-container">
91                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addTriggerButton()"><i class="fa fa-plus"></i></button>
92                                 </div>
93                                 <div  class="fn-ebz-container">
94                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="removeTriggerButton()"><i class="fa fa-minus"></i></button>
95                                 </div>
96                         </div>  
97                         <div  data-ng-repeat="choice in temp.policy.traptriggerSignatures" class="form-horizontal" >
98                                   <div class="fn-ebz-container ">
99                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
100                       </div>
101                       <div class="fn-ebz-container">
102                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addTrapTriggerButton(choice.id)"><i class="fa fa-plus"></i></button>
103                                 </div>
104                                 <div  class="fn-ebz-container">
105                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="removeTrapTriggerButton(choice.id)"><i class="fa fa-minus"></i></button>
106                                 </div>
107                                 <div  data-ng-repeat="choice in temp.policy.triggerTrapSignatures[choice.id]" class="form-horizontal" >
108                                   <div class="fn-ebz-container ">
109                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
110                         </div>
111                         <div class="fn-ebz-container">
112                                  <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.notBox" name="notBox" ><option>NOT</option></select>
113                         </div>
114                         <div class="fn-ebz-container">
115                            <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.trigger1" ng-options="option for option in varbindDictionaryDatas track by option">
116                            <option value="">{{choice.trigger1}}</option></select>
117                         </div>
118                         <div class="fn-ebz-container ">
119                           <select  class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.operatorBox" name="operatorBox"><option>AND</option><option>OR</option></select>
120                         </div>
121                         <div class="fn-ebz-container">
122                             <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.trigger2" ng-options="option for option in varbindDictionaryDatas track by option">
123                             <option value="">{{choice.trigger2}}</option></select>
124                         </div>
125                         </div>
126                 </div>                                                  
127                 </form> 
128                 </div> 
129                 </br>
130                 <div class="fn-ebz-container" >
131             <label>Connect Traps:</label><br>
132              <form  method="post" class="form-horizontal" >
133                         <div class="form-group">
134                                 <div class="col-xs-1">
135                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addTriggerConnectButton()"><i class="fa fa-plus"></i></button>
136                                 </div>
137                         </div>  
138                         <div  data-ng-repeat="choice in temp.policy.connecttriggerSignatures" class="form-horizontal" >
139                                   <div class="fn-ebz-container ">
140                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
141                         </div>
142                         <div class="fn-ebz-container">
143                                 <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.notBox" name="notBox" ><option>NOT</option></select>
144                         </div>
145                         <div class="fn-ebz-container">
146                            <select  ng-disabled ="temp.policy.readOnly"   ng-model="choice.connectTrap1" ng-options="option for option in connectTriggerTrapsList track by option">
147                            <option value="">{{choice.connectTrap1}}</option></select>
148                         </div>
149                         <div class="fn-ebz-container ">
150                            <input type="text"  ng-disabled ="temp.policy.readOnly"  ng-model="choice.trapCount1"  name="trapCount1"/>
151                         </div>
152                         <div class="fn-ebz-container">
153                             <select  class="form-field" ng-disabled ="temp.policy.readOnly" ng-model="choice.operatorBox" name="operatorBox"><option>AND</option><option>OR</option></select>
154                         </div>
155                         <div class="fn-ebz-container">
156                            <select  ng-disabled ="temp.policy.readOnly"   ng-model="choice.connectTrap2" ng-options="option for option in connectTriggerTrapsList track by option">
157                            <option value="">{{choice.connectTrap2}}</option></select>
158                         </div>
159                         <div class="fn-ebz-container ">
160                            <input type="text"  ng-disabled ="temp.policy.readOnly"  ng-model="choice.trapCount2"  name="trapCount1"/>
161                         </div>
162                                 <div  class="fn-ebz-container">
163                                 <button type="button" class="btn btn-default" ng-show="$last" ng-disabled ="temp.policy.readOnly"  ng-click="removeTriggerConnectButton()"><i class="fa fa-minus"></i></button>
164                                 </div>
165                         </div>
166                 </form> 
167                 </div> 
168                 </br>
169                 <div class="fn-ebz-container" >
170             <label>Clear TimeOut:<sup><b>*</b></sup> </label><br>
171             <input type="text" ng-disabled="triggerdisabled" ng-model="temp.policy.clearTimeOut"  style="width:200px;"/>
172         </div>
173         <div class="fn-ebz-container" >
174             <label>Trap Max Age:<sup><b>*</b></sup></label><br>
175             <input type="text" ng-disabled="triggerdisabled" ng-model="temp.policy.trapMaxAge" ng-init="temp.policy.jsonBodyData.trapMaxAge='300'" value="300" style="width:200px;"/>
176         </div>
177        </fieldset>  
178          <br/>
179           <form>
180       <fieldset style="width:140%;">
181          <div>
182                <label>VSCL Action:<sup><b>*</b></sup></label><br>
183                 <div class="fn-ebz-container" >
184                         <label>vPRO Actions:<sup><b>*</b></sup></label><br>
185                         <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly"  ng-model="temp.policy.jsonBodyData.actions" ng-options="option for option in vsclActionDictionaryDatas  track by option">
186                          <option value="">{{temp.policy.jsonBodyData.actions}}</option></select></select>
187                         </div>
188                          <div class="fn-ebz-container" >
189                         <label>Time Interval:<sup><b>*</b></sup> </label><br>
190                         <input type="text" ng-disabled ="temp.policy.readOnly"  ng-model="temp.policy.jsonBodyData.timeInterval"  style="width:200px;"/>
191                         </div>
192                         <div class="fn-ebz-container" >
193                         <label>App-C TimeOut:<sup><b>*</b></sup></label><br>
194                         <input type="text" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.timeOutvPRO"  style="width:200px;"/>
195                         </div>
196                         </br>
197                         <div class="fn-ebz-container" >
198                         <label>TimeOut for Ruby:<sup><b>*</b></sup></label><br>
199                         <input type="text" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.timeOutRuby"  style="width:200px;"/>
200                         </div>
201                         <div class="fn-ebz-container" >
202                         <label>Number of Retries:<sup><b>*</b></sup></label><br>
203                         <input type="text" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.retrys"  style="width:200px;"/>
204                         </div>
205                         <div class="fn-ebz-container" >
206                         <label>Aging Window:<sup><b>*</b></sup> </label><br>
207                         <input type="text" class="fn-ebz-text" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.agingWindow"  style="width:200px;"/>
208                         </div>
209                         </br>
210                         <div>
211                         <label>Text to Include in UEB messages for AOTS ticket and Geo Link:</label><br>
212                         <input type="text" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.geoLink" style="width:500px;"/>
213                         </div>
214                         <div class="fn-ebz-container" >
215                         <label>Email Address:</label><br>
216                         <input type="text"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.emailAddress" style="width:500px;"/>
217                         </div>
218          </div>
219           </fieldset>     
220                 </form>
221          <br/>
222            <form>
223       <fieldset style="width:140%;">
224          <div>
225                <label>PEP:<sup><b>*</b></sup></label><br>
226              <div class="fn-ebz-container" >
227                 <label>PEP Options:<sup><b>*</b></sup></label><br>
228                 <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.pepName" ng-options="option for option in pepOptionsDictionaryDatas  track by option" ng-change = "getPepActionValues(temp.policy.jsonBodyData.pepName)">
229                 <option value="">{{temp.policy.jsonBodyData.pepName}}</option></select></select></select>
230                 </div>
231                  <div class="fn-ebz-container" >
232                 <label>Actions:<sup><b>*</b></sup></label><br>
233                 <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.pepAction" ng-options="option for option in pepActionDictionaryDatas  track by option">
234                 <option value="">{{temp.policy.jsonBodyData.pepAction}}</option></select></select></select>
235                 </div>
236          </div>
237          </fieldset>     
238     </form>
239          <br/>
240            <form>
241       <fieldset style="width:140%;">
242          <div class="fn-ebz-container" >
243             <label><sup><b></b></sup>Verification Signature:</label><br>
244              <form  method="post" class="form-horizontal" >
245                         <div class="form-group">
246                                 <div class="fn-ebz-container">
247                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addVerFaultButton()"><i class="fa fa-plus"></i></button>
248                                 </div>
249                                 <div  class="fn-ebz-container">
250                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="removeVerFaultButton()"><i class="fa fa-minus"></i></button>
251                                 </div>
252                         </div>  
253                         <div  data-ng-repeat="choice in temp.policy.faulttriggerSignatures" class="form-horizontal" >
254                                   <div class="fn-ebz-container ">
255                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
256                       </div>
257                       <div class="fn-ebz-container">
258                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addVerTriggerButton(choice.id)"><i class="fa fa-plus"></i></button>
259                                 </div>
260                                 <div  class="fn-ebz-container">
261                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="removeVerTriggerButton(choice.id)"><i class="fa fa-minus"></i></button>
262                                 </div>
263                                 <div  data-ng-repeat="choice in temp.policy.triggerfaultSignatures[choice.id]" class="form-horizontal" >
264                                   <div class="fn-ebz-container ">
265                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
266                         </div>
267                         <div class="fn-ebz-container">
268                                  <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.notBox" name="notBox" ><option>NOT</option></select>
269                         </div>
270                         <div class="fn-ebz-container">
271                            <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.trigger1" ng-options="option for option in varbindDictionaryDatas track by option">
272                            <option value="">{{choice.trigger1}}</option></select>
273                         </div>
274                         <div class="fn-ebz-container ">
275                           <select  class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.operatorBox" name="operatorBox"><option>AND</option><option>OR</option></select>
276                         </div>
277                         <div class="fn-ebz-container">
278                             <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.trigger2" ng-options="option for option in varbindDictionaryDatas track by option">
279                             <option value="">{{choice.trigger2}}</option></select>
280                         </div>
281                         </div>
282                 </div>                                          
283                 </form> 
284                 </div> 
285                 </br>
286                 <div class="fn-ebz-container" >
287             <label>Connect All Faults:</label><br>
288              <form  method="post" class="form-horizontal" >
289                         <div class="form-group">
290                                 <div class="col-xs-1">
291                                 <button type="button" class="btn btn-default"  ng-disabled ="temp.policy.readOnly"  ng-click="addFaultConnectButton()"><i class="fa fa-plus"></i></button>
292                                 </div>
293                         </div>  
294                         <div  data-ng-repeat="choice in temp.policy.connectVerificationSignatures" class="form-horizontal" >
295                                   <div class="fn-ebz-container ">
296                             <label ng-model="choice.label" name="label" >{{choice.id}}</label>
297                         </div>
298                         <div class="fn-ebz-container">
299                                 <select class="form-field" ng-disabled ="temp.policy.readOnly"  ng-model="choice.notBox" name="notBox" ><option>NOT</option></select>
300                         </div>
301                         <div class="fn-ebz-container">
302                            <select  ng-disabled ="temp.policy.readOnly"   ng-model="choice.connectTrap1" ng-options="option for option in connectTriggerFaultsList track by option">
303                            <option value="">{{choice.connectTrap1}}</option></select>
304                         </div>
305                         <div class="fn-ebz-container ">
306                            <input type="text"  ng-disabled ="temp.policy.readOnly"  ng-model="choice.trapCount1"  name="trapCount1"/>
307                         </div>
308                         <div class="fn-ebz-container">
309                             <select  class="form-field" ng-disabled ="temp.policy.readOnly" ng-model="choice.operatorBox" name="operatorBox"><option>AND</option><option>OR</option></select>
310                         </div>
311                         <div class="fn-ebz-container">
312                            <select  ng-disabled ="temp.policy.readOnly"   ng-model="choice.connectTrap2" ng-options="option for option in connectTriggerFaultsList track by option">
313                            <option value="">{{choice.connectTrap2}}</option></select>
314                         </div>
315                         <div class="fn-ebz-container ">
316                            <input type="text"  ng-disabled ="temp.policy.readOnly"  ng-model="choice.trapCount2"  name="trapCount1"/>
317                         </div>
318                                 <div  class="fn-ebz-container">
319                                 <button type="button" class="btn btn-default" ng-show="$last" ng-disabled ="temp.policy.readOnly"  ng-click="removeFaultConnectButton()"><i class="fa fa-minus"></i></button>
320                                 </div>
321                         </div>
322                 </form> 
323                 </div> 
324                 </br>
325                 <div class="fn-ebz-container" >
326             <label>Clear TimeOut:<sup><b>*</b></sup></label><br>
327             <input type="text" ng-disabled="verificationdisabled" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.verificationclearTimeOut"  style="width:200px;"/>
328         </div>
329          </fieldset>     
330     </form>
331          <br/>
332             <form>
333       <fieldset style="width:140%;">
334          <div>
335             <label>Additional Conditions: If current VM status in A&AI is in Maintenance then the Control Loop will not execute the Action and shall<sup><b>*</b></sup></label><br>
336             <p>          
337                         <input type = "radio" ng-disabled ="temp.policy.readOnly" ng-model= "temp.policy.jsonBodyData.conditions" name = "radSize" id = "sizeSmall" value = "SEND" checked = "checked" /><label for = "sizeSmall">DCAE should send event notification</label>
338                         <input type = "radio" ng-disabled ="temp.policy.readOnly" ng-model= "temp.policy.jsonBodyData.conditions" name = "radSize" id = "sizeMed"  value = "NOTSEND" /><label for = "sizeMed">DCAE should not send event notification</label>
339                 </p>
340          </div>
341          </fieldset>     
342     </form>
343          <br/>
344          </div>
345         <div class="modal__footer">
346             <button class="button button--primary button--small" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="validatePolicy(temp.policy);">Validate</button>
347             <button class="btn btn-success" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="saveFaultPolicy(temp);">Save</button>
348             <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Close</button>
349         </div>
350 </div>