aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html
blob: 3aa0508d5eb93bf2b65387520170249ad1b0e452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<div ng-controller="actionPolicyController">
	<form>
		<div class="well">
			<div class="form-group row">
				<div class="form-group col-sm-6">
					<label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
						class="form-control" ng-disabled="temp.policy.readOnly"
						ng-readonly="temp.policy.editPolicy"
						ng-model="temp.policy.policyName" required pattern="\S+"
						title="Enter Policy Name without any spaces and special characters and will accept _." />
				</div>
				<div class="form-group col-sm-6">
					<label>Description:</label> <input type="text" class="form-control"
						ng-disabled="temp.policy.readOnly"
						ng-model="temp.policy.policyDescription" 
						title="Description field will accept any type of data."/>
				</div>
			</div>
			<div class="well">
				<div class="form-group row">
					<div class="form-group col-sm-2">
						<label>Component Attributes:<sup><b>*</b></sup></label><br>
						<button type="button" class="btn btn-default"
							ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()" title="onClick Component Attribute row is added.">
							<i class="fa fa-plus"></i>
						</button>
					</div>
				</div>
				<div class="form-group row">
					<div data-ng-repeat="choice in temp.policy.attributes">
						<div class="form-group row" style="margin-left: 2%">
							<div class="form-group col-sm-3">
								<select class="form-control" ng-disabled="temp.policy.readOnly"
									ng-model="choice.key"
									ng-options="option for option in attributeDictionaryDatas track by option"
									title="Select the dropdown value driven from Attribute (common)Dictionary.">
									<option value="">{{choice.key}}</option>
								</select>
							</div>
							<div class="form-group col-sm-3">
								<input type="text" class="form-control"
									ng-disabled="temp.policy.readOnly" ng-model="choice.value"
									placeholder="Attribute Value" title="Enter the Attribute Value without any spaces and special characters"/>
							</div>
							<div class="form-group col-sm-1">
								<button type="button" class="btn btn-default" ng-show="$last"
									ng-disabled="temp.policy.readOnly" ng-click="removeChoice()" title="onClick will remove the last row">
									<i class="fa fa-minus"></i>
								</button>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="well">
				<label>Rule Algorithms:<sup><b></b></sup></label><br>
				<div class="form-group row">
					<div class="form-group col-sm-1">
						<button type="button" class="btn btn-default"
							ng-disabled="temp.policy.readOnly"
							ng-click="addNewRuleAlgorithm()" title="onClick Rule Algorithms row is added.">
							<i class="fa fa-plus"></i>
						</button>
					</div>
				</div>
				<div class="form-group row">
					<div
						data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
						<div class="form-group row" style="margin-left: 2%">
						<div class="form-group col-sm-1">
							<label ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
								ng-disabled="temp.policy.readOnly"
								name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
						</div>
						<div class="form-group col-sm-3">
							<select type="text" class="form-control"
								ng-disabled="temp.policy.readOnly"
								ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
								ng-options="option for option in attributeDictionaryDatas track by option"
								name="dynamicRuleAlgorithmField1" title="Select the dropdown value driven from Attribute (common)Dictionary.">
								<option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
							</select>
						</div>
						<div class="form-group col-sm-3">
							<select type="text" class="form-control"
								ng-disabled="temp.policy.readOnly"
								ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
								ng-options="option for option in functionDefinitionDatas"
								name="dynamicRuleAlgorithmCombo" title="Select the dropdown value driven from FunctionDataType.">
								<option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmCombo}}</option>
							</select>
						</div>
						<div class="form-group col-sm-3">
							<input type="text" class="form-control"
								ng-disabled="temp.policy.readOnly"
								ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
								name="dynamicRuleAlgorithmField2" title="Enter the Value without any spaces and special characters and for rule formation use A1, A2,..etc., based on above Rules."/>
						</div>
						<div class="form-group col-sm-1">
							<button type="button" class="btn btn-default" ng-show="$last"
								ng-disabled="temp.policy.readOnly"
								ng-click="removeRuleAlgorithm()" title="onClick will remove the last row">
								<i class="fa fa-minus"></i>
							</button>
						</div>
						</div>
					</div>
				</div>
			</div>
			<div class="well">
				<div class="form-group row">
					<div class="form-group col-sm-6">
						<label>Action Performer:<sup><b>*</b></sup></label><BR> <select
							class="form-control" ng-disabled="temp.policy.readOnly"
							ng-model="temp.policy.actionPerformer" title="Select the Action Performer values from dropdown.">
							<option>PEP</option>
							<option>PDP</option>
						</select>
					</div>
					<div class="form-group col-sm-6">
						<label>Action Attribute:<sup><b>*</b></sup></label><br> <select
							class="form-control"
							ng-disabled="temp.policy.readOnly"
							ng-model="temp.policy.actionAttributeValue"
							ng-options="option for option in actionPolicyDictionaryDatas track by option" title="Select the dropdown value driven from Action (Action)Dictionary."></select>
					</div>
				</div>
			</div>
			<div id="validate" style="width: 70%"></div>
			<br>
			<div class="modal-footer">
				<button class="btn btn-primary" herf="javascript:void(0)"
					ng-disabled="temp.policy.readOnly"
					ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
				<button class="btn btn-success" ng-disabled="savebutton"
					herf="javascript:void(0)" ng-disabled="temp.policy.readOnly"
					ng-click="saveActionPolicy(temp);" title="Save the Policy with validated data.">Save</button>
				<button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>
			</div>
	</form>
</div>