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 $('#vpe_pool').DataTable( {
14 "order": [[ 0, "asc" ]]
22 <div class="well well-sm">
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;
53 <div class="container-fluid">
54 <table id="vpe_pool" class="table table-hover table-condensed">
59 <th>Availability Zone</th>
60 <th>IPV4 OAM Address</th>
61 <th>Loopback IPV4 Address</th>
63 <th>VLAN ID Outer</th>
65 <th>Interface Name</th>
66 <th>Interface Speed</th>
67 <th>Interface Units</th>
71 <th>Image Filename</th>
72 <% if(priv == 'A'){ %>
78 <% rows.forEach( function(row) { %>
80 <td><%= row.aic_site_id %></td>
81 <td><%= row.vpe_name %></td>
82 <td><%= row.availability_zone %></td>
83 <td><%= row.ipv4_oam_address %></td>
84 <td><%= row.loopback0_ipv4_address %></td>
85 <td><%= row.provisioning_status %></td>
86 <td><%= row.vlan_id_outer %></td>
87 <td><%= row.vendor %></td>
88 <td><%= row.physical_intf_name %></td>
89 <td><%= row.physical_intf_speed %></td>
90 <td><%= row.physical_intf_units %></td>
91 <td><%= row.vpe_uuid %></td>
92 <td><%= row.vpe_id %></td>
93 <td><%= row.as_number %></td>
94 <td><%= row.image_filename %></td>
98 <input type="hidden" name="rf_aic_site_id" id="rf_aic_site_id" value="<%= row.aic_site_id %>"</input>
99 <input type="hidden" name="rf_vpe_name" id="rf_vpe_name" value="<%= row.vpe_name %>"</input>
100 <input type="hidden" name="rf_availability_zone" id="rf_availability_zone" value="<%= row.availability_zone %>"</input>
103 <!-- <% var _attuid = row.attuid %> -->
104 <% if(priv == 'A') { %>
105 <button type="button" class="btn btn-default btn-xs"
106 onclick="updateVpePool('<%=row.aic_site_id %>','<%=row.vpe_name %>', '<%=row.availability_zone %>','<%=row.provisioning_status %>','<%= row.ipv4_oam_address %>','<%= row.loopback0_ipv4_address %>','<%= row.vlan_id_outer %>','<%= row.vendor %>','<%= row.physical_intf_name %>','<%= row.physical_intf_speed %>','<%= row.physical_intf_units %>','<%= row.vpe_uuid %>','<%= row.vpe_id %>', '<%= row.image_filename %>', '<%= row.as_number %>' );">Update</button>
107 <button type="button" class="btn btn-default btn-xs"
108 onclick="deleteVpePool('<%= row.vpe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>');">Delete</button>
117 <% if(priv == 'A'){ %>
118 <div class="actions" style="padding:0px 25px;">
119 <form method="POST" action="/gamma/uploadVpePool" enctype="multipart/form-data">
120 <div class="form-group">
121 <label for="dest">File input</label>
122 <input name="filename" type="file" id="dest">
123 <p class="help-block">Choose a file to upload.</p>
125 <% if(priv == 'A') { %>
126 <button type="button" class="btn btn-default"
127 onclick="uploadFile(this.form);">Upload File</button>
129 <button type="button" class="btn btn-default disabled"
130 onclick="uploadFile(this.form);">Upload File</button>
138 <% include ../partials/update_vpe_pool %>
140 <% include ../partials/footer %>
143 <script type="text/javascript">
144 function updateVpePool(aic_site_id,vpe_name,availability_zone,provisioning_status,ipv4_oam_address,loopback0_ipv4_address,vlan_id_outer,vendor,physical_intf_name,physical_intf_speed,physical_intf_units,vpe_uuid,vpe_id,image_filename, as_number) {
146 document.getElementById('uf_aic_site_id').value=aic_site_id;
147 document.getElementById('uf_vpe_name').value=vpe_name;
148 document.getElementById('uf_availability_zone').value=availability_zone;
149 document.getElementById('uf_provisioning_status').value=provisioning_status;
150 document.getElementById('uf_ipv4_oam_address').value=ipv4_oam_address;
151 document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
152 document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
153 document.getElementById('uf_vendor').value=vendor;
154 document.getElementById('uf_physical_intf_name').value=physical_intf_name;
155 document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
156 document.getElementById('uf_physical_intf_units').value=physical_intf_units;
157 document.getElementById('uf_vpe_uuid').value=vpe_uuid;
158 document.getElementById('uf_vpe_id').value=vpe_id;
159 document.getElementById('uf_as_number').value=as_number;
160 document.getElementById('uf_image_filename').value=image_filename;
162 document.getElementById('uf_key_availability_zone').value=availability_zone;
163 document.getElementById('uf_key_aic_site_id').value=aic_site_id;
164 document.getElementById('uf_key_vpe_name').value=vpe_name;
165 $('#update_vpe_pool_modal').modal('show');
168 function deleteVpePool(vpe_name,aic_site_id,availability_zone) {
171 message: "Are you sure you want to delete VPE [" + aic_site_id + "][" + vpe_name + "][" + availability_zone + "] ?",
172 callback: function(result) {
175 location.assign("/gamma/deleteVpePool?aic_site_id=" + aic_site_id + "&vpe_name=" + vpe_name + "&availability_zone=" + availability_zone);