Initialize the UI code
[holmes/rule-management.git] / rulemgt / src / main / frontend / src / public / framework / browser / templates / management.html
1 <!--
2
3     Copyright 2016-2017, Huawei Technologies Co., Ltd.
4
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8
9             http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16
17 -->
18
19 <h4>{{message}}</h4>
20 <br><br>
21 <div id="provinceAction" ng-init="init()">
22     <!--<button ng-click="showAddModal()" class="btnDefault pull-left">Add</button>-->
23     <!--<button ng-click="deleteData()" class="btnDefault pull-left prvdel">Delete Selected</button>-->
24 </div>
25 <br>
26 <br>
27 <!--<table id="provinceTable" class="table table-bordered table-striped">
28     <tr>
29         <th class="chkboxAlign"><input type="checkbox"  ng-model="selectAll" ng-click="checkAll()" /></th>
30         <th>Province Name</th>
31         <th>IP Address</th>
32         <th>Port</th>
33         <th></th>
34     </tr>
35     <tr ng-repeat="data in provinceData">
36         <td>
37             <input type="checkbox" ng-model="data.select">&lt;!&ndash;ng-true-value="'data.id'" ng-false-value="''"  ng-model="province.rows[$index]"&ndash;&gt;
38         </td>
39         <td class="tableAlign">{{data.province_name}}</td>
40         <td class="tableAlign">{{data.ip}}</td>
41         <td class="tableAlign">{{data.port}}</td>
42         <td>
43             <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
44             <span class="pull-right glyphicon glyphicon-trash" ng-click="editData(data.id)" style="cursor: pointer;margin: 0 5px"></span>
45         </td>
46     </tr>
47 </table>-->
48
49 <table ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true">
50     <tr ng-repeat="provinceData in $data">
51         <td header="'ng-table/headers/checkbox.html'">
52             <input type="checkbox" ng-model="checkboxes.items[provinceData.id]" />
53         </td>
54         <td title="'Name'" filter="{ province_name: 'text'}" sortable="'province_name'">
55             {{provinceData.province_name}}
56         </td>
57         <td title="'IP Address'" filter="{ ip: 'text'}" sortable="'ip'">
58             {{provinceData.ip}}
59         </td>
60         <td title="'Port'" filter="{ port: 'number'}" sortable="'port'">
61             {{provinceData.port}}
62         </td>
63         <td title="'Action'">
64             <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"></span>
65             <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(provinceData.id)" style="cursor: pointer;margin: 0 5px"></span>
66         </td>
67     </tr>
68 </table>
69
70
71 <script type="text/ng-template" id="ng-table/headers/checkbox.html">
72     <input type="checkbox" ng-model="checkboxes.checked" name="filter-checkbox" value="" />
73 </script>
74
75 <div id="myTable"></div>
76
77
78 <!-- Modal -->
79 <div id="myModal" class="modal fade" role="dialog">
80     <div class="modal-dialog">
81
82         <!-- Modal content-->
83         <div class="modal-content">
84             <div class="modal-header">
85                 <button type="button" class="close" data-dismiss="modal">&times;</button>
86                 <h5 class="modal-title titlestyle">Modal Header</h5>
87             </div>
88             <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->
89                 <div class="modal-body">
90
91                     <div class="form-group row">
92                         <label class="col-xs-4 col-form-label labelstyle">Name</label>
93                         <div class="col-xs-8 provinceName" >
94                             <!--<input class="form-control" ng-model="province.province_name" type="text" value="" placeholder="Province Name" id="pname" required><br>-->
95                         </div>
96                     </div>
97                     <div class="form-group row">
98                         <label class="col-xs-4 col-form-label labelstyle">IP Address</label>
99                         <div class="col-xs-8 ipAddress" >
100                             <!--<input class="form-control" ng-model="province.ip" type="ipv4" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" value="" placeholder="IP Address" id="ipaddress" required><br>-->
101                         </div>
102                     </div>
103                     <div class="form-group row">
104                         <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label>
105                         <div class="col-xs-8 port" >
106                             <!--<input class="form-control" ng-model="province.port" type="number" value="" placeholder="Port" id="port"  required>-->
107
108                         </div>
109                     </div>
110
111                     <!--<input type="submit" class="btn btn-default" value="validate"/>-->
112
113                 </div>
114
115                 <div id="footerBtns" class="modal-footer">
116                     <!--<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>-->
117                     <!--<input type="submit" class="btn btn-default" value="Submit"/>-->
118                     <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
119                 </div>
120             </form>
121         </div>
122
123
124     </div>
125 </div>
126
127 <div class="shortnote">
128     <div class="shortnoteHeader">ShortNote</div>
129     <div class="shortnoteText"> {{provinceTipData}}</div>
130 </div>