summaryrefslogtreecommitdiffstats
path: root/admportal/views/gamma
diff options
context:
space:
mode:
authorTimoney, Daniel (dt5972) <dtimoney@att.com>2017-02-15 10:37:53 -0500
committerTimoney, Daniel (dt5972) <dtimoney@att.com>2017-02-15 10:40:37 -0500
commit324ee36fe31763e507b422ab0a88e4230045e205 (patch)
treed0b04520f6657601c918ce63fd27575977624187 /admportal/views/gamma
parentf0c97e8db427481e28c0a16b789bc73801b35e47 (diff)
Initial commit for OpenECOMP SDN-C OA&M
Change-Id: I7ab579fd0d206bf356f36d52dcdf4f71f1fa2680 Signed-off-by: Timoney, Daniel (dt5972) <dtimoney@att.com> Former-commit-id: 2a9f0edd09581f907e62ec4689b5ac94dd5382ba
Diffstat (limited to 'admportal/views/gamma')
-rw-r--r--admportal/views/gamma/list.ejs162
-rw-r--r--admportal/views/gamma/listAicAvailZone.ejs166
-rw-r--r--admportal/views/gamma/listAicSwitch.ejs156
-rw-r--r--admportal/views/gamma/listServiceHoming.ejs241
-rw-r--r--admportal/views/gamma/listServiceHomingRollback.ejs117
-rw-r--r--admportal/views/gamma/listSite.ejs171
-rw-r--r--admportal/views/gamma/listVpePool.ejs194
-rw-r--r--admportal/views/gamma/listVplspePool.ejs178
-rw-r--r--admportal/views/gamma/nbVlanPool.ejs124
-rw-r--r--admportal/views/gamma/nbVlanRange.ejs205
-rw-r--r--admportal/views/gamma/networkProfile.ejs164
11 files changed, 1878 insertions, 0 deletions
diff --git a/admportal/views/gamma/list.ejs b/admportal/views/gamma/list.ejs
new file mode 100644
index 00000000..cf89a093
--- /dev/null
+++ b/admportal/views/gamma/list.ejs
@@ -0,0 +1,162 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#vlan_id_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NoD VLAN ID POOL</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="vlan_id_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>Purpose</th>
+ <th>VLAN ID</th>
+ <th>VLPSPE Name</th>
+ <th>Availability Zone</th>
+ <th>Status</th>
+ <th>Svc Instance ID</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.vlan_id %></td>
+ <td><%= row.vplspe_name %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.status %></td>
+ <td><%= row.svc_instance_id %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateVlanPool('<%=row.aic_site_id %>','<%= row.availability_zone %>',
+ '<%= row.purpose %>','<%= row.vlan_id %>','<%= row.status %>',
+ '<%= row.svc_instance_id %>','<%= row.vplspe_name %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVlanPool('<%=row.aic_site_id %>', '<%= row.purpose %>',
+ '<%= row.vlan_id %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVLAN" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vlan_id_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateVlanPool(aic_site_id,availability_zone,purpose,vlan_id,status,svc_instance_id,vplspe_name) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_purpose').value=purpose;
+ document.getElementById('uf_vlan_id').value=vlan_id;
+ document.getElementById('uf_status').value=status;
+ document.getElementById('uf_svc_instance_id').value=svc_instance_id;
+ document.getElementById('uf_vplspe_name').value=vplspe_name;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_purpose').value=purpose;
+ document.getElementById('uf_key_vlan_id').value=vlan_id;
+ $('#update_vlan_id_pool_modal').modal('show');
+}
+
+function deleteVlanPool(aic_site_id,purpose,vlan_id) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VLAN Id [" + aic_site_id + "][" + purpose + "][" + vlan_id + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVlanPool?aic_site_id=" + aic_site_id + "&purpose=" + purpose + "&vlan_id=" + vlan_id);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listAicAvailZone.ejs b/admportal/views/gamma/listAicAvailZone.ejs
new file mode 100644
index 00000000..7d0b7bde
--- /dev/null
+++ b/admportal/views/gamma/listAicAvailZone.ejs
@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#availability_zone').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>AIC Availabilty Zone Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="availability_zone" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>Availability Zone</th>
+ <th>Token</th>
+ <th>Service Type</th>
+ <th>Status</th>
+ <th>VNF ID</th>
+ <th>VNF Type</th>
+ <th>Hypervisor</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.token %></td>
+ <td><%= row.service_type %></td>
+ <td><%= row.status %></td>
+ <td><%= row.vnf_id %></td>
+ <td><%= row.vnf_type %></td>
+ <td><%= row.hypervisor %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicAvailZone('<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.token %>','<%= row.service_type %>','<%= row.status %>','<%= row.vnf_id %>','<%= row.vnf_type %>','<%= row.hypervisor %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteZone('<%=row.aic_site_id %>','<%= row.availability_zone %>', '<%= row.token %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicAvailZone" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_avail_zone %>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicAvailZone(aic_site_id,availability_zone,token,service_type,status,vnf_id,vnf_type,hypervisor) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_token').value=token;
+ document.getElementById('uf_service_type').value=service_type;
+ document.getElementById('uf_status').value=status;
+ document.getElementById('uf_vnf_id').value=vnf_id;
+ document.getElementById('uf_vnf_type').value=vnf_type;
+ document.getElementById('uf_hypervisor').value=hypervisor;
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_availability_zone').value=availability_zone
+ document.getElementById('uf_key_token').value=token;
+ $('#update_aic_avail_zone_modal').modal('show');
+}
+
+function deleteZone(siteid,azone,token) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete zone [" + siteid + "][" + azone + "][" + token + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteZone?siteid=" + siteid + "&azone=" + azone + "&token=" + token);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listAicSwitch.ejs b/admportal/views/gamma/listAicSwitch.ejs
new file mode 100644
index 00000000..659652c3
--- /dev/null
+++ b/admportal/views/gamma/listAicSwitch.ejs
@@ -0,0 +1,156 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+ <script class="init">
+ $(document).ready(function() {
+ $('#switch').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+ } );
+ </script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>AIC Switch</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="switch" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Physical Network Name</th>
+ <th>Switch Name</th>
+ <th>AIC Site ID</th>
+ <th>UUID</th>
+ <th>Availability Zone</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.physical_network_name %></td>
+ <td><%= row.switch_name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.uuid %></td>
+ <td><%= row.availability_zone %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicSwitch('<%= row.physical_network_name %>','<%= row.switch_name %>','<%=row.aic_site_id %>','<%= row.uuid %>','<%=row.availability_zone %>');">Update</button>
+
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteSwitch('<%=row.physical_network_name %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+
+<!--
+ <% if(priv == 'A') { %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicSwitch" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_switch %>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicSwitch(physical_network_name,switch_name,aic_site_id,uuid,availability_zone) {
+
+ document.getElementById('uf_physical_network_name').value=physical_network_name;
+ document.getElementById('uf_switch_name').value=switch_name;
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_uuid').value=uuid;
+ document.getElementById('uf_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_physical_network_name').value=physical_network_name;
+ $('#update_aic_switch_modal').modal('show');
+}
+function deleteSwitch(pnetwork_name) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this switch [" + pnetwork_name + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteSwitch?phy_network_name=" + pnetwork_name);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listServiceHoming.ejs b/admportal/views/gamma/listServiceHoming.ejs
new file mode 100644
index 00000000..e25777a9
--- /dev/null
+++ b/admportal/views/gamma/listServiceHoming.ejs
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Homing</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if (priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_service_homing">
+ Add Service Homing
+ </button>
+ </div>
+ <% } %>
+
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Service Type</th>
+ <th>*LATA</th>
+ <th>*Hubbing City Type</th>
+ <th>Latitude</th>
+ <th>Longitude</th>
+ <th>*Primary Site Name</th>
+ <th>Secondary Site Name</th>
+ <th>Tertiary Site Name</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.service_type %></td>
+ <td><%= row.lata %></td>
+ <td><%= row.hubbing_city_type%></td>
+ <td><%= row.latitude %></td>
+ <td><%= row.longitude %></td>
+ <td><%= row.primary_aic_site_name %></td>
+ <td><%= row.secondary_aic_site_name %></td>
+ <td><%= row.tertiary_aic_site_name %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateServiceHoming('<%=row.service_type %>','<%= row.lata %>','<%= row.hubbing_city_type %>','<%= row.latitude %>','<%= row.longitude %>','<%= row.primary_aic_site_name %>','<%= row.secondary_aic_site_name %>','<%= row.tertiary_aic_site_name %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteServiceHoming('<%= row.service_type %>','<%=row.lata %>','<%= row.hubbing_city_type %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <div class container>
+ <p><%= i %> rows in table.</p>
+ </div>
+
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadServiceHoming" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+
+ </form>
+ </div>
+ <% } %>
+</div>
+
+<% include ../partials/add_service_homing %>
+<% include ../partials/update_service_homing %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function submitServiceHoming(form)
+{
+ var errorMsg='';
+ var lata='';
+ var hubbing_city_type='';
+ var primary_aic_site_name='';
+ var latitude='';
+ var longitude='';
+
+ if ( form.name == 'addForm' )
+ {
+ lata = form.nf_lata;
+ hubbing_city_type = form.nf_hubbing_city_type;
+ primary_aic_site_name = form.nf_primary_aic_site_name;
+ latitude = form.nf_latitude;
+ longitude = form.nf_longitude;
+ }
+ else
+ {
+ lata = form.uf_lata;
+ hubbing_city_type = form.uf_hubbing_city_type;
+ primary_aic_site_name = form.uf_primary_aic_site_name;
+ latitude = form.uf_latitude;
+ longitude = form.uf_longitude;
+ }
+
+
+ if ( (lata.value == null) || (lata.value == "") || isblank(lata.value) )
+ {
+ errorMsg += 'LATA is required.<br>';
+ }
+ if ( (hubbing_city_type.value == null) || (hubbing_city_type.value == "") || isblank(hubbing_city_type.value) )
+ {
+ errorMsg += 'Hubbing City Type is required.<br>';
+ }
+ if ( (primary_aic_site_name.value == null) || (primary_aic_site_name.value == "") || isblank(primary_aic_site_name.value) ){
+ errorMsg += 'Primary Site Name is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !isDigit(lata.value) )
+ {
+ bootbox.alert('LATA must be a number.');
+ return;
+ }
+ if ( latitude.length > 0 )
+ {
+ if ( !isFloat(latitude.value) )
+ {
+ bootbox.alert('Latitude must be a float.');
+ return;
+ }
+ }
+ if ( longitude.length > 0 )
+ {
+ if ( !isFloat(longitude.value) )
+ {
+ bootbox.alert('Longitude must be a float.');
+ return;
+ }
+ }
+ form.submit();
+}
+
+function updateServiceHoming(service_type,lata,hubbing_city_type,latitude,longitude,primary_aic_site_name,secondary_aic_site_name,tertiary_aic_site_name) {
+
+ document.getElementById('uf_service_type').value=service_type;
+ document.getElementById('uf_lata').value=lata
+ document.getElementById('uf_hubbing_city_type').value=hubbing_city_type;
+ document.getElementById('uf_latitude').value=latitude;
+ document.getElementById('uf_longitude').value=longitude;
+ document.getElementById('uf_primary_aic_site_name').value=primary_aic_site_name;
+ document.getElementById('uf_secondary_aic_site_name').value=secondary_aic_site_name;
+ document.getElementById('uf_tertiary_aic_site_name').value=tertiary_aic_site_name;
+
+ document.getElementById('uf_key_service_type').value=service_type;
+ document.getElementById('uf_key_lata').value=lata
+ document.getElementById('uf_key_hubbing_city_type').value=hubbing_city_type;
+
+ $('#update_service_homing').modal('show');
+}
+
+function deleteServiceHoming(service_type,lata,hubbing_city_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete SERVICE_HOMING [" + service_type + "]" + "[" + lata + "][" + hubbing_city_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteServiceHoming?service_type=" + service_type + "&lata=" + lata + "&hubbing_city_type=" + hubbing_city_type);
+
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listServiceHomingRollback.ejs b/admportal/views/gamma/listServiceHomingRollback.ejs
new file mode 100644
index 00000000..a7b5ef5a
--- /dev/null
+++ b/admportal/views/gamma/listServiceHomingRollback.ejs
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Service Homing Rollback</h3>
+<p>(This table data was saved during the last import of SERVICE_HOMING data.)</p>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Service Type</th>
+ <th>LATA</th>
+ <th>Hubbing City Type</th>
+ <th>Latitude</th>
+ <th>Longitude</th>
+ <th>Primary Site Name</th>
+ <th>Secondary Site Name</th>
+ <th>Tertiary Site Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <% var i=0; rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.service_type %></td>
+ <td><%= row.lata %></td>
+ <td><%= row.hubbing_city_type%></td>
+ <td><%= row.latitude %></td>
+ <td><%= row.longitude %></td>
+ <td><%= row.primary_aic_site_name %></td>
+ <td><%= row.secondary_aic_site_name %></td>
+ <td><%= row.tertiary_aic_site_name %></td>
+ </tr>
+ <% i++; }); %>
+ </tbody>
+ </table>
+
+ <div class container>
+ <p><%= i %> rows in table.</p>
+ </div>
+
+ <% if (priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="rollback();">Rollback</button>
+ <% } %>
+</div>
+
+<footer>
+ <% include ../partials/footer %>
+</footer>
+<script type="text/javascript">
+
+function rollback()
+{
+ bootbox.confirm({
+ message: "This Rollback will overlay the current SERVICE_HOMING table. Are you sure you want to Rollback the SERVICE_HOMING table?",
+ callback: function(result){
+ if(result)
+ {
+ location.assign("/gamma/rollbackServiceHoming");
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm:{
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listSite.ejs b/admportal/views/gamma/listSite.ejs
new file mode 100644
index 00000000..9287ad5c
--- /dev/null
+++ b/admportal/views/gamma/listSite.ejs
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+<script class="init">
+ $(document).ready(function() {
+ $('#site').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+ <h3>AIC Site</h3>
+</div>
+<!--
+<div class="actions" style="padding:0px 25px;">
+<h2>AIC SITE</h2>
+</div>
+-->
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="site" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>AIC Site ID</th>
+ <th>VCenter URL</th>
+ <th>OAM Gateway Address</th>
+ <th>VCenter User</th>
+ <th>VCenter Passwd</th>
+ <th>City</th>
+ <th>State</th>
+ <th>Status</th>
+ <% if(priv == 'A') { %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.vcenter_url %></td>
+ <td><%= row.oam_gateway_addr %></td>
+ <td><%= row.vcenter_username %></td>
+ <td>*****</td>
+ <td><%= row.city %></td>
+ <td><%= row.state %></td>
+ <td><%= row.operational_status %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateAicSite('<%= row.name %>','<%=row.aic_site_id %>',
+ '<%= row.vcenter_url %>','<%= JSON.stringify(row.vcenter_username).replace(/\"/g,'') %>',
+ '<%= row.vcenter_passwd %>', '<%= row.city %>','<%= row.state %>',
+ '<%= row.operational_status %>', '<%= row.oam_gateway_addr %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteSite('<%=row.aic_site_id %>');">Delete</button>
+ </td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A') { %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadAicSite" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_aic_site %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function updateAicSite(name,aic_site_id,vcenter_url,vcenter_username,vcenter_passwd,city,state,operational_status,oam_gateway_addr)
+{
+ document.getElementById('uf_name').value=name
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_vcenter_url').value=vcenter_url;
+ document.getElementById('uf_vcenter_username').value=vcenter_username;
+ document.getElementById('uf_vcenter_passwd').value=vcenter_passwd;
+ document.getElementById('uf_city').value=city;
+ document.getElementById('uf_state').value=state;
+ document.getElementById('uf_operational_status').value=operational_status;
+ document.getElementById('uf_oam_gateway_addr').value=oam_gateway_addr;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ $('#update_aic_site_modal').modal('show');
+}
+
+function deleteSite(siteId) {
+
+ bootbox.confirm({
+ message: "Their may be SERVICE_HOMING entry pointing to this site. Are you sure you want to delete site [" + siteId + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteSite?siteid=" + siteId);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listVpePool.ejs b/admportal/views/gamma/listVpePool.ejs
new file mode 100644
index 00000000..51c2dfec
--- /dev/null
+++ b/admportal/views/gamma/listVpePool.ejs
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#vpe_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VPE Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+ <table id="vpe_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site ID</th>
+ <th>VPE Name</th>
+ <th>Availability Zone</th>
+ <th>IPV4 OAM Address</th>
+ <th>Loopback IPV4 Address</th>
+ <th>Prov Status</th>
+ <th>VLAN ID Outer</th>
+ <th>Vendor</th>
+ <th>Interface Name</th>
+ <th>Interface Speed</th>
+ <th>Interface Units</th>
+ <th>VPE UUID</th>
+ <th>VPE ID</th>
+ <th>AS_NUMBER</th>
+ <th>Image Filename</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.vpe_name %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.ipv4_oam_address %></td>
+ <td><%= row.loopback0_ipv4_address %></td>
+ <td><%= row.provisioning_status %></td>
+ <td><%= row.vlan_id_outer %></td>
+ <td><%= row.vendor %></td>
+ <td><%= row.physical_intf_name %></td>
+ <td><%= row.physical_intf_speed %></td>
+ <td><%= row.physical_intf_units %></td>
+ <td><%= row.vpe_uuid %></td>
+ <td><%= row.vpe_id %></td>
+ <td><%= row.as_number %></td>
+ <td><%= row.image_filename %></td>
+ <td>
+<!--
+ <form name="rowform">
+ <input type="hidden" name="rf_aic_site_id" id="rf_aic_site_id" value="<%= row.aic_site_id %>"</input>
+ <input type="hidden" name="rf_vpe_name" id="rf_vpe_name" value="<%= row.vpe_name %>"</input>
+ <input type="hidden" name="rf_availability_zone" id="rf_availability_zone" value="<%= row.availability_zone %>"</input>
+ </form>
+-->
+ <!-- <% var _attuid = row.attuid %> -->
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs"
+ 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>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVpePool('<%= row.vpe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>');">Delete</button>
+ <% } %>
+ </td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVpePool" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vpe_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+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) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_vpe_name').value=vpe_name;
+ document.getElementById('uf_availability_zone').value=availability_zone;
+ document.getElementById('uf_provisioning_status').value=provisioning_status;
+ document.getElementById('uf_ipv4_oam_address').value=ipv4_oam_address;
+ document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
+ document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
+ document.getElementById('uf_vendor').value=vendor;
+ document.getElementById('uf_physical_intf_name').value=physical_intf_name;
+ document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
+ document.getElementById('uf_physical_intf_units').value=physical_intf_units;
+ document.getElementById('uf_vpe_uuid').value=vpe_uuid;
+ document.getElementById('uf_vpe_id').value=vpe_id;
+ document.getElementById('uf_as_number').value=as_number;
+ document.getElementById('uf_image_filename').value=image_filename;
+
+ document.getElementById('uf_key_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_vpe_name').value=vpe_name;
+ $('#update_vpe_pool_modal').modal('show');
+
+}
+function deleteVpePool(vpe_name,aic_site_id,availability_zone) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VPE [" + aic_site_id + "][" + vpe_name + "][" + availability_zone + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVpePool?aic_site_id=" + aic_site_id + "&vpe_name=" + vpe_name + "&availability_zone=" + availability_zone);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/listVplspePool.ejs b/admportal/views/gamma/listVplspePool.ejs
new file mode 100644
index 00000000..b49c2a37
--- /dev/null
+++ b/admportal/views/gamma/listVplspePool.ejs
@@ -0,0 +1,178 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#vplspe_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>VPLSPE Pool</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+ <table id="vplspe_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>VPLSPE Name</th>
+ <th>AIC Site ID</th>
+ <th>Availability Zone</th>
+ <th>Interface Name</th>
+ <th>Interface Speed</th>
+ <th>Interface Units</th>
+ <th>Loopback IPV4 Address</th>
+ <th>VLAN ID Outer</th>
+ <th>VPLSPE UUID</th>
+ <th>Image Filename</th>
+ <th>Prov Status</th>
+ <th>Vendor</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vplspe_name %></td>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.physical_intf_name %></td>
+ <td><%= row.physical_intf_speed %></td>
+ <td><%= row.physical_intf_units %></td>
+ <td><%= row.loopback0_ipv4_address %></td>
+ <td><%= row.vlan_id_outer %></td>
+ <td><%= row.vplspe_uuid %></td>
+ <td><%= row.image_filename %></td>
+ <td><%= row.provisioning_status %></td>
+ <td><%= row.vendor %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ 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>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteVplspePool('<%= row.vplspe_name %>','<%=row.aic_site_id %>','<%= row.availability_zone %>','<%= row.physical_intf_name %>');">Delete</button>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+
+<!--
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:0px 25px;">
+ <form method="POST" action="/gamma/uploadVplspePool" enctype="multipart/form-data">
+ <div class="form-group">
+ <label for="dest">File input</label>
+ <input name="filename" type="file" id="dest">
+ <p class="help-block">Choose a file to upload.</p>
+ </div>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default disabled"
+ onclick="uploadFile(this.form);">Upload File</button>
+ <% } %>
+
+ </form>
+ </div>
+ <% } %>
+-->
+</div>
+
+<% include ../partials/update_vplspe_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+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) {
+
+ document.getElementById('uf_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_availability_zone').value=availability_zone
+ document.getElementById('uf_vplspe_name').value=vplspe_name;
+ document.getElementById('uf_physical_intf_name').value=physical_intf_name;
+ document.getElementById('uf_physical_intf_speed').value=physical_intf_speed;
+ document.getElementById('uf_physical_intf_units').value=physical_intf_units;
+ document.getElementById('uf_loopback0_ipv4_address').value=loopback0_ipv4_address;
+ document.getElementById('uf_vlan_id_outer').value=vlan_id_outer;
+ document.getElementById('uf_vplspe_uuid').value=vplspe_uuid;
+ document.getElementById('uf_image_filename').value=image_filename;
+ document.getElementById('uf_provisioning_status').value=provisioning_status;
+ document.getElementById('uf_vendor').value=vendor;
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_vplspe_name').value=vplspe_name;
+ document.getElementById('uf_key_availability_zone').value=availability_zone
+ document.getElementById('uf_key_physical_intf_name').value=physical_intf_name;
+ $('#update_vplspe_pool_modal').modal('show');
+}
+
+function deleteVplspePool(vplspe_name,aic_site_id,availability_zone,physical_intf_name) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete VPLSPE [" + vplspe_name + "][" + aic_site_id + "][" + availability_zone + "][" + physical_intf_name + "] ?",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteVplspePool?aic_site_id=" + aic_site_id + "&vplspe_name=" + vplspe_name + "&availability_zone=" + availability_zone + "&physical_intf_name=" + physical_intf_name);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/nbVlanPool.ejs b/admportal/views/gamma/nbVlanPool.ejs
new file mode 100644
index 00000000..9d3a8d1b
--- /dev/null
+++ b/admportal/views/gamma/nbVlanPool.ejs
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#nb_vlan_pool').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NetBond VLAN Pools</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+
+ <table id="nb_vlan_pool" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>AIC Site Id</th>
+ <th>Availability Zone</th>
+ <th>VLAN Plan Id</th>
+ <th>Plan Type</th>
+ <th>Purpose</th>
+ <th>VLAN Id</th>
+ <th>Status</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.aic_site_id %></td>
+ <td><%= row.availability_zone %></td>
+ <td><%= row.vlan_plan_id %></td>
+ <td><%= row.plan_type %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.vlan_id %></td>
+ <td><%= row.status %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="updateNbVlanPool('<%= row.aic_site_id %>', '<%= row.availability_zone %>',
+ '<%= row.vlan_plan_id %>', '<%= row.plan_type %>', '<%= row.purpose %>',
+ '<%= row.vlan_id %>', '<%= row.status %>');">Update</button>
+ </td>
+ <% } else { %>
+ <td>&nbsp;</td>
+ <% } %>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/nb_vlan_pool %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function updateNbVlanPool(aic_site_id,availability_zone,vlan_plan_id,plan_type,purpose,vlan_id,pstatus) {
+
+ document.getElementById('uf_key_aic_site_id').value=aic_site_id;
+ document.getElementById('uf_key_availability_zone').value=availability_zone;
+ document.getElementById('uf_key_vlan_plan_id').value=vlan_plan_id;
+ document.getElementById('uf_key_plan_type').value=plan_type;
+ document.getElementById('uf_key_purpose').value=purpose;
+ document.getElementById('uf_key_vlan_id').value=vlan_id;
+ document.getElementById('uf_status').value=pstatus;
+
+ $('#update_nb_vlan_pool').modal('show');
+}
+
+function saveNbVlanPool(form)
+{
+ form.submit();
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/nbVlanRange.ejs b/admportal/views/gamma/nbVlanRange.ejs
new file mode 100644
index 00000000..748dbbe3
--- /dev/null
+++ b/admportal/views/gamma/nbVlanRange.ejs
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#nb_vlan_ranges').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>NetBond VLAN Ranges</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary" data-toggle="modal" data-target="#add_vlan_range">
+ Add Range
+ </button>
+ </div>
+ <% } %>
+
+ <table id="nb_vlan_ranges" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>Vlan Plan Id</th>
+ <th>Purpose</th>
+ <th>Range Start</th>
+ <th>Range End</th>
+ <th>Plan Type</th>
+ <th>Pool Generated</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.vlan_plan_id %></td>
+ <td><%= row.purpose %></td>
+ <td><%= row.range_start %></td>
+ <td><%= row.range_end %></td>
+ <td><%= row.plan_type %></td>
+ <td><%= row.generated %></td>
+ <td>
+ <% if (row.generated == 'N' && priv == 'A'){ %>
+ <button type="button" class="btn btn-default btn-xs" onclick="generateVlanPool();">Generate Pool</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default btn-xs disabled"
+ onclick="generateVlanPool('<%= row.purpose %>', '<%= row.vlan_plan_id %>',
+ '<%= row.range_start %>', '<%= row.range_end %>',
+ '<%= row.plan_type %>');">Generate Pool</button>
+ <% } %>
+ <% if (row.generated == 'N'){ %>
+ <button type="button" class="btn btn-default btn-xs disabled" onclick="viewNbVlanPool('<%= row.vlan_plan_id %>','<%= row.range_start %>', '<%= row.range_end %>');">View Pool</button>
+ <% } else { %>
+ <button type="button" class="btn btn-default btn-xs" onclick="viewNbVlanPool('<%= row.vlan_plan_id %>','<%= row.range_start %>', '<%= row.range_end %>');">View Pool</button>
+ <% } %>
+ <% if(priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs"
+ onclick="deleteNbVlanRange('<%= row.vlan_plan_id %>',
+ '<%= row.plan_type %>', '<%= row.purpose %>', '<%= row.range_start %>',
+ '<%= row.range_end %>');">Delete</button>
+ <% } %>
+ </td>
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/nb_vlan_range %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+
+function generateVlanPool(purpose,vlan_plan_id,range_start,range_end,plan_type)
+{
+ var url_string = encodeURI("/gamma/generateNbVlanPool?vlan_plan_id=" + vlan_plan_id
+ + "&range_start=" + range_start + "&range_end=" + range_end
+ + "&plan_type=" + plan_type + "&purpose=" + purpose);
+ location.assign(url_string);
+ return;
+}
+function viewNbVlanPool(vlan_plan_id, range_start, range_end)
+{
+ var url_string = encodeURI("/gamma/getNbVlanPool?vlan_plan_id=" + vlan_plan_id
+ + "&range_start=" + range_start + "&range_end=" + range_end);
+ location.assign(url_string);
+ return;
+}
+function deleteNbVlanRange(vlan_plan_id,plan_type,purpose,range_start,range_end) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this VLAN Range[" + vlan_plan_id + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ var url_string = encodeURI(
+ "/gamma/deleteNbVlanRange?vlan_plan_id=" + vlan_plan_id
+ + "&plan_type=" + plan_type + "&purpose=" + purpose
+ + "&range_start=" + range_start + "&range_end=" + range_end);
+ location.assign(url_string);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+function saveNbVlanRange(form)
+{
+ var errorMsg='';
+ var plan_type = form.nf_plan_type.value;
+ var purpose = form.nf_purpose.value;
+ var range_start = form.nf_range_start.value;
+ var range_end = form.nf_range_end.value;
+
+ if ( (range_start == null) || (range_start == "") || isblank(range_start) )
+ {
+ errorMsg += 'Range Start is required.<br>';
+ }
+ if ( (range_end == null) || (range_end == "") || isblank(range_start) )
+ {
+ errorMsg += 'Range End is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+
+ if ( !$.isNumeric(range_start) ) {
+ bootbox.alert('Range Start is not a number.');
+ return;
+ }
+ if ( !$.isNumeric(range_end) ) {
+ bootbox.alert('Range End is not a number.');
+ return;
+ }
+ var r_start = Number(range_start);
+ var r_end = Number(range_end);
+
+ if ( r_end < r_start )
+ {
+ bootbox.alert('Range End must be greater than Range Start.');
+ return;
+ }
+
+ form.submit();
+}
+
+</script>
+
+</body>
+</html>
+
diff --git a/admportal/views/gamma/networkProfile.ejs b/admportal/views/gamma/networkProfile.ejs
new file mode 100644
index 00000000..1b54d671
--- /dev/null
+++ b/admportal/views/gamma/networkProfile.ejs
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <% include ../partials/head %>
+ <% include ../partials/header %>
+ <script type="text/javascript" src="/javascripts/admportal.js" async></script>
+ <title>SDN-C AdminPortal</title>
+
+<script class="init">
+ $(document).ready(function() {
+ $('#network_profile').DataTable( {
+ "order": [[ 0, "asc" ]]
+ } );
+} );
+</script>
+
+</head>
+<body>
+
+<div class="well well-sm">
+<h3>Network Profile</h3>
+</div>
+
+<% if ( typeof result != 'undefined' ) {
+ if (result.code.length > 0) {
+ if ( result.code == 'success' ) { %>
+ <div class='alert alert-success' role='alert'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } else { %>
+ <div class='alert alert-danger' role='danger'>
+ <%
+ for ( x in result.msg ){ %>
+ <div><%= result.msg[x] %></div>
+ <% } %>
+ </div>
+ <% } %>
+ <% } %>
+<% } %>
+
+<% if( typeof privilege != 'undefined'){
+ var priv = privilege.privilege;
+} else {
+ var priv = 'A';
+} %>
+
+
+<div class="container-fluid">
+
+ <% if(priv == 'A'){ %>
+ <div class="actions" style="padding:15px 0px;">
+ <button class="btn btn-primary btn-md" data-toggle="modal" data-target="#add_network_profile">
+ Add Profile
+ </button>
+ </div>
+ <% } %>
+
+ <table id="network_profile" class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th>*Network Type</th>
+ <th>Technology</th>
+ <% if(priv == 'A'){ %>
+ <th>Action</th>
+ <% } %>
+ </tr>
+ </thead>
+ <tbody>
+ <% rows.forEach( function(row) { %>
+ <tr>
+ <td><%= row.network_type %></td>
+ <td><%= row.technology %></td>
+ <% if(priv == 'A') { %>
+ <td>
+ <% if (priv == 'A') { %>
+ <button type="button" class="btn btn-default btn-xs" onclick="updateNetworkProfile('<%= row.network_type %>', '<%= row.technology %>');">Update</button>
+ <button type="button" class="btn btn-default btn-xs" onclick="deleteNetworkProfile('<%= row.network_type %>');">Delete</button>
+ <% } %>
+ </td>
+ <% } %>
+
+ </tr>
+ <% }); %>
+ </tbody>
+ </table>
+</div>
+
+<% include ../partials/network_profile %>
+<footer>
+ <% include ../partials/footer %>
+</footer>
+
+<script type="text/javascript">
+function saveNetworkProfile(form)
+{
+ var errorMsg='';
+ var network_type = '';
+ var technology = '';
+
+ if ( form.name == 'addForm' )
+ {
+ network_type = form.nf_network_type;
+ technology = form.nf_technology;
+ }
+ else
+ {
+ network_type = form.uf_network_type;
+ technology = form.uf_technology;
+ }
+
+
+ if ( (network_type.value == null) || (network_type.value == "") || isblank(network_type.value) )
+ {
+ errorMsg += 'Network Type is required.<br>';
+ }
+ if( errorMsg.length > 0 ) {
+ bootbox.alert(errorMsg);
+ return;
+ }
+ form.submit();
+}
+
+function updateNetworkProfile(network_type,technology) {
+
+ document.getElementById('uf_network_type').value=network_type;
+ document.getElementById('uf_technology').value=technology;
+
+ document.getElementById('uf_key_network_type').value=network_type;
+
+ $('#update_network_profile').modal('show');
+}
+
+function deleteNetworkProfile(network_type) {
+
+ bootbox.confirm({
+ message: "Are you sure you want to delete this Network Profile [" + network_type + "]",
+ callback: function(result) {
+ if ( result )
+ {
+ location.assign("/gamma/deleteNetworkProfile?network_type=" + network_type);
+ }
+ return;
+ },
+ buttons: {
+ cancel: {
+ label: "Cancel"
+ },
+ confirm: {
+ label: "Yes"
+ }
+ }
+ });
+}
+
+</script>
+
+</body>
+</html>
+