3 Copyright 2016-2017, Huawei Technologies Co., Ltd.
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
9 http://www.apache.org/licenses/LICENSE-2.0
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.
23 <meta charset="UTF-8">
25 <link href="css/bootstrap.min.css" rel="stylesheet"/>
26 <link href="css/jquery.dataTables.min.css" rel="stylesheet"/>
27 <link href="css/VMMain.css" rel="stylesheet"/>
28 <link href="css/bootstrap-table.min.css" rel="stylesheet"/>
29 <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
30 <script type="text/javascript" src="js/bootstrap.min.js"></script>
31 <script type="text/javascript" src="js/brs.js"></script>
32 <script type="text/javascript" src="js/underlay.js"></script>
33 <script type="text/javascript" src="js/bootstrap-table.min.js"></script>
34 <script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
43 .fixed-table-container tbody td .th-inner,
44 .fixed-table-container thead th .th-inner {
47 .fixed-table-pagination .pagination-info {
48 display: none !important;
50 .table tbody tr:hover td,
51 .table tbody tr.odd:hover td {
52 background-color: #e6fbe0 !important;
55 background: url(delete.png) no-repeat !important;
60 table tr.openoTable_row_selected td {
61 background: #e8f8fe!important;
62 border-bottom: 1px solid #e8e8e8!important;
73 float:none !important;
74 display:inline-block !important;
76 vertical-align: middle;
81 float:none !important;
82 display:inline-block !important;
86 float:none !important;
87 display:inline-block !important;
90 .fixed-table-pagination{
95 <script type="text/javascript">
96 $(document).ready(function () {
99 var jsondata = loadUnderlayData();
100 $('#tbl_overlay').bootstrapTable({
101 //Assigning data to table
104 $('#underlayTpDataTable').bootstrapTable({
105 //Assigning data to table
108 $('.table tbody tr').click(function () {
109 $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
112 $('#sai').on('sort.bs.table', function () {
115 }).on('click-row.bs.table', function () {
118 $('.table tbody tr').click(function() {
120 $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
125 var serviceId = getQueryStringValue("serviceId");
126 console.log("underlayvpn - serviceId : " + serviceId);
130 function getQueryStringValue (key) {
131 var params = new URLSearchParams(window.location.search.slice(1));
132 return params.get(key);
135 function operateFormatter(value, row, index) {
137 '<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />'
140 window.operateEvents = {
141 'click .siteDeleteImg': function(e, value, row, index) {
142 // TO DO ajex call for delete
143 console.log(value, row, index);
146 /* function nameFormatter(value, row) {
147 jsonForTP = row.json.data;
148 var name=JSON.stringify(row.json.data);
149 var temp = "<a class='underlayNameLink' onclick='getMethod(this)' name='"+ name + "' data-events='operateEventsU'>" + value + "</a>";
152 function getMethod(obj) {
153 //Update the lower table here
154 $('#underlayTpDataTable').bootstrapTable(
155 //Assigning data to table
156 "append", JSON.parse(obj.name)
163 <body id="open_base_vpn_cotentBody" class="cotentBody ng-scope">
164 <div class="container-fluid ms-controller">
165 <h3>Underlay VPN</h3>
166 <!-- <div class="row-fluid" data-name="table_zone">
167 <div id='ict_virtualApplication_table_div'>
170 <table class="table table-striped" id="tbl_overlay" data-pagination="true" data-page-size="5" data-pagination-first-text="First" data-pagination-pre-text="Previous" data-pagination-next-text="Next" data-pagination-last-text="Last">
171 <thead id="sunderlayTable_thead" class="openo-table-thead" style="background:#ECECEC">
174 <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-formatter="nameFormatter" data-field="underlayName" data-sortable="true">
175 <div class="openo-table-th-border"></div>
176 <div class="DataTables_sort_wrapper openo-ellipsis ">
177 <span id="underlayName_sorticon" class="openo-table-th-sorticon overflow_elip openoTable_sortable leftHeaderAlign openo-table-disable-element ">Name
181 <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="underlayTenantName" data-sortable="true">
182 <div class="openo-table-th-border"></div>
183 <div class="DataTables_sort_wrapper openo-ellipsis ">
184 <span id="underlayTenantName_sorticon" class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">State
188 <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="underlayType" data-sortable="true">
189 <div class="openo-table-th-border"></div>
190 <div class="DataTables_sort_wrapper openo-ellipsis ">
191 <span id="underlayType_sorticon" class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Description
195 <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="underlayDescription" align="center" data-formatter="operateFormatter" data-events="operateEvents">
196 <div class="openo-table-th-border"></div>
197 <div class="DataTables_sort_wrapper openo-ellipsis ">
198 <span id="underlayDescription_sorticon" class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Action
212 <button class="table-btn delete-btn"></button>
221 <button class="table-btn delete-btn"></button>
230 <button class="table-btn delete-btn"></button>
239 <button class="table-btn delete-btn"></button>
251 <div class="row-fluid" data-name="table_zone">
252 <div id='ict_virtualApplication_table_div'>
255 <table class="table-striped table " id="sai" data-pagination="true" data-pagination-first-text="First"
256 data-pagination-pre-text="Previous" data-pagination-next-text="Next" data-pagination-last-text="Last"
257 data-filter-control="true">
258 <thead style="background:#ECECEC">
260 <th data-field="name" data-sortable="true" data-filter-control="input">Name</th>
261 <th data-field="state" data-sortable="true" data-filter-control="input">State</th>
262 <th data-field="desc" data-sortable="true" data-filter-control="input">Description</th>
263 <th data-field="action" data-sortable="">Action</th>
273 <iframe src="UnderLay_TP.html" style="width:100%;height:450px;" name="targetframe" allowTransparency="true" scrolling="no" frameborder="0">
276 <div id="filterTpLogicalType_select_popupcontainer" class="openo openo-select-popup-container openo-hide"
277 style="width: 155px; max-height: 130px; left: 628px; top: 104px; z-index: 1761;">
278 <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_0"><label
279 class="openo-ellipsis openo-select-blank-item" style="width: 100%; display: block; height: 20px;"></label>
281 <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_1"><label
282 class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">ETH</label></div>
283 <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_2"><label
284 class="openo-ellipsis " style="width: 100%; display: block; height: 20px;" title="POS">POS</label></div>
285 <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_3"><label
286 class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Trunk</label></div>
287 <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_4"><label
288 class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Loopback</label></div>