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