Initial OpenECOMP policy/engine commit
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / app / policyApp / policy-models / Editor / PolicyTemplates / FirewallPolicyTemplate.html
1 <!--
2   ============LICENSE_START=======================================================
3   ECOMP Policy Engine
4   ================================================================================
5   Copyright (C) 2017 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
21 <div ng-app= "abs" ng-controller= "fwPolicyController">
22 <div class="modal__content">
23       <div>
24             <label>Policy Name:<sup><b>*</b></sup> </label><br>
25             <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName"  style="width:800px;"/>
26       </div>
27       <div>
28              <label>Description:</label><br>
29              <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.policyDescription" style="width:800px;"/>
30       </div>
31          <div class="fn-ebz-container" >
32                 <label>Risk Type:<sup><b>*</b></sup></label>
33                         <div>
34                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.riskType"  ng-options="option for option in riskTypeDictionaryDatas track by option"></select>
35                         </div>
36                         <p><span ng-show="validateRiskType" style="color:red">Risk Type Field shouldn't be Empty</span></p>
37         </div> 
38          <div class="fn-ebz-container" >
39                 <label>Risk Level:<sup><b>*</b></sup></label>
40                         <div>
41                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.riskLevel"  ng-options="option for option in riskLevelDatas track by option"></select>
42                         </div>
43                         <p><span ng-show="validateRiskLevel" style="color:red">Risk Level Field shouldn't be Empty</span></p>
44         </div> 
45          <div class="fn-ebz-container" >
46                 <label>Guard:<sup><b>*</b></sup></label>
47                         <div>
48                                 <select class="form-field"  style="width:450px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.guard"  ng-options="option for option in guardDatas track by option"></select>
49                         </div>
50                         <p><span ng-show="validateGuard" style="color:red">Guard Field shouldn't be Empty</span></p>
51                 </div> 
52         <div class ="fn-ebz-container">
53         <label>Time to Live Date:<sup><b>*</b></sup></label>
54         <div>
55                         <input type="date" name="ttlDate" class="date" ng-model="temp.policy.ttlDate"/>
56                 </div>
57         </div>           
58         <div>
59             <label>Config Name:<sup><b>*</b></sup></label><br>
60             <input type="text" class="form-control" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.configName" style="width:800px;"/>
61        </div>
62       <div>
63             <label>Security Zone:<sup><b>*</b></sup></label><br>
64             <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.securityZone"  ng-options="option for option in securityZoneDictionaryDatas track by option"></select>
65       </div>
66        <div ng-if ="temp.policy.fwPolicyType == 'Child Policy'">
67             <label>Select the Parent to assosciate:<sup><b>*</b></sup></label><br>
68             <select class="form-field" style="width:400px;" ng-disabled ="temp.policy.readOnly" ng-model="temp.policy.parentForChild"  ng-options="option for option in fwParentListDictionaryDatas track by option"></select>
69       </div>
70          <br/>
71             <div class="fn-ebz-container" ng-if ="temp.policy.fwPolicyType == 'Parent Policy'">
72             <label>Parent Dictionary Setup:</label><br>
73              <form  method="post" class="form-horizontal" >
74                         <div class="form-group">
75                                 <div class="col-xs-1">
76                                 <button type="button" class="btn btn-default" ng-disabled ="temp.policy.readOnly" ng-click="addNewFWDictList()"><i class="fa fa-plus"></i></button>
77                                 </div>
78                         </div>
79                         <div  data-ng-repeat="choice in temp.policy.fwattributes" class="form-horizontal" >
80                                 <div  class="fn-ebz-container">
81                                 <select  class="form-field" ng-model="choice.option" ng-disabled ="temp.policy.readOnly" ng-options="option for option in fwDictListDictionaryDatas track by option" ></select>
82                                 </div>
83                                 <div  class="fn-ebz-container">
84                                 <button type="button" class="btn btn-default" ng-disabled ="temp.policy.readOnly" ng-show="$last" ng-click="removefwDictChoice()"><i class="fa fa-minus"></i></button>
85                                 </div>
86                         </div>
87                 </form> 
88                 </div> 
89          <br/>
90         <div class="fn-ebz-container" >
91             <label>Rule Setup:</label><br>
92              <form  method="post" class="form-horizontal" >
93                         <div class="form-group">
94                                 <div class="col-xs-1">
95
96                                 <button type="button" class="btn btn-default" ng-disabled ="temp.policy.readOnly" ng-click="addNewChoice()"><i class="fa fa-plus"></i></button>
97                                 </div>
98                         </div>
99                         <div  data-ng-repeat="choice in temp.policy.attributes" class="form-horizontal" >
100                                 <div  class="fn-ebz-container">
101                                 <select  class="form-field" ng-model="choice.option" ng-disabled ="temp.policy.readOnly" ng-options="option for option in termListDictionaryDatas track by option" ><option value="">{{choice.option}}</option></select>
102                                 </div>
103                                 <div  class="fn-ebz-container">
104                                 <button type="button" class="btn btn-default" ng-disabled ="temp.policy.readOnly" ng-show="$last" ng-click="removeChoice()"><i class="fa fa-minus"></i></button>
105                                 </div>
106                         </div>
107                 </form> 
108                 </div> 
109          </div>
110         <div class="modal__footer">
111                 <button type="button" class="btn btn-default"  herf="javascript:void(0)" ng-click="viewFWRule(temp.policy);">Rule Preview</button>
112             <button class="button button--primary button--small" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="validatePolicy(temp.policy);">Validate</button>
113             <button class="btn btn-success" herf="javascript:void(0)" ng-disabled ="temp.policy.readOnly" ng-click="saveFWPolicy(temp);">Save</button>
114             <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Close</button>
115         </div>
116 </div>