4 <meta charset="UTF-8" />
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <% include ../partials/head %>
7 <% include ../partials/header %>
8 <script type="text/javascript" src="/javascripts/admportal.js" async></script>
9 <title>SDN-C AdminPortal</title>
12 $(document).ready(function() {
13 $('#nb_vlan_pool').DataTable( {
14 "order": [[ 0, "asc" ]]
22 <div class="well well-sm">
23 <h3>NetBond VLAN Pools</h3>
26 <% if ( typeof result != 'undefined' ) {
27 if (result.code.length > 0) {
28 if ( result.code == 'success' ) { %>
29 <div class='alert alert-success' role='alert'>
31 for ( x in result.msg ){ %>
32 <div><%= result.msg[x] %></div>
36 <div class='alert alert-danger' role='danger'>
38 for ( x in result.msg ){ %>
39 <div><%= result.msg[x] %></div>
46 <% if( typeof privilege != 'undefined'){
47 var priv = privilege.privilege;
52 <div class="container-fluid">
54 <table id="nb_vlan_pool" class="table table-hover table-condensed">
58 <th>Availability Zone</th>
64 <% if(priv == 'A'){ %>
70 <% rows.forEach( function(row) { %>
72 <td><%= row.aic_site_id %></td>
73 <td><%= row.availability_zone %></td>
74 <td><%= row.vlan_plan_id %></td>
75 <td><%= row.plan_type %></td>
76 <td><%= row.purpose %></td>
77 <td><%= row.vlan_id %></td>
78 <td><%= row.status %></td>
79 <% if(priv == 'A') { %>
81 <button type="button" class="btn btn-default btn-xs"
82 onclick="updateNbVlanPool('<%= row.aic_site_id %>', '<%= row.availability_zone %>',
83 '<%= row.vlan_plan_id %>', '<%= row.plan_type %>', '<%= row.purpose %>',
84 '<%= row.vlan_id %>', '<%= row.status %>');">Update</button>
95 <% include ../partials/nb_vlan_pool %>
97 <% include ../partials/footer %>
100 <script type="text/javascript">
102 function updateNbVlanPool(aic_site_id,availability_zone,vlan_plan_id,plan_type,purpose,vlan_id,pstatus) {
104 document.getElementById('uf_key_aic_site_id').value=aic_site_id;
105 document.getElementById('uf_key_availability_zone').value=availability_zone;
106 document.getElementById('uf_key_vlan_plan_id').value=vlan_plan_id;
107 document.getElementById('uf_key_plan_type').value=plan_type;
108 document.getElementById('uf_key_purpose').value=purpose;
109 document.getElementById('uf_key_vlan_id').value=vlan_id;
110 document.getElementById('uf_status').value=pstatus;
112 $('#update_nb_vlan_pool').modal('show');
115 function saveNbVlanPool(form)