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>
40 <div ng-if="temp.policy.ruleProvider == 'GUARD_YAML'">
42 <div class="form-group row">
43 <div class="form-group col-sm-1">
44 <label>Guard YAML Attributes:</label><br>
47 <div class="form-group row">
48 <div class="form-group row" style="margin-left: 2%">
49 <div class="form-group col-sm-3">
50 <label> actor: </label>
52 <div class="form-group col-sm-3">
53 <input type="text" class="form-control"
54 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.actor"
55 placeholder="Actor" />
58 <div class="form-group row" style="margin-left: 2%">
59 <div class="form-group col-sm-3">
60 <label> recipe: </label>
62 <div class="form-group col-sm-3">
63 <input type="text" class="form-control"
64 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.recipe"
65 placeholder="Recipe" />
68 <div class="form-group row" style="margin-left: 2%">
69 <div class="form-group col-sm-3">
70 <label> limit: </label>
72 <div class="form-group col-sm-3">
73 <input type="text" class="form-control"
74 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.limit"
75 placeholder="Limit" />
78 <div class="form-group row" style="margin-left: 2%">
79 <div class="form-group col-sm-3">
80 <label> timeWindow: </label>
82 <div class="form-group col-sm-3">
83 <select class="form-control" ng-disabled="temp.policy.readOnly"
84 ng-model="temp.policy.yamlparams.timeWindow">
85 <option>tw5min</option>
86 <option>tw10min</option>
87 <option>tw30min</option>
89 <option>tw12h</option>
93 <option>tw1mon</option>
97 <div class="form-group row" style="margin-left: 2%">
98 <div class="form-group col-sm-3">
99 <label> guardActiveStart: </label>
101 <div class="form-group col-sm-3">
102 <input type="text" class="form-control"
103 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveStart"
104 placeholder="00:00:00-05:00" />
107 <div class="form-group row" style="margin-left: 2%">
108 <div class="form-group col-sm-3">
109 <label> guardActiveEnd: </label>
111 <div class="form-group col-sm-3">
112 <input type="text" class="form-control"
113 ng-disabled="temp.policy.readOnly" ng-model="temp.policy.yamlparams.guardActiveEnd"
114 placeholder="00:00:00-05:00" />
122 <div ng-if="temp.policy.ruleProvider == 'Custom'">
124 <div class="form-group row">
125 <div class="form-group col-sm-1">
126 <label>Component Attributes:</label><br>
127 <button type="button" class="btn btn-default"
128 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
129 <i class="fa fa-plus"></i>
133 <div class="form-group row">
134 <div data-ng-repeat="choice in temp.policy.attributes">
135 <div class="form-group row" style="margin-left: 2%">
136 <div class="form-group col-sm-3">
137 <select class="form-control" ng-disabled="temp.policy.readOnly"
138 ng-model="choice.key"
139 ng-options="option for option in attributeDictionaryDatas track by option">
140 <option value="">{{choice.key}}</option>
143 <div class="form-group col-sm-3">
144 <input type="text" class="form-control"
145 ng-disabled="temp.policy.readOnly" ng-model="choice.value"
146 placeholder="Attribute Value" />
148 <div class="form-group col-sm-1">
149 <button type="button" class="btn btn-default" ng-show="$last"
150 ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
151 <i class="fa fa-minus"></i>
160 <div ng-if="temp.policy.ruleProvider == 'Custom'">
162 <div class="form-group row">
163 <div class="form-group col-sm-1">
164 <label>Settings Attributes:</label><br>
165 <button type="button" class="btn btn-default"
166 ng-disabled="temp.policy.readOnly"
167 ng-click="addNewSettingsChoice()">
168 <i class="fa fa-plus"></i>
172 <div class="form-group row">
173 <div data-ng-repeat="settingschoice in temp.policy.settings">
174 <div class="form-group row" style="margin-left: 2%">
175 <div class="form-group col-sm-3">
176 <select class="form-control" ng-disabled="temp.policy.readOnly"
177 ng-model="settingschoice.key"
178 ng-options="option for option in settingsDictionaryDatas track by option">
179 <option value="">{{settingschoice.key}}</option>
182 <div class="form-group col-sm-3">
183 <input type="text" class="form-control"
184 ng-disabled="temp.policy.readOnly"
185 ng-model="settingschoice.value" placeholder="Settings Value" />
187 <div class="form-group col-sm-1">
188 <button type="button" class="btn btn-default" ng-show="$last"
189 ng-disabled="temp.policy.readOnly"
190 ng-click="removeSettingsChoice()">
191 <i class="fa fa-minus"></i>
200 <div ng-if="temp.policy.ruleProvider == 'Custom'">
202 <label>Decision Rule Algorithms:<sup><b>*</b></sup></label><br>
203 <div class="form-group row">
204 <div class="form-group col-sm-1">
205 <button type="button" class="btn btn-default"
206 ng-disabled="temp.policy.readOnly"
207 ng-click="addNewRuleAlgorithm()">
208 <i class="fa fa-plus"></i>
212 <div class="form-group row">
214 data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
215 <div class="form-group row" style="margin-left: 2%">
216 <div class="form-group col-sm-1">
218 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
219 name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
221 <div class="form-group col-sm-3">
222 <select class="form-control" id="mySelect"
223 ng-disabled="temp.policy.readOnly"
224 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
225 ng-options="option for option in attributeDictionaryDatas track by option"
226 name="dynamicRuleAlgorithmField1">
227 <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
230 <div class="form-group col-sm-3">
231 <select type="text" class="form-control"
232 ng-disabled="temp.policy.readOnly"
233 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
234 ng-options="option for option in functionDefinitionDatas track by option"
235 name="dynamicRuleAlgorithmCombo"></select>
237 <div class="form-group col-sm-3">
238 <input type="text" class="form-control"
239 ng-disabled="temp.policy.readOnly"
240 ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
241 name="dynamicRuleAlgorithmField2" />
243 <div class="form-group col-sm-1">
244 <button type="button" class="btn btn-default"
245 ng-disabled="temp.policy.readOnly"
246 ng-click="removeRuleAlgorithm()">
247 <i class="fa fa-minus"></i>
256 <div id="validate" style="width: 70%"></div>
258 <div class="modal-footer">
259 <button class="btn btn-primary" herf="javascript:void(0)"
260 ng-disabled="temp.policy.readOnly"
261 ng-click="validatePolicy(temp.policy);">Validate</button>
262 <button class="btn btn-success" herf="javascript:void(0)"
263 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
264 ng-click="saveDecisionPolicy(temp);">Save</button>
265 <button type="button" class="btn btn-default" ng-click="refresh();">Close</button>