Timoney, Daniel (dt5972) | 324ee36 | 2017-02-15 10:37:53 -0500 | [diff] [blame] | 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 | <script class="init"> |
| 11 | $(document).ready(function() { |
| 12 | $('#usertrace').DataTable( { |
| 13 | "order": [[ 0, "asc" ]] |
| 14 | } ); |
| 15 | } ); |
| 16 | </script> |
| 17 | |
| 18 | </head> |
| 19 | <body> |
| 20 | |
| 21 | <div class="well well-sm"> |
| 22 | <h3>User Trace</h3> |
| 23 | </div> |
| 24 | |
| 25 | <% if ( typeof result != 'undefined' ) { |
| 26 | if (result.code.length > 0) { |
| 27 | if ( result.code == 'success' ) { %> |
| 28 | <div class='alert alert-success' role='alert'> |
| 29 | <% |
| 30 | for ( x in result.msg ){ %> |
| 31 | <div><%= result.msg[x] %></div> |
| 32 | <% } %> |
| 33 | </div> |
| 34 | <% } else { %> |
| 35 | <div class='alert alert-danger' role='danger'> |
| 36 | <% |
| 37 | for ( x in result.msg ){ %> |
| 38 | <div><%= result.msg[x] %></div> |
| 39 | <% } %> |
| 40 | </div> |
| 41 | <% } %> |
| 42 | <% } %> |
| 43 | <% } %> |
| 44 | |
| 45 | <% if( typeof privilege != 'undefined'){ |
| 46 | var priv = privilege.privilege; |
| 47 | } else { |
| 48 | var priv = 'A'; |
| 49 | } %> |
| 50 | |
| 51 | |
| 52 | <div class="container-fluid"> |
| 53 | <div class="table-responsive"> |
| 54 | <table id="usertrace" class="table table-hover table-condensed"> |
| 55 | <thead> |
| 56 | <tr> |
| 57 | <th>Date (UTC)</th> |
| 58 | <th>ATTUID</th> |
| 59 | <th>Action</th> |
| 60 | <th>Description</th> |
| 61 | </tr> |
| 62 | </thead> |
| 63 | <tbody id="myTable"> |
| 64 | <% for (var x=0; x<pageInfo.rows.length; x++) { %> |
| 65 | <tr> |
| 66 | <td><%= pageInfo.rows[x].date %></td> |
| 67 | <td><%= pageInfo.rows[x].attuid %></td> |
| 68 | <td><%= pageInfo.rows[x].action %></td> |
| 69 | <td><%= pageInfo.rows[x].desc %></td> |
| 70 | </tr> |
| 71 | <% } %> |
| 72 | </tbody> |
| 73 | </table> |
| 74 | </div> |
| 75 | </div> |
| 76 | |
| 77 | |
| 78 | |
| 79 | <div class="container-fluid"> |
| 80 | <div class="row"> |
| 81 | <div class="col-md-1 text-left"> |
| 82 | <p> Page <%= pageInfo.currentPage %> of <%= pageInfo.pageCount %></p> |
| 83 | </div> |
| 84 | <div class="col-md-11 text-left"> |
| 85 | <% if (pageInfo.pageCount > 1) { %> |
| 86 | <ul class="pagination"> |
| 87 | <% if (pageInfo.currentPage > 1) { %> |
| 88 | <li><a href="/logs/pageUserTrace?page=1">«</a></li> |
| 89 | <% } %> |
| 90 | <% var i = 1; |
| 91 | if (pageInfo.currentPage > 10) { |
| 92 | i = +pageInfo.currentPage - 9; |
| 93 | } %> |
| 94 | <% if (i !== 1) { %> |
| 95 | <!--<li class="disabled"><a href="#">...</a></li>--> |
| 96 | <% } %> |
| 97 | <% for (i; i<=pageInfo.pageCount; i++) { %> |
| 98 | <% if (pageInfo.currentPage == i) { %> |
| 99 | <li class="active"><span><%= i %> <span class="sr-only">(current)</span></span></li> |
| 100 | <% } else { %> |
| 101 | <li><a href="/logs/pageUserTrace?page=<%= i %>"><%= i %></a></li> |
| 102 | <% } %> |
| 103 | <% if (i == (+pageInfo.currentPage + 9)) { %> |
| 104 | <!--<li class="disabled"><a href="#">...</a></li>--> |
| 105 | <% break; } %> |
| 106 | <% } %> |
| 107 | <% if (pageInfo.currentPage != pageInfo.pageCount) { %> |
| 108 | <li><a href="/logs/pageUserTrace?page=<%= pageInfo.pageCount %>">»</a></li> |
| 109 | <% } %> |
| 110 | </ul> |
| 111 | <% } %> |
| 112 | </div><!-- col-md-10 --> |
| 113 | </div><!-- row --> |
| 114 | </div><!-- container-fluid --> |
| 115 | |
| 116 | <footer> |
| 117 | <% include ../partials/footer %> |
| 118 | </footer> |
| 119 | |
| 120 | </body> |
| 121 | </html> |
| 122 | |