Initial OpenECOMP policy/engine commit
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / ClosedLoopPMPolicyTemplate.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-controller= "clPMController">
22 <div class="modal__content">
23   <form class="form-horizontal" role="form" name="myform">
24         <div class="form-group">
25                 <label>Policy Name:<sup><b>*</b></sup></label>
26                 <div>
27                         <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" style="width:800px;" required pattern="\S+" title="Enter the Policy Name without any spaces">
28                 </div>
29         </div>
30         <div class ="form-group">
31         <label>Description:</label>
32         <div>
33                 <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.policyDescription" style="width:800px;"/>
34         </div>
35     </div>
36     <div class ="form-group">
37         <label>Ecomp Name:<sup><b>*</b></sup></label>
38                 <div>
39                         <select class="form-field" style="width:500px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.ecompName"  ng-options="option for option in ecompNameDictionaryDatas track by option"></select>
40                 </div>
41                 <!-- <p><span ng-show="validateEcompName" style="color:red">Ecomp Name Field shouldn't be Empty</span></p> -->
42     </div>      
43           <div class="fn-ebz-container" >
44                 <label>Risk Type:<sup><b>*</b></sup></label>
45                         <div>
46                                 <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>
47                         </div>
48                         <p><span ng-show="validateRiskType" style="color:red">Risk Type Field shouldn't be Empty</span></p>
49         </div> 
50          <div class="fn-ebz-container" >
51                 <label>Risk Level:<sup><b>*</b></sup></label>
52                         <div>
53                                 <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>
54                         </div>
55                         <p><span ng-show="validateRiskLevel" style="color:red">Risk Level Field shouldn't be Empty</span></p>
56         </div> 
57          <div class="fn-ebz-container" >
58                 <label>Guard:<sup><b>*</b></sup></label>
59                         <div>
60                                 <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>
61                         </div>
62                         <p><span ng-show="validateGuard" style="color:red">Guard Field shouldn't be Empty</span></p>
63                 </div> 
64         <div class ="fn-ebz-container">
65         <label>Time to Live Date:<sup><b>*</b></sup></label>
66         <div>
67                         <input type="date" name="ttlDate" class="date" ng-model="temp.policy.ttlDate"/>
68                 </div>
69         </div>     
70         <div class ="form-group">
71         <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label>
72                 <div>
73             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.trinity" > Hosted Voice (Trinity)</input>
74             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.vUSP" > vUSP</input>
75             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.mcr" > MCR</input>
76             <input type="checkbox"  ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.gamma" > Gamma</input>
77             <input type="checkbox" ng-disabled ="temp.policy.readOnly"  ng-model="temp.policy.jsonBodyData.vDNS" > vDNS</input>
78          </div>
79        </div>
80      <div class ="form-group">
81         <label>Service Type PolicyName:<sup><b>*</b></sup></label>
82         <div>
83             <select class="form-field" id="MyButtonTest" style="width:400px;" ng-disabled ="temp.policy.readOnly"  ng-model="temp.policy.serviceTypePolicyName"  
84             ng-options="option.serviceTypePolicyName for option in PMData track by option.serviceTypePolicyName"  ng-init="addDataToFields(temp.policy.serviceTypePolicyName);" 
85             ng-click="addDataToFields(temp.policy.serviceTypePolicyName);"></select>
86          </div>
87       </div>
88       <fieldset>
89       <div class ="form-group">
90                 <label>Vertica Metrics:<sup><b>*</b></sup></label>
91                 <div>
92                         <textarea  class="form-control" ng-model="temp.policy.verticaMetrics.verticaMetrics" ng-disabled ="temp.policy.readOnly" style="height :150px; width:500px;" ></textarea>
93                 </div>
94       </div>
95       </fieldset> 
96       <fieldset>
97       <div class ="form-group">
98                 <label>Attributes:<sup><b>*</b></sup></label>
99                 <div>
100                 <div ng-repeat="(key, data) in temp.policy.attributeFields.attributes" >
101                         <label >{{key}}</label>
102                         <div ng-repeat="(key, data) in data" >
103                                 <label >{{key}}</label><br/>
104                                 <input type="text" class="form-control" title = {{data}} ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.attributes[key]" style="width:500px;"/>
105                         </div>  
106                 </div>
107                 </div>
108       </div>
109       </fieldset> 
110       <fieldset>
111       <div class ="form-group">
112                 <label>Policy Description:<sup><b>*</b></sup></label>
113                 <div>
114                         <textarea class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.description.policyDescription" style="height :150px; width:500px;" ></textarea>
115                 </div>
116       </div>            
117       </fieldset>
118       <fieldset>
119       <div class ="form-group">
120                 <label>Text to Include in UEB messages for AOTS ticket and Geo Link:</label>
121                 <div>
122                 <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.geoLink" style="width:500px;"/>
123             </div>
124       </div>
125       <div class ="form-group">
126                 <label>Email Address:</label>
127                 <div>
128                 <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.emailAddress" style="width:500px;"/>
129              </div>
130       </div>
131       </fieldset>
132       <div class ="form-group">
133         <div>
134         <button class="button button--primary button--small" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="validatePolicy(temp.policy);">Validate</button>
135         <button class="btn btn-success" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="saveCLPMPolicy(temp);">Save</button>
136         <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Close</button>
137         </div>
138       </div>
139     </form>
140 </div>
141 </div>