1 <div ng-controller="decisionPolicyController">
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" />
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" />
18 <div class="form-group row">
19 <div class="form-group col-sm-6">
20 <label>Ecomp Name:<sup><b>*</b></sup></label> <select
21 class="form-control" ng-disabled="temp.policy.readOnly"
22 ng-model="temp.policy.ecompName"
23 ng-options="option for option in ecompNameDictionaryDatas track by option"
24 required pattern="\S+" title="EcompName is required"></select>
26 <div class="form-group col-sm-6">
27 <label>Rule Provider:<sup><b>*</b></sup></label><select
28 class="form-control" ng-disabled="temp.policy.readOnly"
29 ng-model="temp.policy.ruleProvider"
30 ng-init="providerListener(temp.policy.ruleProvider);"
31 ng-click="providerListener(temp.policy.ruleProvider);">
32 <option>Custom</option>
34 <option>GUARD_YAML</option>
35 <option>GUARD_BL_YAML<option>
41 <div ng-if="temp.policy.ruleProvider == 'GUARD_BL_YAML'">
43 <div class="form-group row">
44 <div class="form-group col-sm-1">
45 <label>Guard YAML Attributes:</label><br>
48 <div class="form-group row">
49 <div class="form-group row" style="margin-left: 2%">
50 <div class="form-group col-sm-3">
51 <label> actor: </label>
53 <div class="form-group col-sm-3">
54 <input type="text" class="form-control"
55 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
56 placeholder="Actor" />
59 <div class="form-group row" style="margin-left: 2%">
60 <div class="form-group col-sm-3">
61 <label> recipe: </label>
63 <div class="form-group col-sm-3">
64 <input type="text" class="form-control"
65 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
66 placeholder="Recipe" />
69 <div class="form-group row" style="margin-left: 2%">
70 <div class="form-group col-sm-3">
71 <label> guardActiveStart: </label>
73 <div class="form-group col-sm-3">
74 <input type="text" class="form-control"
75 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
76 placeholder="00:00:00-05:00" />
79 <div class="form-group row" style="margin-left: 2%">
80 <div class="form-group col-sm-3">
81 <label> guardActiveEnd: </label>
83 <div class="form-group col-sm-3">
84 <input type="text" class="form-control"
85 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
86 placeholder="00:00:00-05:00" />
89 <div class="form-group row" style="margin-left: 2%">
90 <div class="form-group col-sm-3">
91 <label> BlackList: </label>
92 <button type="button" class="btn btn-default"
93 ng-disabled="temp.policy.readOnly" ng-click="addNewBL()">
94 <i class="fa fa-plus"></i>
97 <div class="form-group col-sm-4">
98 <div data-ng-repeat="choice in temp.policy.yamlparams.blackList track by $index">
99 <div class="form-group row">
100 <div class="form-group col-sm-9">
101 <input type="text" class="form-control"
102 ng-disabled="temp.policy.readOnly"
103 ng-model="temp.policy.yamlparams.blackList[$index]" placeholder="BlackList" />
105 <div class="form-group col-sm-1">
106 <button type="button" class="btn btn-default" ng-show="$last"
107 ng-disabled="temp.policy.readOnly" ng-click="removeBL()">
108 <i class="fa fa-minus"></i>
119 <div ng-if="temp.policy.ruleProvider == 'GUARD_YAML'">
121 <div class="form-group row">
122 <div class="form-group col-sm-1">
123 <label>Guard YAML Attributes:</label><br>
126 <div class="form-group row">
127 <div class="form-group row" style="margin-left: 2%">
128 <div class="form-group col-sm-3">
129 <label> actor: </label>
131 <div class="form-group col-sm-3">
132 <input type="text" class="form-control"
133 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
134 placeholder="Actor" />
137 <div class="form-group row" style="margin-left: 2%">
138 <div class="form-group col-sm-3">
139 <label> recipe: </label>
141 <div class="form-group col-sm-3">
142 <input type="text" class="form-control"
143 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
144 placeholder="Recipe" />
147 <div class="form-group row" style="margin-left: 2%">
148 <div class="form-group col-sm-3">
149 <label> limit: </label>
151 <div class="form-group col-sm-3">
152 <input type="text" class="form-control"
153 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.limit"
154 placeholder="Limit" />
157 <div class="form-group row" style="margin-left: 2%">
158 <div class="form-group col-sm-3">
159 <label> timeWindow: </label>
161 <div class="form-group col-sm-3">
162 <select class="form-control" ng-disabled="temp.policy.readOnly"
163 ng-model="temp.policy.yamlparams.timeWindow">
164 <option>tw5min</option>
165 <option>tw10min</option>
166 <option>tw30min</option>
167 <option>tw1h</option>
168 <option>tw12h</option>
169 <option>tw1d</option>
170 <option>tw5d</option>
171 <option>tw1w</option>
172 <option>tw1mon</option>
176 <div class="form-group row" style="margin-left: 2%">
177 <div class="form-group col-sm-3">
178 <label> guardActiveStart: </label>
180 <div class="form-group col-sm-3">
181 <input type="text" class="form-control"
182 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
183 placeholder="00:00:00-05:00" />
186 <div class="form-group row" style="margin-left: 2%">
187 <div class="form-group col-sm-3">
188 <label> guardActiveEnd: </label>
190 <div class="form-group col-sm-3">
191 <input type="text" class="form-control"
192 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
193 placeholder="00:00:00-05:00" />
201 <div ng-if="temp.policy.ruleProvider == 'Custom'">
203 <div class="form-group row">
204 <div class="form-group col-sm-1">
205 <label>Component Attributes:</label><br>
206 <button type="button" class="btn btn-default"
207 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
208 <i class="fa fa-plus"></i>
212 <div class="form-group row">
213 <div data-ng-repeat="choice in temp.policy.attributes">
214 <div class="form-group row" style="margin-left: 2%">
215 <div class="form-group col-sm-3">
216 <select class="form-control" ng-disabled="temp.policy.readOnly"
217 ng-model="choice.key"
218 ng-options="option for option in attributeDictionaryDatas track by option">
219 <option value="">{{choice.key}}</option>
222 <div class="form-group col-sm-3">
223 <input type="text" class="form-control"
224 ng-disabled="temp.policy.readOnly" ng-model="choice.value"
225 placeholder="Attribute Value" />
227 <div class="form-group col-sm-1">
228 <button type="button" class="btn btn-default" ng-show="$last"
229 ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
230 <i class="fa fa-minus"></i>
239 <div ng-if="temp.policy.ruleProvider == 'Custom'">
241 <div class="form-group row">
242 <div class="form-group col-sm-1">
243 <label>Settings Attributes:</label><br>
244 <button type="button" class="btn btn-default"
245 ng-disabled="temp.policy.readOnly"
246 ng-click="addNewSettingsChoice()">
247 <i class="fa fa-plus"></i>
251 <div class="form-group row">
252 <div data-ng-repeat="settingschoice in temp.policy.settings">
253 <div class="form-group row" style="margin-left: 2%">
254 <div class="form-group col-sm-3">
255 <select class="form-control" ng-disabled="temp.policy.readOnly"
256 ng-model="settingschoice.key"
257 ng-options="option for option in settingsDictionaryDatas track by option">
258 <option value="">{{settingschoice.key}}</option>
261 <div class="form-group col-sm-3">
262 <input type="text" class="form-control"
263 ng-disabled="temp.policy.readOnly"
264 ng-model="settingschoice.value" placeholder="Settings Value" />
266 <div class="form-group col-sm-1">
267 <button type="button" class="btn btn-default" ng-show="$last"
268 ng-disabled="temp.policy.readOnly"
269 ng-click="removeSettingsChoice()">
270 <i class="fa fa-minus"></i>
279 <div ng-if="temp.policy.ruleProvider == 'Custom'">
281 <label>Decision Rule Algorithms:<sup><b></b></sup></label><br>
282 <div class="form-group row">
283 <div class="form-group col-sm-1">
284 <button type="button" class="btn btn-default"
285 ng-disabled="temp.policy.readOnly"
286 ng-click="addNewRuleAlgorithm()">
287 <i class="fa fa-plus"></i>
291 <div class="form-group row">
293 data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
294 <div class="form-group row" style="margin-left: 2%">
295 <div class="form-group col-sm-1">
297 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
298 name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
300 <div class="form-group col-sm-3">
301 <select class="form-control" id="mySelect"
302 ng-disabled="temp.policy.readOnly"
303 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
304 ng-options="option for option in attributeDictionaryDatas track by option"
305 name="dynamicRuleAlgorithmField1">
306 <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
309 <div class="form-group col-sm-3">
310 <select type="text" class="form-control"
311 ng-disabled="temp.policy.readOnly"
312 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
313 ng-options="option for option in functionDefinitionDatas track by option"
314 name="dynamicRuleAlgorithmCombo"></select>
316 <div class="form-group col-sm-3">
317 <input type="text" class="form-control"
318 ng-disabled="temp.policy.readOnly"
319 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
320 name="dynamicRuleAlgorithmField2" />
322 <div class="form-group col-sm-1">
323 <button type="button" class="btn btn-default"
324 ng-disabled="temp.policy.readOnly"
325 ng-click="removeRuleAlgorithm()">
326 <i class="fa fa-minus"></i>
335 <div id="validate" style="width: 70%"></div>
337 <div class="modal-footer">
338 <button class="btn btn-primary" herf="javascript:void(0)"
339 ng-disabled="temp.policy.readOnly"
340 ng-click="validatePolicy(temp.policy);">Validate</button>
341 <button class="btn btn-success" herf="javascript:void(0)"
342 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
343 ng-click="saveDecisionPolicy(temp);">Save</button>
344 <button type="button" class="btn btn-default" ng-click="refresh();">Close</button>