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 Policy Name without any spaces and special characters and will accept _." />
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."/>
19 <div class="form-group row">
20 <div class="form-group col-sm-6">
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>
27 <div class="form-group col-sm-6">
28 <label>Rule Provider:<sup><b>*</b></sup></label><select
29 class="form-control" ng-disabled="temp.policy.readOnly"
30 ng-model="temp.policy.ruleProvider"
31 ng-init="providerListener(temp.policy.ruleProvider);"
32 ng-click="providerListener(temp.policy.ruleProvider);">
33 <option>Custom</option>
35 <option>Rainy_Day</option>
36 <option>GUARD_YAML</option>
37 <option>GUARD_BL_YAML<option>
42 <div ng-if="temp.policy.ruleProvider == 'Rainy_Day'">
44 <div class="form-group row">
45 <div class="form-group row">
46 <div class="form-group col-sm-1">
47 <label>Service Type:<sup><b>*</b></sup></label>
49 <div class="form-group col-sm-2">
50 <input type="text" class="form-control"
51 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.serviceType"
52 placeholder="Service Type" title="Enter Service Type value."/>
54 <div class="form-group col-sm-1">
55 <label>VNF Type:<sup><b>*</b></sup></label>
57 <div class="form-group col-sm-2">
58 <input type="text" class="form-control"
59 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.vnfType"
60 placeholder="VNF Type" title="Enter VNF Type value."/>
62 <div class="form-group col-sm-1">
63 <label>Building Block ID:<sup><b>*</b></sup></label>
65 <div class="form-group col-sm-2">
67 class="form-control" ng-disabled="temp.policy.readOnly"
68 ng-model="temp.policy.rainyday.bbid"
69 ng-options="option for option in rainyDayDictionaryDatas track by option"
70 ng-change="getWorkstepValues(temp.policy.rainyday.bbid)" title="Select the dropdown value driven from Rainday Allowed Treatments (Decision)Dictionary.">
71 <option value="">{{temp.policy.rainyday.bbid}}</option>
74 <div class="form-group col-sm-1">
75 <label>Work Step:<sup><b>*</b></sup></label>
77 <div class="form-group col-sm-2">
79 class="form-control" ng-disabled="temp.policy.readOnly"
80 ng-model="temp.policy.rainyday.workstep"
81 ng-options="option for option in workstepDictionaryDatas track by option"
82 ng-change="getTreatmentValues(temp.policy.rainyday.bbid, temp.policy.rainyday.workstep)">
83 <option value="">{{temp.policy.rainyday.workstep}}</option>
87 <div class="form-group row">
88 <div class="form-group col-sm-3">
89 <label>Desired Automated Treatments:</label>
90 <button type="button" class="btn btn-default"
91 ng-disabled="temp.policy.readOnly"
92 ng-click="addNewTreatment()">
93 <i class="fa fa-plus"></i>
97 <div class="form-group row">
98 <div data-ng-repeat="treatmentTableChoice in temp.policy.rainyday.treatmentTableChoices">
99 <div class="form-group row" style="margin-left: 2%">
100 <div class="form-group col-sm-1">
101 <label>Error Code:<sup><b>*</b></sup></label>
103 <div class="form-group col-sm-3">
104 <input type="text" class="form-control"
105 ng-disabled="temp.policy.readOnly"
106 ng-model="treatmentTableChoice.errorcode"
107 placeholder="Error Code" />
109 <div class="form-group col-sm-1">
110 <label>Desired Treatment:<sup><b>*</b></sup></label>
112 <div class="form-group col-sm-3">
115 ng-disabled="temp.policy.readOnly"
116 ng-model="treatmentTableChoice.treatment"
117 ng-options="option for option in allowedTreatmentsDatas track by option">
118 <option value="">{{treatmentTableChoice.treatment}}</option>
121 <div class="form-group col-sm-1">
122 <button type="button" class="btn btn-default"
123 ng-disabled="temp.policy.readOnly"
124 ng-click="removeTreatment()">
125 <i class="fa fa-minus"></i>
134 <div ng-if="temp.policy.ruleProvider == 'GUARD_BL_YAML'">
136 <div class="form-group row">
137 <div class="form-group col-sm-1">
138 <label>Guard BlackList YAML Attributes:</label><br>
141 <div class="form-group row">
142 <div class="form-group row" style="margin-left: 2%">
143 <div class="form-group col-sm-3">
144 <label> actor: </label>
146 <div class="form-group col-sm-3">
147 <input type="text" class="form-control"
148 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
149 placeholder="Actor" />
152 <div class="form-group row" style="margin-left: 2%">
153 <div class="form-group col-sm-3">
154 <label> recipe: </label>
156 <div class="form-group col-sm-3">
157 <input type="text" class="form-control"
158 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
159 placeholder="Recipe" />
162 <div class="form-group row" style="margin-left: 2%">
163 <div class="form-group col-sm-3">
164 <label> CLName: </label>
166 <div class="form-group col-sm-3">
167 <input type="text" class="form-control"
168 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.clname"
169 placeholder="CLName" />
172 <div class="form-group row" style="margin-left: 2%">
173 <div class="form-group col-sm-3">
174 <label> guardActiveStart: </label>
176 <div class="form-group col-sm-3">
177 <input type="text" class="form-control"
178 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
179 placeholder="00:00:00-05:00" />
182 <div class="form-group row" style="margin-left: 2%">
183 <div class="form-group col-sm-3">
184 <label> guardActiveEnd: </label>
186 <div class="form-group col-sm-3">
187 <input type="text" class="form-control"
188 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
189 placeholder="00:00:00-05:00" />
192 <div class="form-group row" style="margin-left: 2%">
193 <div class="form-group col-sm-3">
194 <label> BlackList: </label>
195 <button type="button" class="btn btn-default"
196 ng-disabled="temp.policy.readOnly" ng-click="addNewBL()">
197 <i class="fa fa-plus"></i>
200 <div class="form-group col-sm-4">
201 <div data-ng-repeat="choice in temp.policy.yamlparams.blackList track by $index">
202 <div class="form-group row">
203 <div class="form-group col-sm-9">
204 <input type="text" class="form-control"
205 ng-disabled="temp.policy.readOnly"
206 ng-model="temp.policy.yamlparams.blackList[$index]" placeholder="BlackList" />
208 <div class="form-group col-sm-1">
209 <button type="button" class="btn btn-default" ng-show="$last"
210 ng-disabled="temp.policy.readOnly" ng-click="removeBL()">
211 <i class="fa fa-minus"></i>
222 <div ng-if="temp.policy.ruleProvider == 'GUARD_YAML'">
224 <div class="form-group row">
225 <div class="form-group col-sm-1">
226 <label>Guard YAML Attributes:</label><br>
229 <div class="form-group row">
230 <div class="form-group row" style="margin-left: 2%">
231 <div class="form-group col-sm-3">
232 <label> actor: </label>
234 <div class="form-group col-sm-3">
235 <input type="text" class="form-control"
236 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
237 placeholder="Actor" />
240 <div class="form-group row" style="margin-left: 2%">
241 <div class="form-group col-sm-3">
242 <label> recipe: </label>
244 <div class="form-group col-sm-3">
245 <input type="text" class="form-control"
246 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
247 placeholder="Recipe" />
250 <div class="form-group row" style="margin-left: 2%">
251 <div class="form-group col-sm-3">
252 <label> CLName: </label>
254 <div class="form-group col-sm-3">
255 <input type="text" class="form-control"
256 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.clname"
257 placeholder="CLName" />
260 <div class="form-group row" style="margin-left: 2%">
261 <div class="form-group col-sm-3">
262 <label> Targets: </label>
263 <button type="button" class="btn btn-default"
264 ng-disabled="temp.policy.readOnly" ng-click="addNewTarget()">
265 <i class="fa fa-plus"></i>
268 <div class="form-group col-sm-4">
269 <div data-ng-repeat="choice in temp.policy.yamlparams.targets track by $index">
270 <div class="form-group row">
271 <div class="form-group col-sm-9">
272 <input type="text" class="form-control"
273 ng-disabled="temp.policy.readOnly"
274 ng-model="temp.policy.yamlparams.targets[$index]" placeholder="Target" />
276 <div class="form-group col-sm-1">
277 <button type="button" class="btn btn-default" ng-show="$last"
278 ng-disabled="temp.policy.readOnly" ng-click="removeTarget()">
279 <i class="fa fa-minus"></i>
286 <div class="form-group row" style="margin-left: 2%">
287 <div class="form-group col-sm-3">
288 <label> limit: </label>
290 <div class="form-group col-sm-3">
291 <input type="text" class="form-control"
292 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.limit"
293 placeholder="Limit" title="Enter time limit value."/>
296 <div class="form-group row" style="margin-left: 2%">
297 <div class="form-group col-sm-3">
298 <label> timeWindow: </label>
300 <div class="form-group col-sm-2">
301 <input type="text" class="form-control"
302 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.timeWindow"
303 placeholder="Time Window" title="Enter time window value."/>
305 <div class="form-group col-sm-1">
306 <select class="form-control" ng-disabled="temp.policy.readOnly"
307 ng-model="temp.policy.yamlparams.timeUnits" title="Select the Time Units value from dropdown options.">
308 <option>minute</option>
309 <option>hour</option>
311 <option>week</option>
312 <option>month</option>
313 <option>year</option>
317 <div class="form-group row" style="margin-left: 2%">
318 <div class="form-group col-sm-3">
319 <label> guardActiveStart: </label>
321 <div class="form-group col-sm-3">
322 <input type="text" class="form-control"
323 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart" title="Enter Guard Active Start value in following patren '00:00:00-05:00'."
324 placeholder="00:00:00-05:00" />
327 <div class="form-group row" style="margin-left: 2%">
328 <div class="form-group col-sm-3">
329 <label> guardActiveEnd: </label>
331 <div class="form-group col-sm-3">
332 <input type="text" class="form-control"
333 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd" title="Enter Guard Active End value in following patren '00:00:00-05:00'."
334 placeholder="00:00:00-05:00" />
342 <div ng-if="temp.policy.ruleProvider == 'Custom'">
344 <div class="form-group row">
345 <div class="form-group col-sm-1">
346 <label>Component Attributes:</label><br>
347 <button type="button" class="btn btn-default"
348 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()" title="onClick Component Attribute row is added.">
349 <i class="fa fa-plus"></i>
353 <div class="form-group row">
354 <div data-ng-repeat="choice in temp.policy.attributes">
355 <div class="form-group row" style="margin-left: 2%">
356 <div class="form-group col-sm-3">
357 <select class="form-control" ng-disabled="temp.policy.readOnly"
358 ng-model="choice.key"
359 ng-options="option for option in attributeDictionaryDatas track by option" title="Select the dropdown value driven from Attribute (common)Dictionary.">
360 <option value="">{{choice.key}}</option>
363 <div class="form-group col-sm-3">
364 <input type="text" class="form-control"
365 ng-disabled="temp.policy.readOnly" ng-model="choice.value"
366 placeholder="Attribute Value" title="Enter the Attribute Value without any spaces and special characters"/>
368 <div class="form-group col-sm-1">
369 <button type="button" class="btn btn-default" ng-show="$last"
370 ng-disabled="temp.policy.readOnly" ng-click="removeChoice()" title="onClick will remove the last row">
371 <i class="fa fa-minus"></i>
380 <div ng-if="temp.policy.ruleProvider == 'Custom'">
382 <div class="form-group row">
383 <div class="form-group col-sm-1">
384 <label>Settings Attributes:</label><br>
385 <button type="button" class="btn btn-default"
386 ng-disabled="temp.policy.readOnly"
387 ng-click="addNewSettingsChoice()" title="onClick Settings Attribute row is added.">
388 <i class="fa fa-plus"></i>
392 <div class="form-group row">
393 <div data-ng-repeat="settingschoice in temp.policy.settings">
394 <div class="form-group row" style="margin-left: 2%">
395 <div class="form-group col-sm-3">
396 <select class="form-control" ng-disabled="temp.policy.readOnly"
397 ng-model="settingschoice.key"
398 ng-options="option for option in settingsDictionaryDatas track by option" title="Select the dropdown value driven from Settings (Decision)Dictionary.">
399 <option value="">{{settingschoice.key}}</option>
402 <div class="form-group col-sm-3">
403 <input type="text" class="form-control"
404 ng-disabled="temp.policy.readOnly"
405 ng-model="settingschoice.value" placeholder="Settings Value" title="Enter the Settings Attribute Value without any spaces and special characters"/>
407 <div class="form-group col-sm-1">
408 <button type="button" class="btn btn-default" ng-show="$last"
409 ng-disabled="temp.policy.readOnly"
410 ng-click="removeSettingsChoice()" title="onClick will remove the last row">
411 <i class="fa fa-minus"></i>
420 <div ng-if="temp.policy.ruleProvider == 'Custom'">
422 <label>Decision Rule Algorithms:<sup><b></b></sup></label><br>
423 <div class="form-group row">
424 <div class="form-group col-sm-1">
425 <button type="button" class="btn btn-default"
426 ng-disabled="temp.policy.readOnly"
427 ng-click="addNewRuleAlgorithm()" title="onClick Rule Algorithms row is added.">
428 <i class="fa fa-plus"></i>
432 <div class="form-group row">
434 data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
435 <div class="form-group row" style="margin-left: 2%">
436 <div class="form-group col-sm-1">
438 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
439 name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
441 <div class="form-group col-sm-3">
442 <select class="form-control" id="mySelect"
443 ng-disabled="temp.policy.readOnly"
444 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
445 ng-options="option for option in attributeDictionaryDatas track by option"
446 name="dynamicRuleAlgorithmField1" title="Select the dropdown value driven from Attribute (common)Dictionary or Settings (Decision)Dictionary.">
447 <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
450 <div class="form-group col-sm-3">
451 <select type="text" class="form-control"
452 ng-disabled="temp.policy.readOnly"
453 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
454 ng-options="option for option in functionDefinitionDatas track by option"
455 name="dynamicRuleAlgorithmCombo" title="Select the dropdown value driven from FunctionDataType."></select>
457 <div class="form-group col-sm-3">
458 <input type="text" class="form-control"
459 ng-disabled="temp.policy.readOnly"
460 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
461 name="dynamicRuleAlgorithmField2" title="Enter the Value without any spaces and special characters and for rule formation use A1, A2,..etc., based on above Rules."/>
463 <div class="form-group col-sm-1">
464 <button type="button" class="btn btn-default"
465 ng-disabled="temp.policy.readOnly"
466 ng-click="removeRuleAlgorithm()" title="onClick will remove the last row">
467 <i class="fa fa-minus"></i>
476 <div id="validate" style="width: 70%"></div>
478 <div class="modal-footer">
479 <button class="btn btn-primary" herf="javascript:void(0)"
480 ng-disabled="temp.policy.readOnly"
481 ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
482 <button class="btn btn-success" herf="javascript:void(0)"
483 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
484 ng-click="saveDecisionPolicy(temp);" title="Save the Policy with validated data.">Save</button>
485 <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>