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 $('#vplspe_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;
52 <div class="container-fluid">
53 <table id="vplspe_pool" class="table table-hover table-condensed">
58 <th>Availability Zone</th>
59 <th>Interface Name</th>
60 <th>Interface Speed</th>
61 <th>Interface Units</th>
62 <th>Loopback IPV4 Address</th>
63 <th>VLAN ID Outer</th>
65 <th>Image Filename</th>
68 <% if(priv == 'A'){ %>
74 <% rows.forEach( function(row) { %>
76 <td><%= row.vplspe_name %></td>
77 <td><%= row.aic_site_id %></td>
78 <td><%= row.availability_zone %></td>
79 <td><%= row.physical_intf_name %></td>
80 <td><%= row.physical_intf_speed %></td>
81 <td><%= row.physical_intf_units %></td>
82 <td><%= row.loopback0_ipv4_address %></td>
83 <td><%= row.vlan_id_outer %></td>
84 <td><%= row.vplspe_uuid %></td>
85 <td><%= row.image_filename %></td>
86 <td><%= row.provisioning_status %></td>
87 <td><%= row.vendor %></td>
88 <% if(priv == 'A') { %>
90 <button type="button" class="btn btn-default btn-xs"
91 onclick="updateVplspePool('<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.vplspe_name %>','<%= row.physical_intf_name %>','<%= row.physical_intf_speed %>','<%= row.physical_intf_units %>','<%= row.loopback0_ipv4_address %>','<%= row.vlan_id_outer %>','<%= row.vplspe_uuid %>','<%= row.image_filename %>','<%= row.provisioning_status %>','<%= row.vendor %>');">Update</button>
92 <button type="button" class="btn btn-default btn-xs"
93 onclick="deleteVplspePool('<%= row.vplspe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.physical_intf_name %>');">Delete</button>
103 <% if(priv == 'A'){ %>
104 <div class="actions" style="padding:0px 25px;">
105 <form method="POST" action="/gamma/uploadVplspePool" enctype="multipart/form-data">
106 <div class="form-group">
107 <label for="dest">File input</label>
108 <input name="filename" type="file" id="dest">
109 <p class="help-block">Choose a file to upload.</p>
111 <% if(priv == 'A') { %>
112 <button type="button" class="btn btn-default"
113 onclick="uploadFile(this.form);">Upload File</button>
115 <button type="button" class="btn btn-default disabled"
116 onclick="uploadFile(this.form);">Upload File</button>
125 <% include ../partials/update_vplspe_pool %>
127 <% include ../partials/footer %>
130 <script type="text/javascript">
131 function updateVplspePool(aic_site_id,availability_zone,vplspe_name,physical_intf_name,physical_intf_speed,physical_intf_units,loopback0_ipv4_address,vlan_id_outer,vplspe_uuid,image_filename,provisioning_status,vendor) {
133 document.getElementById('uf_aic_site_id').value=aic_site_id;
134 document.getElementById('uf_availability_zone').value=availability_zone
135 document.getElementById('uf_vplspe_name').value=vplspe_name;
136 document.getElementById('uf_physical_intf_name').value=physical_intf_name;
137 document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
138 document.getElementById('uf_physical_intf_units').value=physical_intf_units;
139 document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
140 document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
141 document.getElementById('uf_vplspe_uuid').value=vplspe_uuid;
142 document.getElementById('uf_image_filename').value=image_filename;
143 document.getElementById('uf_provisioning_status').value=provisioning_status;
144 document.getElementById('uf_vendor').value=vendor;
146 document.getElementById('uf_key_aic_site_id').value=aic_site_id;
147 document.getElementById('uf_key_vplspe_name').value=vplspe_name;
148 document.getElementById('uf_key_availability_zone').value=availability_zone
149 document.getElementById('uf_key_physical_intf_name').value=physical_intf_name;
150 $('#update_vplspe_pool_modal').modal('show');
153 function deleteVplspePool(vplspe_name,aic_site_id,availability_zone,physical_intf_name) {
156 message: "Are you sure you want to delete VPLSPE [" + vplspe_name + "][" + aic_site_id + "][" + availability_zone + "][" + physical_intf_name + "] ?",
157 callback: function(result) {
160 location.assign("/gamma/deleteVplspePool?aic_site_id=" + aic_site_id + "&vplspe_name=" + vplspe_name + "&availability_zone=" + availability_zone + "&physical_intf_name=" + physical_intf_name);