b743224fb2c38fc7317fc337d13b2904e4e24d34
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / ClosedLoopPMPolicyTemplate.html
1 <div ng-controller="clPMController">
2         <form>
3                 <div class="well">
4                         <div class="form-group row">
5                                 <div class="form-group col-sm-6">
6                                         <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
7                                                 class="form-control" ng-disabled="temp.policy.readOnly"
8                                                 ng-readonly="temp.policy.editPolicy"
9                                                 ng-model="temp.policy.policyName" required pattern="\S+"
10                                                 title="Enter Policy Name without any spaces and special characters and will accept _."/>
11                                 </div>
12                                 <div class="form-group col-sm-6">
13                                         <label>Description:</label> <input type="text" class="form-control"
14                                                 ng-disabled="temp.policy.readOnly"
15                                                 ng-model="temp.policy.policyDescription" 
16                                                 title="Description field will accept any type of data."/>
17                                 </div>
18                         </div>
19                         <div class="form-group row">
20                                 <div class="form-group col-sm-3">
21                                         <label>Onap Name:<sup><b>*</b></sup></label> <select
22                                                 class="form-control" ng-disabled="temp.policy.readOnly"
23                                                 ng-model="temp.policy.onapName"
24                                                 ng-options="option for option in onapNameDictionaryDatas track by option"
25                                                 required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary."></select>
26                                 </div>
27                                 <div class="form-group col-sm-3">
28                                         <label>Time to Live Date:</label> <input type="text" id="ttlDate"
29                                                 class="form-control" name="ttlDate" ng-disabled="temp.policy.readOnly"
30                                                 ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
31                                 </div>
32                                 <div class="form-group col-sm-3">
33                                         <label>Guard:<sup><b>*</b></sup></label> <select
34                                                 class="form-control" ng-disabled="temp.policy.readOnly"
35                                                 ng-model="temp.policy.guard"
36                                                 required pattern="\S+" title="Select the dropdown Guard value.">
37                                                 <option>True</option>
38                                                 <option>False</option></select>
39                                 </div>
40                                 <div class="form-group col-sm-3">
41                                         <label>Risk Type:<sup><b>*</b></sup></label> <select
42                                                 class="form-control" ng-disabled="temp.policy.readOnly"
43                                                 ng-model="temp.policy.riskType"
44                                                 ng-options="option for option in riskTypeDictionaryDatas track by option"
45                                                 required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary."></select>
46                                 </div>
47                         </div>
48                         <div class="form-group row">
49                                 <div class="form-group col-sm-3">
50                                         <label>Risk Level:<sup><b>*</b></sup></label> <select
51                                                 class="form-control" ng-disabled="temp.policy.readOnly"
52                                                 ng-model="temp.policy.riskLevel"
53                                                 required pattern="\S+" title="Select the dropdown Risk level value.">
54                                                 <option>1</option>
55                                                 <option>2</option>
56                                                 <option>3</option>
57                                                 <option>4</option>
58                                                 <option>5</option></select>
59                                 </div>
60                                 <div class="form-group col-sm-5">
61                                         <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label><br>
62                                         <input type="checkbox" ng-disabled="temp.policy.readOnly"
63                                                 ng-model="temp.policy.jsonBodyData.trinity"> Hosted Voice
64                                         (Trinity)</input> <input type="checkbox" ng-disabled="temp.policy.readOnly"
65                                                 ng-model="temp.policy.jsonBodyData.vUSP"> vUSP</input> <input
66                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
67                                                 ng-model="temp.policy.jsonBodyData.mcr"> MCR</input> <input
68                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
69                                                 ng-model="temp.policy.jsonBodyData.gamma"> Gamma</input> <input
70                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
71                                                 ng-model="temp.policy.jsonBodyData.vDNS"> vDNS</input>
72                                 </div>
73                                 <div class="form-group col-sm-3">
74                                         <label>Service Type PolicyName:<sup><b>*</b></sup></label><br>
75                                         <select style="width: 400px;" ng-disabled="temp.policy.readOnly"
76                                                 ng-model="temp.policy.serviceTypePolicyName" class="form-control"
77                                                 ng-options="option.serviceTypePolicyName for option in PMData track by option.serviceTypePolicyName"
78                                                 ng-click="addDataToFields(temp.policy.serviceTypePolicyName);"
79                                                 title="Select the Service Type PolicyName from dropdown value."></select>
80                                 </div>
81                         </div>
82                 </div>
83                 <div class="well">
84                         <div class="form-group row">
85                                 <label>Vertica Metrics:<sup><b>*</b></sup></label>
86                                 <div>
87                                         <textarea class="form-control"
88                                                 ng-model="temp.policy.verticaMetrics.verticaMetrics"
89                                                 ng-disabled="true" style="height: 150px;"></textarea>
90                                 </div>
91                         </div>
92                         <div class="well">
93                                 <div class="form-group row">
94                                         <label>Attributes:<sup><b></b></sup></label>
95                                         <div
96                                                 ng-repeat="(key, data) in temp.policy.attributeFields.attributes">
97                                                 <div class="well">
98                                                 <div class="form-group row" style="margin-left: 2%">
99                                                         <label class="control-label col-md-3">{{key}}</label>
100                                                         <div ng-repeat="(key, data) in data">
101                                                         <div class="form-group col-sm-3">
102                                                                 <label>{{key}}</label><br /> <input type="text"
103                                                                         class="form-control" title={{data}}
104                                                                         ng-disabled="temp.policy.readOnly"
105                                                                         ng-model="temp.policy.jsonBodyData.attributes[key]" />
106                                                         </div>
107                                                         </div>
108                                                         </div>
109                                                 </div>
110                                         </div>
111                                 </div>
112                         </div>
113                         <div class="form-group row">
114                                 <label>Policy Description:<sup><b>*</b></sup></label>
115                                 <div>
116                                         <textarea class="form-control" ng-disabled="true"
117                                                 ng-model="temp.policy.description.policyDescription"
118                                                 style="height: 150px;"></textarea>
119                                 </div>
120                         </div>
121                 </div>
122                 <div class="well">
123                         <div class="form-group row">
124                                 <div class="form-group col-sm-6">
125                                         <label>Text to Include in UEB messages for AOTS ticket and
126                                                 Geo Link:</label>
127                                         <div>
128                                                 <input type="text" class="form-control"
129                                                         ng-disabled="temp.policy.readOnly"
130                                                         ng-model="temp.policy.jsonBodyData.geoLink" 
131                                                         title="Enter the UEB Message value."/>
132                                         </div>
133                                 </div>
134                                 <div class="form-group col-sm-6">
135                                         <label>Email Address:</label>
136                                         <div>
137                                                 <input type="text" class="form-control"
138                                                         ng-disabled="temp.policy.readOnly"
139                                                         ng-model="temp.policy.jsonBodyData.emailAddress" 
140                                                         title="Enter the email address and for multiple use comma seperated value."/>
141                                         </div>
142                                 </div>
143                         </div>
144                 </div>
145                 <div id="validate" style="width: 70%"></div>
146                 <br>
147                 <div class="modal-footer">
148                         <div>
149                                 <button class="btn btn-primary" herf="javascript:void(0)"
150                                         ng-disabled="temp.policy.readOnly"
151                                         ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
152                                 <button class="btn btn-success" herf="javascript:void(0)"
153                                         ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
154                                         ng-click="saveCLPMPolicy(temp);" title="Save the Policy with validated data.">Save</button>
155                                 <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>
156                         </div>
157                 </div>
158         </form>
159 </div>