Add license to policy-engine files
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / FirewallPolicyTemplate.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="fwPolicyController">
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>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>
45                                 </div>
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.">
51                                                 <option>1</option>
52                                                 <option>2</option>
53                                                 <option>3</option>
54                                                 <option>4</option>
55                                                 <option>5</option></select>
56                                 </div>
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.">
62                                                 <option>True</option>
63                                                 <option>False</option></select>
64                                 </div>
65                         </div>
66                         <div class="form-group row">
67                                 <div class="form-group col-sm-3">
68                                         <label>Config Name:<sup><b>*</b></sup></label> <input type="text"
69                                                 class="form-control" ng-disabled="temp.policy.readOnly"
70                                                 ng-model="temp.policy.configName" required title="Enter the Config Name without any spaces and special characters." />
71                                 </div>
72                                 <div class="form-group col-sm-3">
73                                         <label>Time to Live Date:</label> <input type="text" id="ttlDate"
74                                                 class="form-control" name="ttlDate" ng-disabled="temp.policy.readOnly"
75                                                 ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
76                                 </div>
77                                 <div class="form-group col-sm-3">
78                                         <label>Security Zone:<sup><b>*</b></sup></label> <select class="form-control"
79                                                 ng-disabled="temp.policy.readOnly"
80                                                 ng-model="temp.policy.securityZone"
81                                                 ng-options="option for option in securityZoneDictionaryDatas track by option"
82                                                 title="Select the dropdown value driven from Security Zone (Firewall Policy)Dictionary."></select>
83                                 </div>
84                         </div>
85                 </div>
86                 <div class="well">
87                         <div class="form-group row">
88                                 <div class="form-group col-sm-1">
89                                         <label>Rule Setup:</label><br>
90                                         <button type="button" class="btn btn-default"
91                                                 ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()" title="onClick Rule Setup row is added.">
92                                                 <i class="fa fa-plus"></i>
93                                         </button>
94                                 </div>
95                         </div>
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                                                         <select class="form-control" ng-model="choice.key"
101                                                                 ng-disabled="temp.policy.readOnly"
102                                                                 ng-options="option for option in termListDictionaryDatas track by option"
103                                                                 title="Select the dropdown value driven from Term List (Firewall Policy)Dictionary."><option
104                                                                         value="">{{choice.key}}</option></select>
105                                                 </div>
106                                                 <div class="form-group col-sm-3">
107                                                         <select class="form-control" ng-model="choice.value"
108                                                                 ng-disabled="temp.policy.readOnly"
109                                                                 ng-options="option for option in fwTagPickerDictionaryDatas track by option"
110                                                                 title="Select the dropdown value driven from FW TagPicker (Firewall Policy)Dictionary."><option
111                                                                         value="">{{choice.value}}</option></select>
112                                                 </div>
113                                                 <div class="form-group col-sm-1">
114                                                         <button type="button" class="btn btn-default"
115                                                                 ng-disabled="temp.policy.readOnly" ng-show="$last"
116                                                                 ng-click="removeChoice()" title="onClick will remove the last row">
117                                                                 <i class="fa fa-minus"></i>
118                                                         </button>
119                                                 </div>
120                                         </div>
121
122                                 </div>
123                         </div>
124                 </div>
125                 <div id="validate" style="width: 70%"></div>
126                 <br>
127                 <div class="modal-footer">
128                         <button type="button" class="btn btn-default"
129                                 herf="javascript:void(0)" ng-click="viewFWRule(temp.policy);" title="onClick Firewall Policy Rule is previewed based on the values entered in the template.">Rule
130                                 Preview</button>
131                         <button class="btn btn-primary" herf="javascript:void(0)"
132                                 ng-disabled="temp.policy.readOnly"
133                                 ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate</button>
134                         <button class="btn btn-success" herf="javascript:void(0)"
135                                 ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
136                                 ng-click="saveFWPolicy(temp);" title="Save the Policy with validated data.">Save</button>
137                         <button type="button" class="btn btn-default" ng-click="refresh();" title="Close the template.">Close</button>
138                 </div>
139         </form>
140 </div>