2 ============LICENSE_START==================================================
4 ===========================================================================
5 Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6 ===========================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END====================================================
20 <div ng-controller="brmsRawPolicyController">
23 <div class="form-group row">
24 <div class="form-group col-sm-6">
25 <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
26 class="form-control" ng-disabled="temp.policy.readOnly"
27 ng-readonly="temp.policy.editPolicy"
28 ng-model="temp.policy.policyName" required pattern="\S+"
29 title="Enter Policy Name without any spaces and special characters and will accept _." />
31 <div class="form-group col-sm-6">
32 <label>Description:</label> <input type="text" class="form-control"
33 ng-disabled="temp.policy.readOnly"
34 ng-model="temp.policy.policyDescription"
35 title="Description field will accept any type of data."/>
38 <div class="form-group row">
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="Select the dropdown value driven from RiskType (Safe Policy)Dictionary."></select>
46 <div class="form-group col-sm-3">
47 <label>Risk Level:<sup><b>*</b></sup></label> <select
48 class="form-control" ng-disabled="temp.policy.readOnly"
49 ng-model="temp.policy.riskLevel"
50 required pattern="\S+" title="Select the dropdown Risk level value.">
55 <option>5</option></select>
57 <div class="form-group col-sm-3">
58 <label>Guard:<sup><b>*</b></sup></label> <select
59 class="form-control" ng-disabled="temp.policy.readOnly"
60 ng-model="temp.policy.guard"
61 required pattern="\S+" title="Select the dropdown Guard value.">
63 <option>False</option></select>
66 <div class="form-group row">
67 <div class="form-group col-sm-3">
68 <label>Time to Live Date:</label> <input type="text" id="ttlDate"
69 class="form-control" name="ttlDate" ng-disabled="temp.policy.readOnly"
70 ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
72 <div class="form-group col-sm-3">
73 <label>Controller:<sup></sup></label> <select
74 class="form-control" ng-disabled="temp.policy.readOnly"
75 ng-model="temp.policy.brmsController"
76 ng-options="option for option in brmsControllerDatas track by option" title="Select the dropdown value driven from BRMS Controller (BRMS)Dictionary."></select>
78 <div class="form-group col-sm-3">
79 <label>Dependencies:<sup></sup></label> <select
80 class="form-control" multiple ng-disabled="temp.policy.readOnly"
81 ng-model="temp.policy.brmsDependency"
82 ng-options="option for option in brmsDependencyDatas track by option" title="Select the dropdown value driven from BRMS Dependency (BRMS)Dictionary."></select>
87 <div class="form-group row">
88 <div class="form-group col-sm-2">
89 <label>Rule Attributes:<sup></sup></label>
90 <button type="button" class="btn btn-default"
91 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()" title="onClick Rule Attribute row is added.">
92 <i class="fa fa-plus"></i>
96 <div class="form-group row">
97 <div data-ng-repeat="choice in temp.policy.attributes">
98 <div class="form-group row" style="margin-left: 2%">
99 <div class="form-group col-sm-3">
100 <input type="text" class="form-control"
101 ng-disabled="temp.policy.readOnly" ng-model="choice.key" title="Enter the Rule Attribute Key without any spaces and special characters"
102 placeholder="Attribute Key" />
104 <div class="form-group col-sm-3">
105 <input type="text" class="form-control"
106 ng-disabled="temp.policy.readOnly" ng-model="choice.value" title="Enter the Rule Attribute Value without any spaces and special characters"
107 placeholder="Attribute Value" />
109 <div class="form-group col-sm-1">
110 <button type="button" class="btn btn-default" ng-show="$last"
111 ng-disabled="temp.policy.readOnly" ng-click="removeChoice()" title="onClick will remove the last row">
112 <i class="fa fa-minus"></i>
120 <div class="form-group row">
121 <div class="form-group col-sm-12">
122 <label>Raw Rule:<sup><b>*</b></sup></label>
123 <textarea class="form-control"
124 ng-model="temp.policy.configBodyData" title="Enter Valid BRMS Rule."
125 ng-disabled="temp.policy.readOnly" style="height: 400px;" required></textarea>
129 <div id="validate" style="width: 70%"></div>
131 <div class="modal-footer">
133 <button class="btn btn-primary" herf="javascript:void(0)"
134 ng-disabled="temp.policy.readOnly"
135 ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
136 <button class="btn btn-success" herf="javascript:void(0)"
137 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
138 ng-click="saveBrmsRawPolicy(temp);" title="Save the Policy with validated data.">Save</button>
139 <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>