NonRT-RIC A1 Northbound API
[nonrtric.git] / sdnc-a1-controller / oam / admportal / views / gamma / listServiceHomingRollback.ejs
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
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>
10 </head>
11 <body>
12
13 <div class="well well-sm">
14 <h3>Service Homing Rollback</h3>
15 <p>(This table data was saved during the last import of SERVICE_HOMING data.)</p>
16 </div>
17
18 <% if ( typeof result != 'undefined' ) {
19                 if (result.code.length > 0) { 
20                         if ( result.code == 'success' ) { %>
21                                 <div class='alert alert-success' role='alert'>
22                                 <%
23                                 for ( x in result.msg ){ %>
24                                         <div><%= result.msg[x] %></div>
25                                 <% } %>
26                                 </div>
27                         <% } else { %> 
28                                 <div class='alert alert-danger' role='danger'>
29                                 <%
30                                 for ( x in result.msg ){ %>
31                                         <div><%= result.msg[x] %></div>
32                                 <% } %>
33                                 </div>
34                         <% } %>
35                 <% } %>
36 <% } %>
37
38 <% if( typeof privilege != 'undefined'){
39     var priv = privilege.privilege;
40 } else {
41     var priv = 'A';
42 } %>
43
44
45 <div class="container-fluid">
46         <table class="table table-hover table-condensed">
47       <thead>
48         <tr>
49                   <th>Service Type</th>
50           <th>LATA</th>
51                   <th>Hubbing City Type</th>
52           <th>Latitude</th>
53           <th>Longitude</th>
54           <th>Primary Site Name</th>
55           <th>Secondary Site Name</th>
56           <th>Tertiary Site Name</th>
57         </tr>
58       </thead>
59       <tbody>
60       <% var i=0; rows.forEach( function(row) { %> 
61         <tr>
62             <td><%= row.service_type %></td>
63             <td><%= row.lata %></td>
64             <td><%= row.hubbing_city_type%></td>
65             <td><%= row.latitude %></td>
66             <td><%= row.longitude %></td>
67             <td><%= row.primary_aic_site_name %></td>
68             <td><%= row.secondary_aic_site_name %></td>
69             <td><%= row.tertiary_aic_site_name %></td>
70         </tr>
71     <% i++; }); %>
72       </tbody>
73     </table>
74
75          <div class container>
76         <p><%= i %> rows in table.</p>
77     </div>
78
79         <% if (priv == 'A') { %>
80         <button type="button" class="btn btn-default"
81                 onclick="rollback();">Rollback</button>
82         <% } %>
83 </div>
84
85 <footer>
86     <% include ../partials/footer %>
87 </footer>
88 <script type="text/javascript">
89
90 function rollback()
91 {
92         bootbox.confirm({
93                 message: "This Rollback will overlay the current SERVICE_HOMING table.  Are you sure you want to Rollback the SERVICE_HOMING table?",
94                 callback: function(result){
95                         if(result)
96                         {
97                                 location.assign("/gamma/rollbackServiceHoming");
98                         }
99                         return;
100                 },
101                 buttons: {
102                         cancel: {
103                                 label: "Cancel"
104                         },
105                         confirm:{
106                                 label: "Yes"
107                         }
108                 }
109         });
110 }
111
112 </script>
113
114
115 </body>
116 </html>
117