Add license to policy-engine files
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / DCAEMicroServicePolicyTemplate.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="dcaeMicroServiceController">
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-3">
80                                         <label>Priority:<sup><b>*</b></sup></label> <select
81                                                 class="form-control" ng-disabled="temp.policy.readOnly"
82                                                 ng-model="temp.policy.priority"
83                                                 ng-options="option for option in priorityDatas track by option" title="Select the dropdown Priority value.">
84                                                 <option value="">{{temp.policy.priority}}</option>
85                                         </select>
86                                 </div>
87                                 <div class="form-group col-sm-3">
88                                         <label>Micro Service:<sup><b>*</b></sup></label> <select
89                                                 class="form-control" ng-disabled="temp.policy.readOnly"
90                                                 ng-model="temp.policy.serviceType"
91                                                 ng-options="option for option in microServiceModelsDictionaryDatas track by option"
92                                                 ng-init="pullVersion(temp.policy.serviceType);"
93                                                 ng-click="pullVersion(temp.policy.serviceType);"
94                                                 title="Select the dropdown value driven from MicroService Models (MicroService Policy)Dictionary."></select>
95                                 </div>
96                                 <div class="form-group col-sm-3">
97                                         <label>Micro Service Version:<sup><b>*</b></sup></label> <select
98                                                 class="form-control" ng-disabled="temp.policy.readOnly"
99                                                 ng-model="temp.policy.version"
100                                                 ng-options="option for option in microServiceModelsDictionaryVersionDatas track by option"
101                                                 ng-init="addDataToFields(temp.policy.serviceType, temp.policy.version);"
102                                                 ng-change="addDataToFields(temp.policy.serviceType, temp.policy.version);"
103                                                 title="Select the dropdown value driven based on MicroService Models (MicroService Policy)Dictionary selection."></select>
104                                 </div>
105                         </div>
106                 </div>
107                 <div class="well">
108                         <div class="form-group col-sm-12" id="DynamicTemplate">
109                                 <label>Micro Service Attributes:<sup><b>*</b></sup></label><br>
110                         </div>
111                         </br>
112                 <div class="form-group row">
113                         <div class="form-group col-sm-3" ng-show="isCheck">
114                                 <label>Configuration Name:<sup><b>*!</b></sup></label><br> <select
115                                         class="form-control"  class="form-control"
116                                         ng-disabled="temp.policy.readOnly"
117                                         ng-model="temp.policy.configName"
118                                         ng-options="option for option in microServiceCongigNameDictionaryDatas track by option" required="true"
119                                         title="Select the dropdown value driven from MicroService ConfigName (MicroService Policy)Dictionary."></select>
120                         </div>
121                         <div class="form-group col-sm-3" ng-show="isCheck">
122                                 <label>Location:<sup><b>*!</b></sup></label><br> <select
123                                         class="form-control"  class="form-control"
124                                         ng-disabled="temp.policy.readOnly" ng-model="temp.policy.location"
125                                         ng-options="option for option in microServiceLocationDictionaryDatas track by option" required="true"
126                                         title="Select the dropdown value driven from MicroService Location (MicroService Policy)Dictionary."></select>
127                         </div>
128                         <div class="form-group col-sm-3" ng-show="isCheck">
129                                 <label>UUID:<sup><b>*!</b></sup></label><br> <select
130                                         class="form-control"  class="form-control"
131                                         ng-disabled="temp.policy.readOnly" ng-model="temp.policy.uuid"
132                                         ng-options="option for option in dcaeUUIDDictionaryDatas track by option" required="true"
133                                         title="Select the dropdown value driven from DCAE UUID (MicroService Policy)Dictionary."></select>
134                         </div>
135                         <div class="form-group col-sm-3" ng-show="isCheck">
136                                 <label>Policy Scope:<sup><b>*</b></sup></label><br> <select
137                                         class="form-control"  class="form-control"
138                                         ng-disabled="temp.policy.readOnly"
139                                         ng-model="temp.policy.policyScope"
140                                         ng-options="option for option in groupPolicyScopeListDatas track by option" required="true"
141                                         title="Select the dropdown value driven from Group Policy Scope (Policy Scope)Dictionary."></select>
142                         </div>
143                 </div>
144                 </div>
145                 <br />
146                 <div id="validate" style="width: 70%"></div>
147                 <br>
148                 <div class="modal-footer">
149                         <button class="btn btn-primary" herf="javascript:void(0)"
150                                 ng-disabled="temp.policy.readOnly"
151                                 ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
152                         <button class="btn btn-success" herf="javascript:void(0)"
153                                 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
154                                 ng-click="savePolicy(temp);" title="Save the Policy with validated data.">Save</button>
155                         <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>
156                 </div>
157         </form>
158 </div>