Add license to policy-engine files
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / ClosedLoopPMPolicyTemplate.html
1 <!--
2   ============LICENSE_START==================================================
3   ONAP Policy Engine
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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====================================================
19   -->
20 <div ng-controller="clPMController">
21         <form>
22                 <div class="well">
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 _."/>
30                                 </div>
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."/>
36                                 </div>
37                         </div>
38                         <div class="form-group row">
39                                 <div class="form-group col-sm-3">
40                                         <label>Onap Name:<sup><b>*</b></sup></label> <select
41                                                 class="form-control" ng-disabled="temp.policy.readOnly"
42                                                 ng-model="temp.policy.onapName"
43                                                 ng-options="option for option in onapNameDictionaryDatas track by option"
44                                                 required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary."></select>
45                                 </div>
46                                 <div class="form-group col-sm-3">
47                                         <label>Time to Live Date:</label> <input type="text" id="ttlDate"
48                                                 class="form-control" name="ttlDate" ng-disabled="temp.policy.readOnly"
49                                                 ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
50                                 </div>
51                                 <div class="form-group col-sm-3">
52                                         <label>Guard:<sup><b>*</b></sup></label> <select
53                                                 class="form-control" ng-disabled="temp.policy.readOnly"
54                                                 ng-model="temp.policy.guard"
55                                                 required pattern="\S+" title="Select the dropdown Guard value.">
56                                                 <option>True</option>
57                                                 <option>False</option></select>
58                                 </div>
59                                 <div class="form-group col-sm-3">
60                                         <label>Risk Type:<sup><b>*</b></sup></label> <select
61                                                 class="form-control" ng-disabled="temp.policy.readOnly"
62                                                 ng-model="temp.policy.riskType"
63                                                 ng-options="option for option in riskTypeDictionaryDatas track by option"
64                                                 required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary."></select>
65                                 </div>
66                         </div>
67                         <div class="form-group row">
68                                 <div class="form-group col-sm-3">
69                                         <label>Risk Level:<sup><b>*</b></sup></label> <select
70                                                 class="form-control" ng-disabled="temp.policy.readOnly"
71                                                 ng-model="temp.policy.riskLevel"
72                                                 required pattern="\S+" title="Select the dropdown Risk level value.">
73                                                 <option>1</option>
74                                                 <option>2</option>
75                                                 <option>3</option>
76                                                 <option>4</option>
77                                                 <option>5</option></select>
78                                 </div>
79                                 <div class="form-group col-sm-5">
80                                         <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label><br>
81                                         <input type="checkbox" ng-disabled="temp.policy.readOnly"
82                                                 ng-model="temp.policy.jsonBodyData.trinity"> Hosted Voice
83                                         (Trinity)</input> <input type="checkbox" ng-disabled="temp.policy.readOnly"
84                                                 ng-model="temp.policy.jsonBodyData.vUSP"> vUSP</input> <input
85                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
86                                                 ng-model="temp.policy.jsonBodyData.mcr"> MCR</input> <input
87                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
88                                                 ng-model="temp.policy.jsonBodyData.gamma"> Gamma</input> <input
89                                                 type="checkbox" ng-disabled="temp.policy.readOnly"
90                                                 ng-model="temp.policy.jsonBodyData.vDNS"> vDNS</input>
91                                 </div>
92                                 <div class="form-group col-sm-3">
93                                         <label>Service Type PolicyName:<sup><b>*</b></sup></label><br>
94                                         <select style="width: 400px;" ng-disabled="temp.policy.readOnly"
95                                                 ng-model="temp.policy.serviceTypePolicyName" class="form-control"
96                                                 ng-options="option.serviceTypePolicyName for option in PMData track by option.serviceTypePolicyName"
97                                                 ng-click="addDataToFields(temp.policy.serviceTypePolicyName);"
98                                                 title="Select the Service Type PolicyName from dropdown value."></select>
99                                 </div>
100                         </div>
101                 </div>
102                 <div class="well">
103                         <div class="form-group row">
104                                 <label>Vertica Metrics:<sup><b>*</b></sup></label>
105                                 <div>
106                                         <textarea class="form-control"
107                                                 ng-model="temp.policy.verticaMetrics.verticaMetrics"
108                                                 ng-disabled="true" style="height: 150px;"></textarea>
109                                 </div>
110                         </div>
111                         <div class="well">
112                                 <div class="form-group row">
113                                         <label>Attributes:<sup><b></b></sup></label>
114                                         <div
115                                                 ng-repeat="(key, data) in temp.policy.attributeFields.attributes">
116                                                 <div class="well">
117                                                 <div class="form-group row" style="margin-left: 2%">
118                                                         <label class="control-label col-md-3">{{key}}</label>
119                                                         <div ng-repeat="(key, data) in data">
120                                                         <div class="form-group col-sm-3">
121                                                                 <label>{{key}}</label><br /> <input type="text"
122                                                                         class="form-control" title={{data}}
123                                                                         ng-disabled="temp.policy.readOnly"
124                                                                         ng-model="temp.policy.jsonBodyData.attributes[key]" />
125                                                         </div>
126                                                         </div>
127                                                         </div>
128                                                 </div>
129                                         </div>
130                                 </div>
131                         </div>
132                         <div class="form-group row">
133                                 <label>Policy Description:<sup><b>*</b></sup></label>
134                                 <div>
135                                         <textarea class="form-control" ng-disabled="true"
136                                                 ng-model="temp.policy.description.policyDescription"
137                                                 style="height: 150px;"></textarea>
138                                 </div>
139                         </div>
140                 </div>
141                 <div class="well">
142                         <div class="form-group row">
143                                 <div class="form-group col-sm-6">
144                                         <label>Text to Include in UEB messages for AOTS ticket and
145                                                 Geo Link:</label>
146                                         <div>
147                                                 <input type="text" class="form-control"
148                                                         ng-disabled="temp.policy.readOnly"
149                                                         ng-model="temp.policy.jsonBodyData.geoLink" 
150                                                         title="Enter the UEB Message value."/>
151                                         </div>
152                                 </div>
153                                 <div class="form-group col-sm-6">
154                                         <label>Email Address:</label>
155                                         <div>
156                                                 <input type="text" class="form-control"
157                                                         ng-disabled="temp.policy.readOnly"
158                                                         ng-model="temp.policy.jsonBodyData.emailAddress" 
159                                                         title="Enter the email address and for multiple use comma seperated value."/>
160                                         </div>
161                                 </div>
162                         </div>
163                 </div>
164                 <div id="validate" style="width: 70%"></div>
165                 <br>
166                 <div class="modal-footer">
167                         <div>
168                                 <button class="btn btn-primary" herf="javascript:void(0)"
169                                         ng-disabled="temp.policy.readOnly"
170                                         ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
171                                 <button class="btn btn-success" herf="javascript:void(0)"
172                                         ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
173                                         ng-click="saveCLPMPolicy(temp);" title="Save the Policy with validated data.">Save</button>
174                                 <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>
175                         </div>
176                 </div>
177         </form>
178 </div>