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>Rainy_Day</option>
35 <option>GUARD_YAML</option>
36 <option>GUARD_BL_YAML<option>
41 <div ng-if="temp.policy.ruleProvider == 'Rainy_Day'">
43 <div class="form-group row">
44 <div class="form-group row">
45 <div class="form-group col-sm-1">
46 <label>Service Type:<sup><b>*</b></sup></label>
48 <div class="form-group col-sm-2">
49 <input type="text" class="form-control"
50 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.serviceType"
51 placeholder="Service Type" />
53 <div class="form-group col-sm-1">
54 <label>VNF Type:<sup><b>*</b></sup></label>
56 <div class="form-group col-sm-2">
57 <input type="text" class="form-control"
58 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.vnfType"
59 placeholder="VNF Type" />
61 <div class="form-group col-sm-1">
62 <label>Building Block ID:<sup><b>*</b></sup></label>
64 <div class="form-group col-sm-2">
65 <input type="text" class="form-control"
66 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.bbid"
67 placeholder="Building Block ID" />
69 <div class="form-group col-sm-1">
70 <label>Work Step:<sup><b>*</b></sup></label>
72 <div class="form-group col-sm-2">
73 <input type="text" class="form-control"
74 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.workstep"
75 placeholder="Work Step" />
78 <div class="form-group row">
79 <div class="form-group col-sm-3">
80 <label>Desired Automated Treatments:</label>
81 <button type="button" class="btn btn-default"
82 ng-disabled="temp.policy.readOnly"
83 ng-click="addNewTreatment()">
84 <i class="fa fa-plus"></i>
88 <div class="form-group row">
89 <div data-ng-repeat="treatmentTableChoice in temp.policy.rainyday.treatmentTableChoices">
90 <div class="form-group row" style="margin-left: 2%">
91 <div class="form-group col-sm-1">
92 <label>Error Code:<sup><b>*</b></sup></label>
94 <div class="form-group col-sm-3">
95 <input type="text" class="form-control"
96 ng-disabled="temp.policy.readOnly"
97 ng-model="treatmentTableChoice.errorcode"
98 placeholder="Error Code" />
100 <div class="form-group col-sm-1">
101 <label>Desired Treatment:<sup><b>*</b></sup></label>
103 <div class="form-group col-sm-3">
104 <select class="form-control" id="mySelect"
105 ng-disabled="temp.policy.readOnly"
106 ng-model="treatmentTableChoice.treatment"
107 placeholder="Desired Treatment">
108 <!-- <option value="">{{tableChoice.desiredtreatment}}</option> -->
109 <option>Rollback</option>
110 <option>Manual Handling</option>
111 <option>Abort</option>
112 <option>Auto Rollback</option>
113 <option>Retry</option>
114 <option>Skip</option>
117 <div class="form-group col-sm-1">
118 <button type="button" class="btn btn-default"
119 ng-disabled="temp.policy.readOnly"
120 ng-click="removeTreatment()">
121 <i class="fa fa-minus"></i>
130 <div ng-if="temp.policy.ruleProvider == 'GUARD_BL_YAML'">
132 <div class="form-group row">
133 <div class="form-group col-sm-1">
134 <label>Guard YAML Attributes:</label><br>
137 <div class="form-group row">
138 <div class="form-group row" style="margin-left: 2%">
139 <div class="form-group col-sm-3">
140 <label> actor: </label>
142 <div class="form-group col-sm-3">
143 <input type="text" class="form-control"
144 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
145 placeholder="Actor" />
148 <div class="form-group row" style="margin-left: 2%">
149 <div class="form-group col-sm-3">
150 <label> recipe: </label>
152 <div class="form-group col-sm-3">
153 <input type="text" class="form-control"
154 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
155 placeholder="Recipe" />
158 <div class="form-group row" style="margin-left: 2%">
159 <div class="form-group col-sm-3">
160 <label> guardActiveStart: </label>
162 <div class="form-group col-sm-3">
163 <input type="text" class="form-control"
164 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
165 placeholder="00:00:00-05:00" />
168 <div class="form-group row" style="margin-left: 2%">
169 <div class="form-group col-sm-3">
170 <label> guardActiveEnd: </label>
172 <div class="form-group col-sm-3">
173 <input type="text" class="form-control"
174 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
175 placeholder="00:00:00-05:00" />
178 <div class="form-group row" style="margin-left: 2%">
179 <div class="form-group col-sm-3">
180 <label> BlackList: </label>
181 <button type="button" class="btn btn-default"
182 ng-disabled="temp.policy.readOnly" ng-click="addNewBL()">
183 <i class="fa fa-plus"></i>
186 <div class="form-group col-sm-4">
187 <div data-ng-repeat="choice in temp.policy.yamlparams.blackList track by $index">
188 <div class="form-group row">
189 <div class="form-group col-sm-9">
190 <input type="text" class="form-control"
191 ng-disabled="temp.policy.readOnly"
192 ng-model="temp.policy.yamlparams.blackList[$index]" placeholder="BlackList" />
194 <div class="form-group col-sm-1">
195 <button type="button" class="btn btn-default" ng-show="$last"
196 ng-disabled="temp.policy.readOnly" ng-click="removeBL()">
197 <i class="fa fa-minus"></i>
208 <div ng-if="temp.policy.ruleProvider == 'GUARD_YAML'">
210 <div class="form-group row">
211 <div class="form-group col-sm-1">
212 <label>Guard YAML Attributes:</label><br>
215 <div class="form-group row">
216 <div class="form-group row" style="margin-left: 2%">
217 <div class="form-group col-sm-3">
218 <label> actor: </label>
220 <div class="form-group col-sm-3">
221 <input type="text" class="form-control"
222 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
223 placeholder="Actor" />
226 <div class="form-group row" style="margin-left: 2%">
227 <div class="form-group col-sm-3">
228 <label> recipe: </label>
230 <div class="form-group col-sm-3">
231 <input type="text" class="form-control"
232 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
233 placeholder="Recipe" />
236 <div class="form-group row" style="margin-left: 2%">
237 <div class="form-group col-sm-3">
238 <label> limit: </label>
240 <div class="form-group col-sm-3">
241 <input type="text" class="form-control"
242 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.limit"
243 placeholder="Limit" />
246 <div class="form-group row" style="margin-left: 2%">
247 <div class="form-group col-sm-3">
248 <label> timeWindow: </label>
250 <div class="form-group col-sm-3">
251 <select class="form-control" ng-disabled="temp.policy.readOnly"
252 ng-model="temp.policy.yamlparams.timeWindow">
253 <option>tw5min</option>
254 <option>tw10min</option>
255 <option>tw30min</option>
256 <option>tw1h</option>
257 <option>tw12h</option>
258 <option>tw1d</option>
259 <option>tw5d</option>
260 <option>tw1w</option>
261 <option>tw1mon</option>
265 <div class="form-group row" style="margin-left: 2%">
266 <div class="form-group col-sm-3">
267 <label> guardActiveStart: </label>
269 <div class="form-group col-sm-3">
270 <input type="text" class="form-control"
271 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
272 placeholder="00:00:00-05:00" />
275 <div class="form-group row" style="margin-left: 2%">
276 <div class="form-group col-sm-3">
277 <label> guardActiveEnd: </label>
279 <div class="form-group col-sm-3">
280 <input type="text" class="form-control"
281 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
282 placeholder="00:00:00-05:00" />
290 <div ng-if="temp.policy.ruleProvider == 'Custom'">
292 <div class="form-group row">
293 <div class="form-group col-sm-1">
294 <label>Component Attributes:</label><br>
295 <button type="button" class="btn btn-default"
296 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
297 <i class="fa fa-plus"></i>
301 <div class="form-group row">
302 <div data-ng-repeat="choice in temp.policy.attributes">
303 <div class="form-group row" style="margin-left: 2%">
304 <div class="form-group col-sm-3">
305 <select class="form-control" ng-disabled="temp.policy.readOnly"
306 ng-model="choice.key"
307 ng-options="option for option in attributeDictionaryDatas track by option">
308 <option value="">{{choice.key}}</option>
311 <div class="form-group col-sm-3">
312 <input type="text" class="form-control"
313 ng-disabled="temp.policy.readOnly" ng-model="choice.value"
314 placeholder="Attribute Value" />
316 <div class="form-group col-sm-1">
317 <button type="button" class="btn btn-default" ng-show="$last"
318 ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
319 <i class="fa fa-minus"></i>
328 <div ng-if="temp.policy.ruleProvider == 'Custom'">
330 <div class="form-group row">
331 <div class="form-group col-sm-1">
332 <label>Settings Attributes:</label><br>
333 <button type="button" class="btn btn-default"
334 ng-disabled="temp.policy.readOnly"
335 ng-click="addNewSettingsChoice()">
336 <i class="fa fa-plus"></i>
340 <div class="form-group row">
341 <div data-ng-repeat="settingschoice in temp.policy.settings">
342 <div class="form-group row" style="margin-left: 2%">
343 <div class="form-group col-sm-3">
344 <select class="form-control" ng-disabled="temp.policy.readOnly"
345 ng-model="settingschoice.key"
346 ng-options="option for option in settingsDictionaryDatas track by option">
347 <option value="">{{settingschoice.key}}</option>
350 <div class="form-group col-sm-3">
351 <input type="text" class="form-control"
352 ng-disabled="temp.policy.readOnly"
353 ng-model="settingschoice.value" placeholder="Settings Value" />
355 <div class="form-group col-sm-1">
356 <button type="button" class="btn btn-default" ng-show="$last"
357 ng-disabled="temp.policy.readOnly"
358 ng-click="removeSettingsChoice()">
359 <i class="fa fa-minus"></i>
368 <div ng-if="temp.policy.ruleProvider == 'Custom'">
370 <label>Decision Rule Algorithms:<sup><b></b></sup></label><br>
371 <div class="form-group row">
372 <div class="form-group col-sm-1">
373 <button type="button" class="btn btn-default"
374 ng-disabled="temp.policy.readOnly"
375 ng-click="addNewRuleAlgorithm()">
376 <i class="fa fa-plus"></i>
380 <div class="form-group row">
382 data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
383 <div class="form-group row" style="margin-left: 2%">
384 <div class="form-group col-sm-1">
386 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
387 name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
389 <div class="form-group col-sm-3">
390 <select class="form-control" id="mySelect"
391 ng-disabled="temp.policy.readOnly"
392 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
393 ng-options="option for option in attributeDictionaryDatas track by option"
394 name="dynamicRuleAlgorithmField1">
395 <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
398 <div class="form-group col-sm-3">
399 <select type="text" class="form-control"
400 ng-disabled="temp.policy.readOnly"
401 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
402 ng-options="option for option in functionDefinitionDatas track by option"
403 name="dynamicRuleAlgorithmCombo"></select>
405 <div class="form-group col-sm-3">
406 <input type="text" class="form-control"
407 ng-disabled="temp.policy.readOnly"
408 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
409 name="dynamicRuleAlgorithmField2" />
411 <div class="form-group col-sm-1">
412 <button type="button" class="btn btn-default"
413 ng-disabled="temp.policy.readOnly"
414 ng-click="removeRuleAlgorithm()">
415 <i class="fa fa-minus"></i>
424 <div id="validate" style="width: 70%"></div>
426 <div class="modal-footer">
427 <button class="btn btn-primary" herf="javascript:void(0)"
428 ng-disabled="temp.policy.readOnly"
429 ng-click="validatePolicy(temp.policy);">Validate</button>
430 <button class="btn btn-success" herf="javascript:void(0)"
431 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
432 ng-click="saveDecisionPolicy(temp);">Save</button>
433 <button type="button" class="btn btn-default" ng-click="refresh();">Close</button>